I can't understand the solution of multiple differential equations in Matlab. In this example, I'm trying to work with independent equations: the program should solve them separately (and it does, see below) and together (it doesn't!), shouldn't it?
_{N.B. The equations describe the elastic line according to Euler Bernoulli. I'd like to use them, just setting the appropriate intitial conditions and known data for each problem.}
This is the part of code in common with both procedures:
Creating symbolic functions
syms v(z) w(z)
syms B Chiterm p mx by l A Eterm p bz
Differentiating
D1v = diff(v,z);
D2v = diff(v,z,2);
D3v = diff(v,z,3);
D4v = diff(v,z,4);
D1w = diff(w,z);
D2w = diff(w,z,2);
Setting known values (and parameters, like p )
by=p;
Chiterm=0;
mx=0
bz=0;
Eterm=0
Defining differential equations
odetrasv = diff(B*(diff(v,z,2)+Chiterm),z,2)mxby == 0;
odelong = diff(A*(diff(w,z)Eterm),z)+bz == 0;
Defining initial conditions
cond1 = B*D2v(l) == 0;
cond2 = D1v(0) == 0;
cond3 = v(0) == 0;
cond4 = v(l) == 0;
cond5 = D1w(l) == 0;
cond6 = w(0) == 0;
Here is the part of the code that solves the equations separately:
condstrasv = [cond1 cond2 cond3 cond4];
condslong = [cond5 cond6];
vSol(z) = dsolve(odetrasv, condstrasv);
wSol(z) = dsolve(odelong, condslong);
vSol = simplify(vSol)
wSol = simplify(wSol)
Here's the part that is not working. I'm trying to solve them togheter, since the next step is solving a system of multiple equations:
odes = [odetrasv; odelong];
conds = [cond1; cond2; cond3; cond4; cond5; cond6];
[vSol(z), wSol(z)] = dsolve(odes,conds)
Matlab returns:
Error using Mupadengine/feval  Invalid initial conditions
Error in dsolve>mupadDsolve  T=feval(symengine,'symobj::dsolve',sys....
Error in dsolve  sol = mupadDsolve(args, options);
Why are the initial conditions invalid in the second case? Solving without them works:
[vSol(z), wSol(z)] = dsolve(odes)
