Kitonum

21435 Reputation

26 Badges

17 years, 28 days

MaplePrimes Activity


These are answers submitted by Kitonum

Why do you think that  w*exp(z)  is   the wrong value? Compare 2 plots

restart;

A := plot3d(sum((sum(binomial(2*q, n-1)*z^q/factorial(q), q = 0 .. infinity))*w^n, n = 1 .. infinity), z = 0 .. 5, w = 0 .. 5):

B := plot3d(exp(z)*w, z = 0 .. 5, w = 0 .. 5):

plots[display](<A | B>);

 

 

 

 
 

  

 

The procedure  Jacobi  takes one step in Jacobi's method:

Jacobi:=proc(A::Matrix)

local n, a, i, j, p, c, s, T;

uses LinearAlgebra;

n:=RowDimension(A);

a:=[[0,0], 0];

for i to n do

for j from i+1 to n do

if abs(A[i,j])>=abs(a[2]) then a:=[[i,j], A[i,j]] fi;

od;  od;

p:=2*a[2]/(A[a[1,1],a[1,1]]-A[a[1,2],a[1,2]]);

c:=evalf(cos(arctan(p)/2));

s:=evalf(sin(arctan(p)/2));

T:=Matrix(n,{op(subsop(a[1,1]=((a[1,1],a[1,1])=c), a[1,2]=((a[1,2],a[1,2])=c),[seq((i,i)=1, i=1..n)])), (a[1,1],a[1,2])=-s, (a[1,2],a[1,1])=s});

Transpose(T).A.T;

end proc:

 

Example (done 20 iterations):

A:=Matrix(4, [1,2,3,4,2,5,5,6,3,5,7,7,4,6,7,8]);

(Jacobi@@20)(A);

 

 

Consider the solution in Maple with a partially manual solution:

f := unapply(Pi*(x+1)/(4*x^2-4*x+2), x);

g := unapply(Pi*(x-2)/(4*x^2-4*x+2), x);

Expr := simplify(eval(2*sin((u-v)*(1/2))*cos((u+v)*(1/2)), {u = f(x), v = Pi/2-g(x)}));

 

 

Sol1:=[solve(op([2, 1], Expr) = (1/2)*Pi+Pi*k, x)];

Sol2:=[solve(op([3, 1], Expr) = (1/2)*Pi+Pi*k, x)];

 

 

S1:=isolve(-2*k-4*k^2>=0);

S2:=isolve(5+16*k-16*k^2>=0);

 

 

{op(eval(Sol1, S1)),op(eval(Sol2, {op(S2[1])})), op(eval(Sol2, {op(S2[2])}))} ;

 

 

First you have to call the package by the command:

with(Student[Calculus1]):

 

See your inequality

log[3+sqrt(8)](3-x)-log[17-6*sqrt(8)](4*x^2+20*x+25)+log[3-sqrt(8)](x^2+x-2)>=0;

 

It is easy to check the following equalities:

1)  17-12*sqrt(2)=(3-2*sqrt(2))^2

2)  3-2*sqrt(2)=1/(3+2*sqrt(2))

 

With these equalities your inequality is easily simplified and Maple solves it:

solve(ln(3-x)+ln(4*x^2+20*x+25)/2-ln(x^2+x-2)>=0);

Only one bug: in fact  1-sqrt(14)-sqrt(51)/3  and  sqrt(51)/3  are the roots.

 

PS.  Mathematica correctly solves this inequality directly:

 

 

Rotation matrix makes it easy to find the coordinates of the image of a vector under rotation. If you want to find the coordinates of a point under rotation around a straight line, it is more convenient to use the  geom3d[rotation]  command. Student[LinearAlgebra][RotationMatrix]  command can also be used for solving of this problem.

Useful exercise - find the coordinates of the point  [4,2,5]  while rotating around a line passing through the point  [1,2,3] with direction vector  <1,1,1>   through  angle  Pi/3  in two ways:

1) By  geom3d[rotation]  command.

2) By  Student[LinearAlgebra][RotationMatrix]  command.

RootFinding[Analytic](exp(x)*cos(x)+1=0, re=0..10, im=-1..1);

        4.7033237594522, 1.7461395304080, 7.8543696865740

IsIntersect:=proc(Seg1, Seg2)

if solve({Seg1[1,1]*t+Seg1[2,1]*(1-t)=Seg2[1,1]*s+Seg2[2,1]*(1-s), Seg1[1,2]*t+Seg1[2,2]*(1-t)=Seg2[1,2]*s+Seg2[2,2]*(1-s), t>=0, t<=1, s>=0, s<=1}, {t,s})=NULL

then return false else true fi;

end proc: 

 

Examples:

IsIntersect([[1,1],[2,2]], [[2,1],[1,2]]);

IsIntersect([[2,2],[3,3]], [[2,1],[1,2]]);

                                  true

                                  false

restart;

Sol:=rhs(dsolve(diff(y(x), x, x)+diff(y(x), x)+y(x) = 0)):

y1:=unapply(remove(t->type(t, name), op(1, Sol)), x);

y2:=unapply(remove(t->type(t, name), op(1, Sol)), x);

y:=unapply(C1*y1(x)+C2*y2(x), x);

 

 

eq||1:=a[1]^3+a[2]+a[3]^2+50:

eq||2:=a[1]^2+5*a[2]+a[3]+44:

eq||3:=a[1]+a[2]+a[3]^2+74:

V2:=Vector([seq(selectremove(x->type(x, numeric), eq||i)[1], i=1..3)]);

V1:=Vector([seq(selectremove(x->type(x, numeric), eq||i)[2], i=1..3)]);

 

 

I usually work in the classic interface. First I copy the code to Word, and then from Word to mapleprimes.

Maybe the  LinearAlgebra[GenerateMatrix]  command  will be helpful to you.

Your problem can be solved by the simple procedure. Formal arguments:  f  - your function,  a  and  b  - left and right ends of the range,  n  - the number of subintervals,  S  equals  left, right  or middle. I wrote only for left. The other variants  you can easily make your own.

Riemann:=proc(f, a, b, n, S)

local h;

h:=(b-a)/n;

if S=left then return sum(f(a+k*h)*h, k=0..n-1) fi;

end proc;

 

Examples of work:

Riemann(x->x^3, 0, 1, 10, left);

Riemann(x->x^3, 0, 1, n, left);

limit(%, n=infinity);

 

 

plot([sqrt(x^2-5*x+6)/log[10]((x+10)^2), [-11, t, t = -15 .. 25], [-9, t, t = -15 .. 25]], x = -30 .. 20, -15 .. 25, color = [red, blue, blue], linestyle = [1, 2, 2], tickmarks = [[-30, -20, -11, -9, 2, 3, 20], default], scaling = constrained, discont, numpoints = 10000);

The points of discontinuity of the function are  -11, -10, -9 . The point  -10  is the point of removable discontinuity. In fact, the range is  (-infinity, infinity) . It follows from the values of limits and the continuity of the function in the corresponding intervals:

Range(limit(sqrt(x^2-5*x+6)/log[10]((x+10)^2), x = -11, right),  Open(limit(sqrt(x^2-5*x+6)/log[10]((x+10)^2), x = -10))) ; 

Range( limit(sqrt(x^2-5*x+6)/log[10]((x+10)^2), x = 2),  limit(sqrt(x^2-5*x+6)/log[10]((x+10)^2), x = -9, right)); 

                                                                  Range(- infinity, Open(0))
                                                                   Range(0,  infinity)

f := x->add(sin(x/(k+1))/k, k = 1 .. 49)+sum(sin(x/(k+1))/k, k = 50 .. infinity):

plot(f, 0..50);

 

 

First 254 255 256 257 258 259 260 Last Page 256 of 289