MATLAB: I get explicit solution not found , how to view the solution

explicit solution (system of higher order differential equations )

syms x(t) y(t)
dx = diff(x,t)
dx2=diff(x,t,2)
dy = diff(y,t)
dy2=diff(y,t,2)
eqns = [dx2 + dx2 == y - 2*dx*dy + 2*(dx).^2+cos(t), dy2 == 2*y + x*dy];
conds = [y(0)==0, dy(0)==1, x(0)==0, dx(0)==0];
sol = dsolve(eqns,conds)

Best Answer

If you temporarily leave out the conditions on the derivatives, then Maple says that the solution is
x(t) = -ln(-2*(-(1/2)*MathieuC(0, -1, (1/2)*t)-_C2*MathieuS(0, -1, (1/2)*t))/(MathieuSPrime(0, -1, (1/2)*t)*MathieuC(0, -1, (1/2)*t)-MathieuCPrime(0, -1, (1/2)*t)*MathieuS(0, -1, (1/2)*t)))-(2*I)*Pi*_Z1
y(t) = 0
where _Z1 is an arbitrary integer (that is, there is a family of solutions spaced 2*Pi*I apart) and _C2 is a constant of integration.
Now let us consider dy(0)==1 . But y(t) is the constant 0, so dy is the constant 0, so dy(0) can never be 1.
The system is potentially inconsistent. (I say "potentially" because Maple does not always find all of the potential solutions.)
The condition dx(0)=0 is fine: it can be resolved as _C2 = 0