Kitonum

21530 Reputation

26 Badges

17 years, 86 days

MaplePrimes Activity


These are answers submitted by Kitonum

Without loss of generality, we can assume that  L>0 :


x1:=(sin(beta*x)*cos(m*Pi*x/L))/(1+alpha*x);

int(x1, x=0..L) assuming  L>0, alpha>0; 

 

If  alpha<0 , then in the integration interval can be a point of discontinuity of  x1 . This case requires separate consideration.

Your problem can be solved by  LinearAlgebra[Eigenvectors]  command. Below we see that  w1=w  and  Q11=Q



NULL

A := Matrix(2, 2, {(1, 1) = (d-3)/(d-2), (1, 2) = -b/d, (2, 1) = d/((d-2)*b), (2, 2) = 1})

Matrix([[(d-3)/(d-2), -b/d], [d/((d-2)*b), 1]])

(1)

NULL

w := (1/2)*(2*d-5+I*sqrt(4*d-9))/(d-2);

(1/2)*(2*d-5+I*(4*d-9)^(1/2))/(d-2)

(2)

Q := Vector([(d-2)*b/d, -1/2-I*sqrt(d-9/4)])

Vector[column]([[(d-2)*b/d], [-1/2-((1/2)*I)*(4*d-9)^(1/2)]])

(3)

simplify(A.Q-w*Q)

Vector[column]([[0], [0]])

(4)

Sol := LinearAlgebra[Eigenvectors](A)

Vector(2, {(1) = (1/2)*(2*d-5+(-4*d+9)^(1/2))/(d-2), (2) = -(1/2)*(-2*d+5+(-4*d+9)^(1/2))/(d-2)}), Matrix(2, 2, {(1, 1) = -b*(d-2)/(d*((1/2)*(2*d-5+(-4*d+9)^(1/2))*d/(d-2)-(2*d-5+(-4*d+9)^(1/2))/(d-2)-d+3)), (1, 2) = -b*(d-2)/(d*(-(1/2)*(-2*d+5+(-4*d+9)^(1/2))*d/(d-2)+(-2*d+5+(-4*d+9)^(1/2))/(d-2)-d+3)), (2, 1) = 1, (2, 2) = 1})

(5)

Sol1 := map(simplify, [Sol])

[Vector(2, {(1) = (2*d-5+(-4*d+9)^(1/2))/(2*d-4), (2) = (2*d-5-(-4*d+9)^(1/2))/(2*d-4)}), Matrix(2, 2, {(1, 1) = -2*(d-2)*b/(((-4*d+9)^(1/2)+1)*d), (1, 2) = 2*(d-2)*b/(((-4*d+9)^(1/2)-1)*d), (2, 1) = 1, (2, 2) = 1})]

(6)

Q1 := Sol1[2][() .. (), 1]

Vector[column]([[-2*(d-2)*b/(((-4*d+9)^(1/2)+1)*d)], [1]])

(7)

Q11 := -((sqrt(-4*d+9)+1)*(1/2))*Q1

Vector[column]([[(d-2)*b/d], [-(1/2)*(-4*d+9)^(1/2)-1/2]])

(8)

w1 := Sol1[1][1]:

true

(9)

`assuming`([is(-(1/2)*sqrt(-4*d+9)-1/2 = -1/2-(1/2*I)*sqrt(4*d-9))], [4*d-9 > 0])

true

(10)

``



Download 1234567.mw

A corrected version (in several places the multiplication sign was missed or was written incorrectly):

 

restart; w := (1/2)*(2*d-5+I*sqrt(4*d-9))/(d-2)

(1/2)*(2*d-5+I*(4*d-9)^(1/2))/(d-2)

(1)

res := solve({(d-3)*Q1/(d-2)-b*Q2/d = w*Q1, d*Q1/((d-2)*b)+Q2 = w*Q2}, {Q1, Q2}, parametric, allsolutions)

piecewise(b = 0, [], d = 0, [], d-2 = 0, [], And(b <> 0, d <> 0, d-2 <> 0), [{Q1 = 0, Q2 = 0}])

(2)

NULL

 

Download 1234.mw

 

First way:

b:=y=x^3;

op(remove(has, [solve(b, x)], I));

                            

 

 

Addition.

A more reliable way (the example of Preben):

b:=solve(x^3-3*x+1=0, x):

map(t->Re(t), remove(t->is(Im(t)<>0), map(evalc,[b])));

                    

 

To get a predicted response in the presence of the parameters (in the equation  y=x^3  variable  y  is a parameter) necessary to impose a restriction on parameters:

b:=solve(y=x^3, x):

assume(y>0):

map(t->Re(t), remove(t->is(Im(t)<>0), map(evalc,[b])))[];

                                       y^(1/3)

or

b:=solve(y=x^3, x):

assume(y<0):

map(t->Re(t), remove(t->is(Im(t)<>0), map(evalc,[b])))[];

                                    -(-y)^(1/3)

 

Edited.

 

 

 

Maple doesn't solve such equations in matrix notations. If the matrices  B  and  C  are known, the equation can be easily reduced to a system of polynomial equations that Maple can solve numerically.

An example:

A:=Matrix(2, symbol=x);

B:=Matrix(2, [-1,2,3,4]):

C:=Matrix(2, [-1,0,4,-5]):

Sys:={seq(seq((A^2+B.A+C)[i,j], j=1..2), i=1..2)};

evalf(allvalues(solve(Sys)));

 

 

 

 

The equation has no solution. 

Here are my arguments:

1. Your equation does not contain the unknown function  y(x) (only its derivatives) and your initial conditions  do not contain any conditions on  y(x)  itself. Therefore, if the equation has a solution  y(x) , then any function  y(x)+constant would also be a solution. 

2. I added the condition  y(0)=0  and dropped the condition  D@@2)(y)(0) = 0 .  We got  a unique solution. But the plot of the second derivative clearly shows that  (D@@2)(y)(0) <> 0 :

eq := diff(y(x), `$`(x, 3))-(diff(y(x), x))*(diff(y(x), x))+1 = 0;

cond := y(0)=0, (D(y))(0) = 0, (D(y))(1) = 1;

de := dsolve({cond, eq}, y(x), numeric);

plots[odeplot](de, [x, diff(y(x),x,x)], x=0..1);

                               

 

 

Addition. Without any plot:

de(0):

                      [x = 0., y(x) = 0., diff(y(x), x) = 0., diff(y(x), x, x) = 1.39362859931605]

 

Maybe Lyapunov function will help you.

An example for lists:

M:=[seq(i^2, i=1..20)]:  # list 1

N:=[seq(i^3, i=1..20)]:  # list 2

plot(M,N);  # or

plot(M,N, style=point);

 

The same example for vectors:

M:=Vector(20, x->x^2):

N:=Vector(20, x->x^3):

plot(M,N);  # or

plot(M,N, style=point);

All the types of arrows you can see in the help on  DEtools[DEplot].

For example:

DETools[phaseportrait]([D(x)(t)=-0.4*x(t)+(0.5+4*x(t))*y(t),D(y)(t)=0.4*x(t)-(4.5+4*x(t))*y(t)],[x(t),y(t)], t=0..100, [[x(0)=1,y(0)=0.0]], x=0..1,y=0..0.1, stepsize=0.01, scaling=UNCONSTRAINED, linecolour=BLACK, dirgrid=[17,17], linestyle=1, arrows=mediumfill, axes=BOXED);

                               

 

 

 

If we assume that the parameters  r  and  theta  are real numbers,  evalc  command calculates the initial expression to the complex number written in algebraic form:

sqrt(1-r^2/exp(2*I/theta));

simplify(evalc(%));

      

 

 

 Edited  (correction):

simplify(evalc(sqrt(1-r^2*exp(2*I*theta))));

                                               

 

 

This is not the error but a warning:

restart:

with(plots):

Digits:=35:

ini1:=D(x)(0)=0, x(0)=1:

dsys:=diff(x(t),t,t)+(x(t)-2)*diff(x(t),t)+5*x(t)=0;

dsol1 :=dsolve({dsys,ini1}, numeric, abserr=1e-9, relerr=1e-8, maxfun=0);

plots:-odeplot(dsol1, [x(t), diff(x(t),t)], t=0..2, axes=boxed, color=black, linestyle=1, tickmarks=[6, 6], axes=boxed, titlefont=[SYMBOL,12]);   # The plot  x'(t) against  x(t)

 

 

 

 

The issue is the appearance of multiple roots. See

solve((x+y+z)^2=0, z);

                                   -x-y,  -x-y

 

A workaround:

plot3d(solve((x+y+z)^2=0, z, dropmultiplicity = true), x=-100..100, y=-100..100);

                              

 

 

 

A:=(cos(sqrt(2)*t)-cos(omega*t))/(omega^2-2);

``(1/denom(A))*numer(A);

                               

 

 

 

For better visibility animation done in 2D. It is easy to rewrite in 3D by using circular symmetry about Ox-axis.

A := plot([-1, 1], x = -10 .. 10, filled, color = "Yellow"):

B := plots[animate](plot, [[2*r*cos(phi)/Pi, 2*arcsin(sin(r*sin(phi)))/Pi, phi = 0 .. 2*Pi], thickness = 3, color = blue, scaling = constrained], r = 0 .. 5*Pi, frames = 100):

plots[display](A, B);

 Addition - animation in 3D:

A := plot3d([x,cos(t),sin(t)], x = -10 .. 10, t=0..2*Pi, style=surface, color = "Yellow", transparency=0.75):

B := plots[animate](plot3d, [[2*r*cos(phi)/Pi, 2*arcsin(sin(r*sin(phi)))/Pi*cos(t), 2*arcsin(sin(r*sin(phi)))/Pi*sin(t)],phi = 0 .. 2*Pi, t=0..2*Pi, style=surface,color = "Niagara Azure", scaling=constrained, numpoints=10000], r = 0 .. 5*Pi, frames = 100):

plots[display](A, B, axes=none);

 

 

 

 

Better quality of plotting without additional option  grid  enables the use of spherical coordinates.

Compare:

restart;

A:=plots[implicitplot3d](x^2+y^2+z^2-2^2, x = -2 .. 2, y = -2 .. 2, z = -2 .. 2, style = surface, axes = normal, view = [(-2.7 .. 2.7)$3],  grid = [30, 30, 30]):

B:=plot3d([2*cos(s)*sin(t), 2*sin(s)*sin(t), 2*cos(t)], s=0..2*Pi, t=0..Pi, style=surface):

plots[display](<A | B>, axes = normal, view = [(-2.7 .. 2.7)$3]);

    

 

 

 

First 185 186 187 188 189 190 191 Last Page 187 of 290