MaplePrimes Questions


 

NULL

Restart:

pde := diff(w(x, t), x $ 4) + diff(w(x, t), t $ 2)/c^2 = 0;

diff(diff(diff(diff(w(x, t), x), x), x), x)+(diff(diff(w(x, t), t), t))/c^2 = 0

(1)

test1 := w(x, t) = W(x)*cos(omega*t); pde1 := expand((eval(pde, test1))/cos(omega*t))

w(x, t) = W(x)*cos(omega*t)

 

diff(diff(diff(diff(W(x), x), x), x), x)-W(x)*omega^2/c^2 = 0

(2)

ode := algsubs(omega^2/c^2 = alpha^4, pde1); sol := dsolve(ode); sol := convert(sol, trig)

-W(x)*alpha^4+diff(diff(diff(diff(W(x), x), x), x), x) = 0

 

W(x) = _C1*exp(-alpha*x)+_C2*exp(alpha*x)+_C3*sin(alpha*x)+_C4*cos(alpha*x)

 

W(x) = _C1*(cosh(alpha*x)-sinh(alpha*x))+_C2*(cosh(alpha*x)+sinh(alpha*x))+_C3*sin(alpha*x)+_C4*cos(alpha*x)

(3)

L_collection := [indets(sol, specfunc({cos, cosh, sin, sinh}))[]]

[cos(alpha*x), cosh(alpha*x), sin(alpha*x), sinh(alpha*x)]

(4)

``

temp := collect(sol, [sinh, cosh, sin, cos])

W(x) = (-_C1+_C2)*sinh(alpha*x)+(_C1+_C2)*cosh(alpha*x)+_C3*sin(alpha*x)+_C4*cos(alpha*x)

(5)

CL := [coeffs(rhs(temp), L_collection)]NULL

[-_C1+_C2, _C1+_C2, _C3, _C4]

(6)

R:=[seq(cat(_D,i)=CL[i], i=1..nops(CL))]

[_D1 = -_C1+_C2, _D2 = _C1+_C2, _D3 = _C3, _D4 = _C4]

(7)

MX:= subs((rhs=lhs)~(R), temp);

W(x) = _D1*sinh(alpha*x)+_D2*cosh(alpha*x)+_D3*sin(alpha*x)+_D4*cos(alpha*x)

(8)

boundary_condition_1 := simplify(rhs(eval(diff(MX, `$`(x, 1)), x = 0))/alpha = 0)

_D1+_D3 = 0

(9)

boundary_condition_2 := simplify(rhs(eval(MX, x = 0)) = 0)

_D2+_D4 = 0

(10)

boundary_condition_3 := simplify(rhs(eval(diff(MX, `$`(x, 1)), x = L))/alpha = 0)

cosh(alpha*L)*_D1+sinh(alpha*L)*_D2+cos(alpha*L)*_D3-sin(alpha*L)*_D4 = 0

(11)

boundary_condition_4 := simplify(rhs(eval(MX, x = L)) = 0)

_D1*sinh(alpha*L)+_D2*cosh(alpha*L)+_D3*sin(alpha*L)+_D4*cos(alpha*L) = 0

(12)

boundary_condition_solve := solve([boundary_condition_1, boundary_condition_2, boundary_condition_3, boundary_condition_4]); MX := eval(MX, boundary_condition_solve)

Warning, solutions may have been lost

 

{L = L, _D1 = -_D3, _D2 = -_D4, _D3 = _D3, _D4 = _D4, alpha = 0}, {L = 0, _D1 = -_D3, _D2 = -_D4, _D3 = _D3, _D4 = _D4, alpha = alpha}, {L = L, _D1 = 0, _D2 = 0, _D3 = 0, _D4 = 0, alpha = alpha}

 

Error, invalid input: eval received ({L = L, _D1 = -_D3, _D2 = -_D4, _D3 = _D3, _D4 = _D4, alpha = 0}, {L = 0, _D1 = -_D3, _D2 = -_D4, _D3 = _D3, _D4 = _D4, alpha = alpha}, {L = L, _D1 = 0, _D2 = 0, _D3 = 0, _D4 = 0, alpha = alpha}), which is not valid for its 2nd argument, eqns

 

``


 

Download Free_Vibration_Euler_Bernouli_Beam_1.mw

I have tried to solve these 4 equations to get the characteristic equation and finally the solution of the PDE.  But it shows some error. Can you please help with this issue?

How to draw an ellipse in a rectangle ? Thank you.

Hello,

I tried to solve an inequality involving factorials using solve, but I failed. The code is 

solve(1/(n+1)!<0.0001,n)

n should be 7.

Maple returns me "Warning, solutions may have been lost" message. 

How can I solve an inequality like this using solve?

I worked around this with a for loop testing the value of the expression for every increasing value of n against the criteria. Is there a "magical" keyword that will help with solve? 

 

 

sqrt(4) gives 2 in CAS systems, since the principal root is returned by default. 

Is there an option to have Maple return all roots? Which in this case 2,-2?

I'll explain the context why I need this.

When I solve an ODE, I get a solution that I need to solve for constant of integration C from initial conditions. For an example assume the ODE becomes, after replacing initial condition the following  eq:=4^(1/2) = -2+_C1;

So now when solving for _C1  in maple and then calling simplify, gives one solution which _C1=4 (case root=2) which when replaced back into the general solution gives the particular solution.

But this means the second solution is lost, which is when _C1=0  (case root=-2) which could have been obtained from the non-principal root of 4^(1/2)

eq:=4^(1/2) = -2+_C;
solve(eq,_C);

gives 

And I would like to get {4,0} instead.

In practice, this becomes important.

Here is an actual ODE, which should have 2 solutions. Mathematica gives both solutions, and Maple gives one solution.  This is due to the above.

ode:=diff(y(x),x)-y(x)=x*y(x)^(1/2);
ic:=y(0)=4;
dsolve([ode,ic])

In Mathematica

ode=y'[x]-y[x]==x*y[x]^(1/2);
ic={y[0]==4};
sol=DSolve[{ode,ic},y[x],x]

The second solution above came from when constant of integration is zero. The first solution is the one Maple  gave (when expanded).

When I worked the solution by hand, I tracked this to issue with sqrt(4) giving 2 and not +2,-2 when doing solve() to solve for C at the end.

I could ofcourse leave C=sqrt(4)  and not call simplify  on it  and that works.

But I thought to ask here to see if there is some option in Maple, so that when it sees (n)^m to return all m roots when calling solve() and not just the principal one. Even for m=2. 

I looked at root and tried allsolutions=true but they did not help. Looked at solve/details and did not spot something. I tried only few of the options there, as there are so many.

Any suggestions what to try?

 

Suppose that S={u1,u2,u3,u4}⊂ℝ5  where

u1=< 

u2=< -163, 171, 218, -92>

u3=< -287, 73, -284, -115>

u4=<-32, 172, 206, -180>

v=< 761, -1381, 7566, 3492>

The vector v  is in the span of S  written in the form

 

αu1+βu2+γu3+δu4 .

 

Find a possible set of values for α, β, γ, δ.  Enter the values of α, β, γ, δ  as a sequence in the box below

 

Suppose that 

u1=<388, -635, -480, 554, -288, 732, -118>

u2=< -987, 789, 487, -919, 248, 994, -807>

u3=-316, -470, -522, -769, -159, 629, 806>

u4=<381, 740, -834, 722, -46, 49, 795>

 

Suppose that Av=(b1  b2  ⋯  b7)^T .

       Enter the value of b1  in the box below.

 

Can anyone help with this question with a step by step solution. TIA.

      

I am trying to use this command

plot({0, 2*x^2, 2*x^2 - 2*x^3 + 8/3*x^4 - 4*x^5}, x = -10 .. 10, color = ["DarkGreen", "CornflowerBlue", "Burgundy"])

However, only the last function is showing up. 0 and 2x^2 is not showing up. I can't change the axes sizes because then the last function disappears.

I would like to plot results that combine numerical solutions from odes with polynomials (from a collocation procedure). Here is the part of the worksheet:

What is the best way to plot the approximate solutions here? 

Thanks.

Suppose that S={p1, p2, p3, p4},  where

              p1(x)=  71+73x−153x2−259x3−108x4+245x5,

              p2(x)=  37+189x+287x2−167x3+279x4−51x5,

              p3(x)=  -199−200x−62x2+59x3+262x4−70x5,

              p4(x)= 48+295x+18x2+235x3+209x4+279x5,  and

                p(x)= 6143+20711x+8974x2−30368x3+18964x4+17937x5.

 

To avoid typing errors, you can copy and past the following sequences to your Maple worksheet.

      

 

 

The polynomial p  is a linear combination of S  written in the form

 

αp1+βp2+γp3+δp4 .

 

Find a possible set of values for α, β, γ, δ.  Enter the values of α, β, γ, δ  as a sequence in the box below

 

[α,β,γ,δ]=

 

CAN ANYONE HELP ME WITH THIS QUESTION WITH A STEP BY STEP SOLUTION. TIA.

 

Suppose that S={u1,u2,u3,u4,u5,u6}⊂ℝ5  where

u1=  < 

u2 = <-65, -11, -47, 18, -15>

u3 = <-240, 90, -265, 495, -175:>

u4= <-53, 70, 84, -80, 61>

u5= <9, 0, 46, -55, -37>

u6 =< 176, -280, -520, 540, -96>

Find a possible set of values for λ1, λ2, λ3, λ4, λ5, λ6, not all zero, such that  

 

λ1u1+λ2u2+λ3u3+λ4u4+λ5u5+λ6u6=0 .

 

Enter the values of  λ1, λ2, λ3, λ4, λ5, λ6  as a sequence in the box below

 

[λ1, λ2, λ3, λ4, λ5, λ6]= 

 

Hint: There are infinitely many solutions for λ1, λ2, λ3, λ4, λ5, λ6 .   The solution given by Maple will be in terms of parameters. To get one possible set of values, not all zero, choose some nice values for the parameters.

 

CAN ANYONE HELP ME WITH THIS QUESTION. I DO NOT KNOW HOW TO APPROACH THIS QUESTION. CAN I GET A SETP BY STEP SOLUTION PLS. THANKS.

Hi,

How  to animate ( with animate command)  this situation for Exporting to GIF  animated file ?

Thanks

ComplexeExplore.mw

Dear All.

I hope we are all staying safe.

Please I want to solve Sine Gordon Equation using a numerical method I constructed (non-classical), I need to compare the result of the method with the exact solution to generate the errors. However, since the exact solution has two variables, x, and t, I really don't know how to accommodate the two in my coding.

Can someone be of help in this regard?

Thank you and kind regards

 


Download Discretization_of_Sine_Gordon_Equation.mw

Download Sine_Gordon_Implementation_Trial.mw

 

Hello,

How can I use assmptions in partial differential equations?

For example consider the following differential equation

pde:=diff(u(x,t),t)+alpha*diff(u(x,t),x)=0
sol:=pdsolve(pde,build) assuming alpha=0

This gives me the same solution if alpha!=0

I also tried this

assume(alpha=0)
pde:=diff(u(x,t),t)+alpha*diff(u(x,t),x)=0
sol=pdsolve(pde,build)

I again got the same result as if alpha!=0. Except this time there was a tilde on the right side of alpha (to my knowledge that means there are assumptions on alpha)

How do you apply assumptions in PDEs? 

 

 

Could it be correct ?


 

If L= 1.158R  then half of smallest circle is covered  to proof

 

I derived a formulue for this in GX

 

 

 

restart;

abs(((((((L)^(2)*(-1))+((R)^(2)*4)))^(1/2)*L*(-1/2))+(arctan((((((L)^(2)*(-1))+((R)^(2)*4)))^(1/2)*(L)^((-1))))*(L)^(2))+(arctan((((((L)^(2)*(-1))+((R)^(2)*4)))^(1/2)*(((L)^(2)+((R)^(2)*(-2))))^((-1))*L))*(R)^(2)*(-1))));

abs(-(1/2)*(-L^2+4*R^2)^(1/2)*L+arctan((-L^2+4*R^2)^(1/2)/L)*L^2-arctan((-L^2+4*R^2)^(1/2)*L/(L^2-2*R^2))*R^2)

(1)

verg:=%;

abs(-(1/2)*(-L^2+4*R^2)^(1/2)*L+arctan((-L^2+4*R^2)^(1/2)/L)*L^2-arctan((-L^2+4*R^2)^(1/2)*L/(L^2-2*R^2))*R^2)

(2)

subs(R=1,verg);#  

abs(-(1/2)*(-L^2+4)^(1/2)*L+arctan((-L^2+4)^(1/2)/L)*L^2-arctan((-L^2+4)^(1/2)*L/(L^2-2)))

(3)

verg2:=%

abs(-(1/2)*(-L^2+4)^(1/2)*L+arctan((-L^2+4)^(1/2)/L)*L^2-arctan((-L^2+4)^(1/2)*L/(L^2-2)))

(4)

solve(verg2 = Pi,L); # area half small circle with R=1 => 2*Pi* R^2/2 = Pi ,

Warning, solutions may have been lost

 

L must be expressed in R ?

 

 


 

Download de_koe_in_het_weiland.mw

Hi I was wondering if this is allowed and possible, because of the convienience of being able to call it up with the ?[command name] command, it would be an ideal scenario to write extensive notes for procedures and commands I write myself or written by others that are not part of the original maple install, I forget why and how to use alot of the things i write and this would be convienient for me to have quick access to, also to share with others on here or on stack exchange when maple has a stack exchange community.

First 535 536 537 538 539 540 541 Last Page 537 of 2428