3.12 problem 12

3.12.1 Existence and uniqueness analysis
3.12.2 Solved as first order linear ode
3.12.3 Solved as first order separable ode
3.12.4 Solved as first order homogeneous class D2 ode
3.12.5 Solved as first order Exact ode
3.12.6 Maple step by step solution
3.12.7 Maple trace
3.12.8 Maple dsolve solution
3.12.9 Mathematica DSolve solution

Internal problem ID [2329]
Book : Differential equations and their applications, 3rd ed., M. Braun
Section : Section 1.4. Page 24
Problem number : 12
Date solved : Thursday, October 17, 2024 at 02:23:49 AM
CAS classification : [_separable]

Solve

\begin{align*} 3 t y^{\prime }&=\cos \left (t \right ) y \end{align*}

With initial conditions

\begin{align*} y \left (1\right )&=0 \end{align*}

3.12.1 Existence and uniqueness analysis

This is a linear ODE. In canonical form it is written as

\begin{align*} y^{\prime } + q(t)y &= p(t) \end{align*}

Where here

\begin{align*} q(t) &=-\frac {\cos \left (t \right )}{3 t}\\ p(t) &=0 \end{align*}

Hence the ode is

\begin{align*} y^{\prime }-\frac {\cos \left (t \right ) y}{3 t} = 0 \end{align*}

The domain of \(q(t)=-\frac {\cos \left (t \right )}{3 t}\) is

\[ \{t <0\boldsymbol {\lor }0<t\} \]

And the point \(t_0 = 1\) is inside this domain. Hence solution exists and is unique.

3.12.2 Solved as first order linear ode

Time used: 0.137 (sec)

In canonical form a linear first order is

\begin{align*} y^{\prime } + q(t)y &= p(t) \end{align*}

Comparing the above to the given ode shows that

\begin{align*} q(t) &=-\frac {\cos \left (t \right )}{3 t}\\ p(t) &=0 \end{align*}

The integrating factor \(\mu \) is

\begin{align*} \mu &= e^{\int {q\,dt}}\\ &= {\mathrm e}^{\int -\frac {\cos \left (t \right )}{3 t}d t}\\ &= {\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}} \end{align*}

The ode becomes

\begin{align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}t}} \mu y &= 0 \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}t}} \left (y \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}\right ) &= 0 \end{align*}

Integrating gives

\begin{align*} y \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}&= \int {0 \,dt} + c_1 \\ &=c_1 \end{align*}

Dividing throughout by the integrating factor \({\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}\) gives the final solution

\[ y = {\mathrm e}^{\frac {\operatorname {Ci}\left (t \right )}{3}} c_1 \]

Solving for the constant of integration from initial conditions, the solution becomes

\begin{align*} y = 0 \end{align*}

(a) Solution plot
\(y = 0\)

(b) Slope field plot
\(3 t y^{\prime } = \cos \left (t \right ) y\)
3.12.3 Solved as first order separable ode

Time used: 0.156 (sec)

The ode \(y^{\prime } = \frac {\cos \left (t \right ) y}{3 t}\) is separable as it can be written as

\begin{align*} y^{\prime }&= \frac {\cos \left (t \right ) y}{3 t}\\ &= f(t) g(y) \end{align*}

Where

\begin{align*} f(t) &= \frac {\cos \left (t \right )}{3 t}\\ g(y) &= y \end{align*}

Integrating gives

\begin{align*} \int { \frac {1}{g(y)} \,dy} &= \int { f(t) \,dt}\\ \int { \frac {1}{y}\,dy} &= \int { \frac {\cos \left (t \right )}{3 t} \,dt}\\ \ln \left (y\right )&=\frac {\operatorname {Ci}\left (t \right )}{3}+c_1 \end{align*}

We now need to find the singular solutions, these are found by finding for what values \(g(y)\) is zero, since we had to divide by this above. Solving \(g(y)=0\) or \(y=0\) for \(y\) gives

\begin{align*} y&=0 \end{align*}

Now we go over each such singular solution and check if it verifies the ode itself and any initial conditions given. If it does not then the singular solution will not be used.

Therefore the solutions found are

\begin{align*} \ln \left (y\right ) = \frac {\operatorname {Ci}\left (t \right )}{3}+c_1\\ y = 0 \end{align*}

(a) Solution plot
\(y = 0\)

(b) Slope field plot
\(3 t y^{\prime } = \cos \left (t \right ) y\)
3.12.4 Solved as first order homogeneous class D2 ode

Time used: 0.127 (sec)

Applying change of variables \(y = u \left (t \right ) t\), then the ode becomes

\begin{align*} 3 t \left (u^{\prime }\left (t \right ) t +u \left (t \right )\right ) = \cos \left (t \right ) u \left (t \right ) t \end{align*}

Which is now solved In canonical form a linear first order is

\begin{align*} u^{\prime }\left (t \right ) + q(t)u \left (t \right ) &= p(t) \end{align*}

Comparing the above to the given ode shows that

\begin{align*} q(t) &=-\frac {\cos \left (t \right )-3}{3 t}\\ p(t) &=0 \end{align*}

The integrating factor \(\mu \) is

\begin{align*} \mu &= e^{\int {q\,dt}}\\ &= {\mathrm e}^{\int -\frac {\cos \left (t \right )-3}{3 t}d t}\\ &= t \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}} \end{align*}

The ode becomes

\begin{align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}t}} \mu u &= 0 \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}t}} \left (u t \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}\right ) &= 0 \end{align*}

Integrating gives

\begin{align*} u t \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}&= \int {0 \,dt} + c_1 \\ &=c_1 \end{align*}

Dividing throughout by the integrating factor \(t \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}\) gives the final solution

\[ u \left (t \right ) = \frac {{\mathrm e}^{\frac {\operatorname {Ci}\left (t \right )}{3}} c_1}{t} \]

Converting \(u \left (t \right ) = \frac {{\mathrm e}^{\frac {\operatorname {Ci}\left (t \right )}{3}} c_1}{t}\) back to \(y\) gives

\begin{align*} y = {\mathrm e}^{\frac {\operatorname {Ci}\left (t \right )}{3}} c_1 \end{align*}

Solving for the constant of integration from initial conditions, the solution becomes

\begin{align*} y = 0 \end{align*}

(a) Solution plot
\(y = 0\)

(b) Slope field plot
\(3 t y^{\prime } = \cos \left (t \right ) y\)
3.12.5 Solved as first order Exact ode

Time used: 0.156 (sec)

To solve an ode of the form

\begin{equation} M\left ( x,y\right ) +N\left ( x,y\right ) \frac {dy}{dx}=0\tag {A}\end{equation}

We assume there exists a function \(\phi \left ( x,y\right ) =c\) where \(c\) is constant, that satisfies the ode. Taking derivative of \(\phi \) w.r.t. \(x\) gives

\[ \frac {d}{dx}\phi \left ( x,y\right ) =0 \]

Hence

\begin{equation} \frac {\partial \phi }{\partial x}+\frac {\partial \phi }{\partial y}\frac {dy}{dx}=0\tag {B}\end{equation}

Comparing (A,B) shows that

\begin{align*} \frac {\partial \phi }{\partial x} & =M\\ \frac {\partial \phi }{\partial y} & =N \end{align*}

But since \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) then for the above to be valid, we require that

\[ \frac {\partial M}{\partial y}=\frac {\partial N}{\partial x}\]

If the above condition is satisfied, then the original ode is called exact. We still need to determine \(\phi \left ( x,y\right ) \) but at least we know now that we can do that since the condition \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) is satisfied. If this condition is not satisfied then this method will not work and we have to now look for an integrating factor to force this condition, which might or might not exist. The first step is to write the ODE in standard form to check for exactness, which is

\[ M(t,y) \mathop {\mathrm {d}t}+ N(t,y) \mathop {\mathrm {d}y}=0 \tag {1A} \]

Therefore

\begin{align*} \left (3 t\right )\mathop {\mathrm {d}y} &= \left (\cos \left (t \right ) y\right )\mathop {\mathrm {d}t}\\ \left (-\cos \left (t \right ) y\right )\mathop {\mathrm {d}t} + \left (3 t\right )\mathop {\mathrm {d}y} &= 0 \tag {2A} \end{align*}

Comparing (1A) and (2A) shows that

\begin{align*} M(t,y) &= -\cos \left (t \right ) y\\ N(t,y) &= 3 t \end{align*}

The next step is to determine if the ODE is is exact or not. The ODE is exact when the following condition is satisfied

\[ \frac {\partial M}{\partial y} = \frac {\partial N}{\partial t} \]

Using result found above gives

\begin{align*} \frac {\partial M}{\partial y} &= \frac {\partial }{\partial y} \left (-\cos \left (t \right ) y\right )\\ &= -\cos \left (t \right ) \end{align*}

And

\begin{align*} \frac {\partial N}{\partial t} &= \frac {\partial }{\partial t} \left (3 t\right )\\ &= 3 \end{align*}

Since \(\frac {\partial M}{\partial y} \neq \frac {\partial N}{\partial t}\), then the ODE is not exact. Since the ODE is not exact, we will try to find an integrating factor to make it exact. Let

\begin{align*} A &= \frac {1}{N} \left (\frac {\partial M}{\partial y} - \frac {\partial N}{\partial t} \right ) \\ &=\frac {1}{3 t}\left ( \left ( -\cos \left (t \right )\right ) - \left (3 \right ) \right ) \\ &=\frac {-\frac {\cos \left (t \right )}{3}-1}{t} \end{align*}

Since \(A\) does not depend on \(y\), then it can be used to find an integrating factor. The integrating factor \(\mu \) is

\begin{align*} \mu &= e^{ \int A \mathop {\mathrm {d}t} } \\ &= e^{\int \frac {-\frac {\cos \left (t \right )}{3}-1}{t}\mathop {\mathrm {d}t} } \end{align*}

The result of integrating gives

\begin{align*} \mu &= e^{-\frac {\operatorname {Ci}\left (t \right )}{3}-\ln \left (t \right ) } \\ &= \frac {{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}}{t} \end{align*}

\(M\) and \(N\) are multiplied by this integrating factor, giving new \(M\) and new \(N\) which are called \(\overline {M}\) and \(\overline {N}\) for now so not to confuse them with the original \(M\) and \(N\).

\begin{align*} \overline {M} &=\mu M \\ &= \frac {{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}}{t}\left (-\cos \left (t \right ) y\right ) \\ &= -\frac {\cos \left (t \right ) y \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}}{t} \end{align*}

And

\begin{align*} \overline {N} &=\mu N \\ &= \frac {{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}}{t}\left (3 t\right ) \\ &= 3 \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}} \end{align*}

Now a modified ODE is ontained from the original ODE, which is exact and can be solved. The modified ODE is

\begin{align*} \overline {M} + \overline {N} \frac { \mathop {\mathrm {d}y}}{\mathop {\mathrm {d}t}} &= 0 \\ \left (-\frac {\cos \left (t \right ) y \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}}{t}\right ) + \left (3 \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}\right ) \frac { \mathop {\mathrm {d}y}}{\mathop {\mathrm {d}t}} &= 0 \end{align*}

The following equations are now set up to solve for the function \(\phi \left (t,y\right )\)

\begin{align*} \frac {\partial \phi }{\partial t } &= \overline {M}\tag {1} \\ \frac {\partial \phi }{\partial y } &= \overline {N}\tag {2} \end{align*}

Integrating (2) w.r.t. \(y\) gives

\begin{align*} \int \frac {\partial \phi }{\partial y} \mathop {\mathrm {d}y} &= \int \overline {N}\mathop {\mathrm {d}y} \\ \int \frac {\partial \phi }{\partial y} \mathop {\mathrm {d}y} &= \int 3 \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}\mathop {\mathrm {d}y} \\ \tag{3} \phi &= 3 y \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}+ f(t) \\ \end{align*}

Where \(f(t)\) is used for the constant of integration since \(\phi \) is a function of both \(t\) and \(y\). Taking derivative of equation (3) w.r.t \(t\) gives

\begin{equation} \tag{4} \frac {\partial \phi }{\partial t} = -\frac {\cos \left (t \right ) y \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}}{t}+f'(t) \end{equation}

But equation (1) says that \(\frac {\partial \phi }{\partial t} = -\frac {\cos \left (t \right ) y \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}}{t}\). Therefore equation (4) becomes

\begin{equation} \tag{5} -\frac {\cos \left (t \right ) y \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}}{t} = -\frac {\cos \left (t \right ) y \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}}{t}+f'(t) \end{equation}

Solving equation (5) for \( f'(t)\) gives

\[ f'(t) = 0 \]

Therefore

\[ f(t) = c_1 \]

Where \(c_1\) is constant of integration. Substituting this result for \(f(t)\) into equation (3) gives \(\phi \)

\[ \phi = 3 y \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}}+ c_1 \]

But since \(\phi \) itself is a constant function, then let \(\phi =c_2\) where \(c_2\) is new constant and combining \(c_1\) and \(c_2\) constants into the constant \(c_1\) gives the solution as

\[ c_1 = 3 y \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}} \]

Solving for the constant of integration from initial conditions, the solution becomes

\begin{align*} 3 y \,{\mathrm e}^{-\frac {\operatorname {Ci}\left (t \right )}{3}} = 0 \end{align*}
Figure 79: Slope field plot
\(3 t y^{\prime } = \cos \left (t \right ) y\)
3.12.6 Maple step by step solution
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [3 t \left (\frac {d}{d t}y \left (t \right )\right )=\cos \left (t \right ) y \left (t \right ), y \left (1\right )=0\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d t}y \left (t \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d t}y \left (t \right )=\frac {\cos \left (t \right ) y \left (t \right )}{3 t} \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {\frac {d}{d t}y \left (t \right )}{y \left (t \right )}=\frac {\cos \left (t \right )}{3 t} \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} t \\ {} & {} & \int \frac {\frac {d}{d t}y \left (t \right )}{y \left (t \right )}d t =\int \frac {\cos \left (t \right )}{3 t}d t +\mathit {C1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \ln \left (y \left (t \right )\right )=\frac {\mathrm {Ci}\left (t \right )}{3}+\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \left (t \right ) \\ {} & {} & y \left (t \right )={\mathrm e}^{\frac {\mathrm {Ci}\left (t \right )}{3}+\mathit {C1}} \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (1\right )=0 \\ {} & {} & 0={\mathrm e}^{\frac {\mathrm {Ci}\left (1\right )}{3}+\mathit {C1}} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} \textit {\_C1} \\ {} & {} & \mathit {C1} =\left (\right ) \\ \bullet & {} & \textrm {Solution does not satisfy initial condition}\hspace {3pt} \end {array} \]

3.12.7 Maple trace
`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
<- 1st order linear successful`
 
3.12.8 Maple dsolve solution

Solving time : 0.004 (sec)
Leaf size : 5

dsolve([3*diff(y(t),t)*t = cos(t)*y(t), 
       op([y(1) = 0])],y(t),singsol=all)
 
\[ y = 0 \]
3.12.9 Mathematica DSolve solution

Solving time : 0.001 (sec)
Leaf size : 6

DSolve[{3*t*D[y[t],t] == Cos[t]*y[t],y[1]==0}, 
       y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to 0 \]