Kitonum

21435 Reputation

26 Badges

17 years, 28 days

MaplePrimes Activity


These are answers submitted by Kitonum

Irem:=proc(a::integer, b::integer)

b*frac(a/b);

end;

 

Example:

Irem(8, 3); 

     2

 

combine(-ln(x)+ln(y))  assuming x>0,y>0;

with(RealDomain):

Sol:=solve({x^2 + 2*y*z^2 = 0, y^2  - 3*x*z = 0, 1/3*x*y^2 + 2*y*z^3 = 0, -1/3*y^4 - 6*y*z^4 = 0}):

L:=allvalues({Sol}):

op({seq(simplify(L[i], power), i = 1 .. 3)});  # Final answer

 

We got infinitely many solutions, depending on one real parameter  z .

Addition: Geometrically, the set of solutions is the union of two space lines in R^3. First line coincides with the axis Oz.

A:=plots[spacecurve]([0,0,z], thickness=3, color=red, z=-5..5, numpoints=1000):

B:=plots[spacecurve]([1/3*z*(-18*z)^(2/3),(-18*z)^(1/3)*z,z], thickness=3, color=red, z=-5..5, numpoints=1000):

plots[display](A, B, axes=normal, labels=[x,y,z], view=[-5..5, -5..5, -4..4], scaling=constrained); 

 

 

Divergence of the integral is easily obtained by a direct calculation using the result by Alejandro:

MultiSeries:-series(sin(x)^cos(x), x = Pi, 2);

limit(int(%, x = 0 .. Pi - t), t = 0, right);

 

 

I understood the original question in the sense that it is required to find the sum of all possible values  f(x_1, x_2, .. , x_n) ​​, where each argument  x_i  independently of the others runs from  0  to  k_i .

 

Summa:=proc(f::procedure, L::list)

local n, T, S;

uses combinat;

n:=nops(L);

T:=cartprod([seq([seq(i, i=0..L[k])], k=1..n)]);

S:=0;

while not T[finished] do S:=S+f(op(T[nextvalue]()))

od;

S;

end; 

 

Example:

Summa((x1,x2,x3)->f(x1,x2,x3), [2, 3, 5]);

 

 

Another example (random polynomial in two variables, where the degree of each variable does not exceed 3, and the coefficients are random integers in the range -9 .. 9):

roll := rand(-9 .. 9):

Summa((a,b)->roll()*x^a*y^b, [3,3]);

The problem is easily solved by hand.

The answer in the interval  0..Pi:   RealRange(0, Open(Pi/6)), Pi/3, 2*Pi/3, Pi

This solution is periodically extended to the whole real axis with period  Pi .

Illustration to the answer:

plot([abs(tan(x)*tan(2*x)*tan(3*x))+abs(tan(x)+tan(2*x))-tan(3*x), [(1/6)*Pi, t, t = -1 .. 20], [(1/4)*Pi, t, t = -1 .. 20], [(1/2)*Pi, t, t = -1 .. 20], [2*Pi*(1/3), t, t = -1 .. 20], [3*Pi*(1/4), t, t = -1 .. 20], [5*Pi*(1/6), t, t = -1 .. 20]], x = 0 .. Pi, -1 .. 20, thickness = [3, 1, 1, 1, 1, 1, 1], linestyle = [1, 3, 3, 3, 3, 3, 3], color = [red, seq(black, i = 1 .. 6)], discont = true, tickmarks = [spacing((1/6)*Pi), default], numpoints = 3000);

 

Edited: the plot is improved. Dashed lines correspond to the points of discontinuity.

This software package  

http://www.umsolver.com/usa/mathematics/free-algebra-equation-solver/

makes it possible to solve step by step much more problems. 

A:=a+b^2;

A=eval(A, {a=10, b=3});

 

 

Integral to display you can use inert form:

Int(cos(x),x)=int(cos(x),x);

M. Hirnyk wrote "It is clear that the set of the real solutions of the equation under consideration is infinite". This is true, but it does not follow from the plot, since any plot is constructed from a finite number of points. For example, try using the plots to determine how many real roots have the following two equations:

1)  10^(10*x)-x^(10^10)+1 = 0

2)  log[0.0659878](x) = 0.0659878^x

 

For the solution of the original equation, we note that the critical points of the function  

x->cos(x)^2+2*x*cos(x)-2*sin(x)+4  

going by equal distances to each other excepting the unique negative root of the equation  x+cos(x)=0 :

restart;

A:=cos(x)^2+2*x*cos(x)-2*sin(x)+4:

B:=factor(diff(cos(x)^2+2*x*cos(x)-2*sin(x)+4, x));

_EnvAllSolutions := true: solve(B);

simplify(eval(A, x=Pi*k)) assuming k::posint;

We see that the signs of the function at these critical points are alternated, and because between these points the function is monotonic, then in each interval  x = Pi*(n-1) .. Pi*n ,  n>=1,  there is only one real root. For negative  x the situation is similar.

The procedure  nthRoot  finds the  n_th  real positive or negative root with  N  significant digits:

nthRoot:=proc(n, N, t)

Digits:=N;

if t=positive then fsolve(cos(x)^2+2*x*cos(x)-2*sin(x)+4, x=Pi*(n-1)..Pi*n)  else

fsolve(cos(x)^2+2*x*cos(x)-2*sin(x)+4, x=-Pi*(n+1)..-Pi*n)  fi;

end:

 

Example (the first 10 positive and negative roots):

seq(nthRoot(n, 15, positive), n=1..10);

seq(nthRoot(n, 15, negative), n=1..10);

 

 

 

eq1:=diff(u[1](z),z)=a[11](z)*u[1](z)+a[12](z)*u[2](z):

u[1]:=z->sin(z)*f(z):

eq1;

 

or 

eq1:=diff(u[1](z),z)=a[11](z)*u[1](z)+a[12](z)*u[2](z):

eval(eq1, u[1]=sin(z)*f(z));

Just one region occludes the other.

Workaround:

with(plots):

I1 := inequal({x < 1, y < 1}, x = 0 .. 1, y = 0 .. 1, optionsfeasible = [color = "Brown", thickness = 2], view = [0 .. 2, 0 .. 2]):

I2 := inequal({y > 1, x < 1}, x = 0 .. 1, y = 1 .. 2, optionsfeasible = [color = "Yellow", thickness = 2], view = [0 .. 2, 0 .. 2]):

display(I1);

display(I2);

display({I1, I2});

restart;

A:=(1/a[x])^(-k-1+epsilon)/(1/a[I])^(-k-1+epsilon);

Rule:=(x::anything)^(z::anything)/(y::anything)^(z::anything)=(x/y)^z:

B:=applyrule(Rule, A);

subs({op(1,B)=op(1,B)^(-1), op(2,B)=-op(2,B)}, B);  # Result

 

 

For example

simplify((a+b)^2, {a^2+b^2=1, a*b=1/2});

                                 2

 

Addition. The above example is trivial. Here is less obvious example:

simplify(a^20+b^20, {a+b=5, a*b=1});

                       40648568638127

Idea of ​​the proof:
If  x*(x +1)  is divisible by 100!  then because the numbers  x  and  x+1  are relatively prime,  in the expansion of  100!  into prime factors any  p^r  can belong to only one of the factors  x  or  x+1.

restart;

A:={op(ifactors(100!)[2])}:

B:=[seq(op(combinat[choose](A,k)), k=1..7)]:

C:=[seq([B[i], A minus B[i]], i=1..nops(B))]:

for c in C do

a:=mul(c[1,i,1]^c[1,i,2], i=1..nops(c[1])): b:=mul(c[2,i,1]^c[2,i,2], i=1..nops(c[2])):

isolve(a*u-b*v=1): x:=tcoeff(b*rhs(%[2])): if x<4*99! then break fi:

isolve(b*v-a*u=1): x:=tcoeff(a*rhs(%[1])): if x<4*99! then break fi:

od:

x;

 

 

Verification:

is(irem(x*(x+1), 100!)=0 and x<4*99!);

                               true

 

This method lets you easily find the smallest  x  satisfying the given conditions, but it will take much more time.

You can use  plot3d  command:

A:=mtaylor(sin(x*y), [x=1,y=2], 6);

plot3d(A, x=0..3, y=0..3, view=-2..2, axes=normal, scaling=constrained);

First 244 245 246 247 248 249 250 Last Page 246 of 289