2.1.13 problem 3 (i)

Solved as first order separable ode
Solved as first order Exact ode
Maple step by step solution
Maple trace
Maple dsolve solution
Mathematica DSolve solution

Internal problem ID [18176]
Book : Elementary Differential Equations. By R.L.E. Schwarzenberger. Chapman and Hall. London. First Edition (1969)
Section : Chapter 3. Solutions of first-order equations. Exercises at page 47
Problem number : 3 (i)
Date solved : Thursday, December 19, 2024 at 01:52:09 PM
CAS classification : [_separable]

Solve

\begin{align*} 3 t^{2} x-x t +\left (3 t^{3} x^{2}+t^{3} x^{4}\right ) x^{\prime }&=0 \end{align*}

Factoring the ode gives these factors

\begin{align*} \tag{1} x &= 0 \\ \tag{2} x^{\prime } x^{3} t^{2}+3 x^{\prime } x t^{2}+3 t -1 &= 0 \\ \end{align*}

Now each of the above equations is solved in turn.

Solving equation (1)

Solving for \(x\) from

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

Solving gives \(x = 0\)

Solving equation (2)

Solved as first order separable ode

Time used: 0.903 (sec)

The ode \(x^{\prime } = -\frac {3 t -1}{t^{2} x \left (x^{2}+3\right )}\) is separable as it can be written as

\begin{align*} x^{\prime }&= -\frac {3 t -1}{t^{2} x \left (x^{2}+3\right )}\\ &= f(t) g(x) \end{align*}

Where

\begin{align*} f(t) &= -\frac {3 t -1}{t^{2}}\\ g(x) &= \frac {1}{x \left (x^{2}+3\right )} \end{align*}

Integrating gives

\begin{align*} \int { \frac {1}{g(x)} \,dx} &= \int { f(t) \,dt}\\ \int { x \left (x^{2}+3\right )\,dx} &= \int { -\frac {3 t -1}{t^{2}} \,dt}\\ \frac {\left (x^{2}+3\right )^{2}}{4}&=-\frac {1}{t}+\ln \left (\frac {1}{t^{3}}\right )+c_1 \end{align*}

Solving for \(x\) gives

\begin{align*} x &= \frac {\sqrt {t \left (-3 t +2 \sqrt {\ln \left (\frac {1}{t^{3}}\right ) t^{2}+c_1 \,t^{2}-t}\right )}}{t} \\ x &= \frac {\sqrt {-t \left (3 t +2 \sqrt {\ln \left (\frac {1}{t^{3}}\right ) t^{2}+c_1 \,t^{2}-t}\right )}}{t} \\ x &= -\frac {\sqrt {t \left (-3 t +2 \sqrt {\ln \left (\frac {1}{t^{3}}\right ) t^{2}+c_1 \,t^{2}-t}\right )}}{t} \\ x &= -\frac {\sqrt {-t \left (3 t +2 \sqrt {\ln \left (\frac {1}{t^{3}}\right ) t^{2}+c_1 \,t^{2}-t}\right )}}{t} \\ \end{align*}
Figure 2.7: Slope field plot
\(x^{\prime } x^{3} t^{2}+3 x^{\prime } x t^{2}+3 t -1 = 0\)

Summary of solutions found

\begin{align*} x &= \frac {\sqrt {t \left (-3 t +2 \sqrt {\ln \left (\frac {1}{t^{3}}\right ) t^{2}+c_1 \,t^{2}-t}\right )}}{t} \\ x &= \frac {\sqrt {-t \left (3 t +2 \sqrt {\ln \left (\frac {1}{t^{3}}\right ) t^{2}+c_1 \,t^{2}-t}\right )}}{t} \\ x &= -\frac {\sqrt {t \left (-3 t +2 \sqrt {\ln \left (\frac {1}{t^{3}}\right ) t^{2}+c_1 \,t^{2}-t}\right )}}{t} \\ x &= -\frac {\sqrt {-t \left (3 t +2 \sqrt {\ln \left (\frac {1}{t^{3}}\right ) t^{2}+c_1 \,t^{2}-t}\right )}}{t} \\ \end{align*}
Solved as first order Exact ode

Time used: 0.313 (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,x) \mathop {\mathrm {d}t}+ N(t,x) \mathop {\mathrm {d}x}=0 \tag {1A} \]

Therefore

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

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

\begin{align*} M(t,x) &= 3 t -1\\ N(t,x) &= t^{2} x^{3}+3 t^{2} x \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 x} = \frac {\partial N}{\partial t} \]

Using result found above gives

\begin{align*} \frac {\partial M}{\partial x} &= \frac {\partial }{\partial x} \left (3 t -1\right )\\ &= 0 \end{align*}

And

\begin{align*} \frac {\partial N}{\partial t} &= \frac {\partial }{\partial t} \left (t^{2} x^{3}+3 t^{2} x\right )\\ &= 2 t \,x^{3}+6 t x \end{align*}

Since \(\frac {\partial M}{\partial x} \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 x} - \frac {\partial N}{\partial t} \right ) \\ &=\frac {1}{t^{2} x \left (x^{2}+3\right )}\left ( \left ( 0\right ) - \left (2 t \,x^{3}+6 t x \right ) \right ) \\ &=-\frac {2}{t} \end{align*}

Since \(A\) does not depend on \(x\), 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 {2}{t}\mathop {\mathrm {d}t} } \end{align*}

The result of integrating gives

\begin{align*} \mu &= e^{-2 \ln \left (t \right ) } \\ &= \frac {1}{t^{2}} \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 {1}{t^{2}}\left (3 t -1\right ) \\ &= \frac {3 t -1}{t^{2}} \end{align*}

And

\begin{align*} \overline {N} &=\mu N \\ &= \frac {1}{t^{2}}\left (t^{2} x^{3}+3 t^{2} x\right ) \\ &= x \left (x^{2}+3\right ) \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}x}}{\mathop {\mathrm {d}t}} &= 0 \\ \left (\frac {3 t -1}{t^{2}}\right ) + \left (x \left (x^{2}+3\right )\right ) \frac { \mathop {\mathrm {d}x}}{\mathop {\mathrm {d}t}} &= 0 \end{align*}

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

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

Integrating (1) w.r.t. \(t\) gives

\begin{align*} \int \frac {\partial \phi }{\partial t} \mathop {\mathrm {d}t} &= \int \overline {M}\mathop {\mathrm {d}t} \\ \int \frac {\partial \phi }{\partial t} \mathop {\mathrm {d}t} &= \int \frac {3 t -1}{t^{2}}\mathop {\mathrm {d}t} \\ \tag{3} \phi &= \frac {1}{t}+3 \ln \left (t \right )+ f(x) \\ \end{align*}

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

\begin{equation} \tag{4} \frac {\partial \phi }{\partial x} = 0+f'(x) \end{equation}

But equation (2) says that \(\frac {\partial \phi }{\partial x} = x \left (x^{2}+3\right )\). Therefore equation (4) becomes

\begin{equation} \tag{5} x \left (x^{2}+3\right ) = 0+f'(x) \end{equation}

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

\[ f'(x) = x \left (x^{2}+3\right ) \]

Integrating the above w.r.t \(x\) gives

\begin{align*} \int f'(x) \mathop {\mathrm {d}x} &= \int \left ( x \left (x^{2}+3\right )\right ) \mathop {\mathrm {d}x} \\ f(x) &= \frac {\left (x^{2}+3\right )^{2}}{4}+ c_1 \\ \end{align*}

Where \(c_1\) is constant of integration. Substituting result found above for \(f(x)\) into equation (3) gives \(\phi \)

\[ \phi = \frac {1}{t}+3 \ln \left (t \right )+\frac {\left (x^{2}+3\right )^{2}}{4}+ 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 = \frac {1}{t}+3 \ln \left (t \right )+\frac {\left (x^{2}+3\right )^{2}}{4} \]

Solving for \(x\) gives

\begin{align*} x &= \frac {\sqrt {t \left (-3 t +2 \sqrt {-3 \ln \left (t \right ) t^{2}+c_1 \,t^{2}-t}\right )}}{t} \\ x &= \frac {\sqrt {-t \left (3 t +2 \sqrt {-3 \ln \left (t \right ) t^{2}+c_1 \,t^{2}-t}\right )}}{t} \\ x &= -\frac {\sqrt {t \left (-3 t +2 \sqrt {-3 \ln \left (t \right ) t^{2}+c_1 \,t^{2}-t}\right )}}{t} \\ x &= -\frac {\sqrt {-t \left (3 t +2 \sqrt {-3 \ln \left (t \right ) t^{2}+c_1 \,t^{2}-t}\right )}}{t} \\ \end{align*}
Figure 2.8: Slope field plot
\(x^{\prime } x^{3} t^{2}+3 x^{\prime } x t^{2}+3 t -1 = 0\)

Summary of solutions found

\begin{align*} x &= \frac {\sqrt {t \left (-3 t +2 \sqrt {-3 \ln \left (t \right ) t^{2}+c_1 \,t^{2}-t}\right )}}{t} \\ x &= \frac {\sqrt {-t \left (3 t +2 \sqrt {-3 \ln \left (t \right ) t^{2}+c_1 \,t^{2}-t}\right )}}{t} \\ x &= -\frac {\sqrt {t \left (-3 t +2 \sqrt {-3 \ln \left (t \right ) t^{2}+c_1 \,t^{2}-t}\right )}}{t} \\ x &= -\frac {\sqrt {-t \left (3 t +2 \sqrt {-3 \ln \left (t \right ) t^{2}+c_1 \,t^{2}-t}\right )}}{t} \\ \end{align*}
Maple step by step solution
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & 3 t^{2} x-x t +\left (3 t^{3} x^{2}+t^{3} x^{4}\right ) x^{\prime }=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & x^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & x^{\prime }=\frac {-3 t^{2} x+x t}{3 t^{3} x^{2}+t^{3} x^{4}} \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & x^{\prime } x \left (x^{2}+3\right )=-\frac {3 t -1}{t^{2}} \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} t \\ {} & {} & \int x^{\prime } x \left (x^{2}+3\right )d t =\int -\frac {3 t -1}{t^{2}}d t +\mathit {C1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \frac {\left (x^{2}+3\right )^{2}}{4}=-\frac {1}{t}-3 \ln \left (t \right )+\mathit {C1} \end {array} \]

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

Solving time : 0.022 (sec)
Leaf size : 139

dsolve(3*t^2*x(t)-x(t)*t+(3*t^3*x(t)^2+t^3*x(t)^4)*diff(x(t),t) = 0, 
       x(t),singsol=all)
 
\begin{align*} x &= 0 \\ x &= \frac {\sqrt {-3 t^{2}+2 t \sqrt {-t \left (1+3 \ln \left (t \right ) t +t c_1 \right )}}}{t} \\ x &= \frac {\sqrt {-3 t^{2}-2 t \sqrt {-t \left (1+3 \ln \left (t \right ) t +t c_1 \right )}}}{t} \\ x &= -\frac {\sqrt {-3 t^{2}+2 t \sqrt {-t \left (1+3 \ln \left (t \right ) t +t c_1 \right )}}}{t} \\ x &= -\frac {\sqrt {-3 t^{2}-2 t \sqrt {-t \left (1+3 \ln \left (t \right ) t +t c_1 \right )}}}{t} \\ \end{align*}
Mathematica DSolve solution

Solving time : 6.967 (sec)
Leaf size : 157

DSolve[{(3*t^2*x[t]-t*x[t])+(3*t^3*x[t]^2+t^3*x[t]^4)*D[x[t],t]==0,{}}, 
       x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to 0 \\ x(t)\to -\sqrt {-3-\frac {\sqrt {9 t-12 t \log (t)+4 c_1 t-4}}{\sqrt {t}}} \\ x(t)\to \sqrt {-3-\frac {\sqrt {9 t-12 t \log (t)+4 c_1 t-4}}{\sqrt {t}}} \\ x(t)\to -\sqrt {-3+\frac {\sqrt {9 t-12 t \log (t)+4 c_1 t-4}}{\sqrt {t}}} \\ x(t)\to \sqrt {-3+\frac {\sqrt {9 t-12 t \log (t)+4 c_1 t-4}}{\sqrt {t}}} \\ x(t)\to 0 \\ \end{align*}