I am given a solution $v_1$(t)=$-e^{t/2}cost$ for a system of first order ODE and I am asked to verify this solution can solves the linear second order ODE in terms of $y_1$(t)

Here is the matrix ODE [![enter image description] After get $y_2$(t), I copy the output of y2[t] and use D to take its derivative`

D[(-2 y1[t] + y1[t] - 2 Derivative[1][y1][t])/(
 2 + 3 Cos[t] Sin[t]), t]

Next, I equate $y_2'$(t) to the second component of the coefficient matrix (second row of the matrix), and finally, i obtained second ODE in terms of $y_1$(t), $y_1'$(t) and $y_1''$(t) (*)

{-(((3 Cos[t]^2 - 3 Sin[t]^2) (-2 y1[t] + 3 Cos[t]^2 y1[t] - 
    2 Derivative[1][y1][t]))/(2 + 3 Cos[t] Sin[t])^2) + (-6 Cos[
   t] Sin[t] y1[t] - 2 Derivative[1][y1][t] + 
 3 Cos[t]^2 Derivative[1][y1][t] - 2 (Prime])[t]}]


Sorry if it is hard to follow, it is quite messy to right details but basically i have the matrix ode and i used mathematica to rearrange the equation and then substitution so that finally i get a single second ODE with only $y_1$(t) $y_1’$(t) and $y_1’’$(t). Then i plug in the solution i have into this equation and verify that it is 0. But i can’t get it and i am not sure if it is due to systax error or any possible mistakes i could get during computing with mathematica.

Is there any syntax errors or any mistakes I have made throughout the process? Any help please :):). Thank you very much

  • 1
    $\begingroup$ I am given a solution for a system of first order ODE Where is the solution you are given? I do not see it? is it the v1 there? Your question is a little hard to follow. $\endgroup$
    – Nasser
    Apr 26, 2018 at 6:29
  • $\begingroup$ @Nasser Sorry for that i have edited the post little bit. Could you try to help me with that? Thanks so much :):) $\endgroup$
    – user57821
    Apr 26, 2018 at 6:40
  • $\begingroup$ I don't think $y_1(t)=e^{-t/2} \cos (t)$ is a solution; and Mathematica is telling you so. $\endgroup$
    – ulvi
    Apr 26, 2018 at 6:53
  • $\begingroup$ @ulvi it is $-e^{t/2}cos(t)$.The question i had is verify that $v_1$(t) can solve the second ODE i have just found in terms of $y_1$(t).... so it should be 0 when i plug the solution in :( $\endgroup$
    – user57821
    Apr 26, 2018 at 6:59
  • $\begingroup$ @tabitha96 It is not nice, towards someone who answered, to delete a topic without notice. $\endgroup$
    – Kuba
    Apr 26, 2018 at 7:57

1 Answer 1


The solution you gives does not satisfy the ODE?

\begin{align*} \begin{pmatrix} y_{1}^{\prime}\\ y_{2}^{\prime} \end{pmatrix} = \begin{pmatrix} a_{11} & a_{12}\\ a_{21} & a_{22} \end{pmatrix} \begin{pmatrix} y_{1}\\ y_{2} \end{pmatrix} \end{align*}

Hence \begin{align*} y_{1}^{\prime} & =a_{11}y_{1}+a_{12}y_{2}\\ y_{2}^{\prime} & =a_{21}y_{1}+a_{22}y_{2} \end{align*}

But $y_{1}=y$ and $y_{2}=y^{\prime}$, therefore the above becomes

\begin{align*} y_{1}^{\prime} & =a_{11}y+a_{12}y^{\prime}\\ y_{2}^{\prime} & =a_{21}y+a_{22}y^{\prime} \end{align*}

And also $y_{1}^{\prime}=y^{\prime},y_{2}^{\prime}=y^{\prime\prime}$, therefore the above becomes

\begin{align*} y^{\prime} & =a_{11}y+a_{12}y^{\prime}\\ y^{\prime\prime} & =a_{21}y+a_{22}y^{\prime} \end{align*}

Solving for $y^{\prime}$ from first equation above gives $y^{\prime} =\frac{a_{11}y}{1-a_{12}}$. Substituting this in the second equation gives

\begin{align*} y^{\prime\prime}=a_{21}y+a_{22}\frac{a_{11}y}{\left( 1-a_{12}\right) } \end{align*}


\begin{align*} y^{\prime\prime}=\left( a_{21}+a_{22}\frac{a_{11}}{1-a_{12}}\right) y \end{align*}

To verify that $v\left( t\right) =-e^{\frac{t}{2}}\cos\left( t\right) $ is a solution, plugin into the above and see if it satisfies it.

a={{-1+3/2Cos[t]^2,1-3/2 Sin[t]Cos[t]},
  {-1-3/2 Sin[t]Cos[t],-1+3/2 Sin[t]^2}};

Mathematica graphics

ode=y''[t]==(a[[2,1]] +a[[2,2]] a[[1,1]] /(1-a[[1,2]]))y[t];

Mathematica graphics

v[t_]:=-Exp[t/2] Cos[t];

Mathematica graphics

It does not satisfy it. If it did, we'll get True at the end.

Are you sure -Exp[t/2] Cos[t] is supposed to be a solution?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.