Differential Equation Solution incorrect with matlab compared to maple
Afficher commentaires plus anciens
Hello everyone, currently I am trying to solve a differential equation relating to a beam problem, the problem I am having is that is seems maple gives better results for the exact solution than matlab does, in fact, the solution i am getting from matlab is pretty unusable.
I have a feeling the issue is with my code, of course, but I cannot seem to find it.
Here is the differential equation:

EI = 10000*[2-(x/L)] , q = 40 * (x/L)^2, and L = 10
Here is the result of maple code

as well as it's plot

Here is the code I am running, as can be seen in wSol(x), it is imaginary, which is pretty contrary to what Maple provides.
syms x w(x)
L=10;
q0=40;
a0=10000;
M1=-1000;
Q1=-100;
q=q0*(x/L)^2;
EI=a0*(2-(x/L));
Dw = diff(w,x) ;
D2w = diff(w,x,2);
D3w = diff(w,x,3);
deq = diff(EI*diff(w,x,2),x,2)==q;
cond1 = w(0)==0;
cond2 = Dw(0)==0;
cond3 = D2w(L)==M1/subs(EI,L);
cond4 = D3w(L)==(Q1-(subs(diff(EI,x),L)*M1/subs(EI,L)))/subs(EI,L);
conds=[cond1 cond2 cond3 cond4]
wSol(x) = dsolve(deq,conds)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Calculus dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
