2.1.18 Problem 3 (vi)
Internal
problem
ID
[19676]
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
(vi)
Date
solved
:
Tuesday, March 10, 2026 at 11:55:42 AM
CAS
classification
:
[_exact, _rational, [_1st_order, `_with_symmetry_[F(x),G(x)]`], [_Abel, `2nd type`, `class A`]]
2.1.18.1 Solved using first_order_ode_exact
0.842 (sec)
Entering first order ode exact solver
\begin{align*}
2 t +3 x+\left (3 t -x\right ) x^{\prime }&=t^{2} \\
\end{align*}
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 (3 t -x\right )\mathop {\mathrm {d}x} &= \left (t^{2}-2 t -3 x\right )\mathop {\mathrm {d}t}\\ \left (-t^{2}+2 t +3 x\right )\mathop {\mathrm {d}t} + \left (3 t -x\right )\mathop {\mathrm {d}x} &= 0 \tag {2A} \end{align*}
Comparing (1A) and (2A) shows that
\begin{align*} M(t,x) &= -t^{2}+2 t +3 x\\ N(t,x) &= 3 t -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 (-t^{2}+2 t +3 x\right )\\ &= 3 \end{align*}
And
\begin{align*} \frac {\partial N}{\partial t} &= \frac {\partial }{\partial t} \left (3 t -x\right )\\ &= 3 \end{align*}
Since \(\frac {\partial M}{\partial x}= \frac {\partial N}{\partial t}\), then the ODE is exact The following equations are now set up to solve for the function \(\phi \left (t,x\right )\)
\begin{align*} \frac {\partial \phi }{\partial t } &= M\tag {1} \\ \frac {\partial \phi }{\partial x } &= 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 M\mathop {\mathrm {d}t} \\
\int \frac {\partial \phi }{\partial t} \mathop {\mathrm {d}t} &= \int -t^{2}+2 t +3 x\mathop {\mathrm {d}t} \\
\tag{3} \phi &= -\frac {t \left (t^{2}-3 t -9 x \right )}{3}+ 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} = 3 t+f'(x)
\end{equation}
But equation (2) says that \(\frac {\partial \phi }{\partial x} = 3 t -x\). Therefore equation (4) becomes
\begin{equation}
\tag{5} 3 t -x = 3 t+f'(x)
\end{equation}
Solving equation (5) for \( f'(x)\) gives
\[
f'(x) = -x
\]
Integrating the above w.r.t \(x\) gives
\begin{align*}
\int f'(x) \mathop {\mathrm {d}x} &= \int \left ( -x\right ) \mathop {\mathrm {d}x} \\
f(x) &= -\frac {x^{2}}{2}+ c_1 \\
\end{align*}
\[
\phi = -\frac {t \left (t^{2}-3 t -9 x \right )}{3}-\frac {x^{2}}{2}+ 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 {t \left (t^{2}-3 t -9 x \right )}{3}-\frac {x^{2}}{2}
\]
Simplifying the above gives
\begin{align*}
-\frac {t^{3}}{3}+3 x t +t^{2}-\frac {x^{2}}{2} &= c_1 \\
\end{align*}
Solving for \(x\) gives
\begin{align*}
x &= 3 t -\frac {\sqrt {-6 t^{3}+99 t^{2}-18 c_1}}{3} \\
x &= 3 t +\frac {\sqrt {-6 t^{3}+99 t^{2}-18 c_1}}{3} \\
\end{align*}
|
|
|
| Direction field \(2 t +3 x+\left (3 t -x\right ) x^{\prime } = t^{2}\) | Isoclines for \(2 t +3 x+\left (3 t -x\right ) x^{\prime } = t^{2}\) |
Summary of solutions found
\begin{align*}
x &= 3 t -\frac {\sqrt {-6 t^{3}+99 t^{2}-18 c_1}}{3} \\
x &= 3 t +\frac {\sqrt {-6 t^{3}+99 t^{2}-18 c_1}}{3} \\
\end{align*}
Entering first order ode abel second kind solver
\begin{align*}
2 t +3 x+\left (3 t -x\right ) x^{\prime }&=t^{2} \\
\end{align*}
2.1.18.2 Solved using first_order_ode_abel_second_kind_case_5
0.372 (sec)
Abel first order ode of the second kind has the form
\begin{align} (x+ g)x' &= f_0 + f_1 x+ f_2 x^2 + f_3 x^3\tag {1} \end{align}
Comparing the given ode
\[
2 t +3 x+\left (3 t -x\right ) x^{\prime } = t^{2}
\]
To the form in (1) shows that
\begin{align*} g &=-3 t\\ f_0 &=-t^{2}+2 t\\ f_1 &=3\\ f_2 &=0\\ f_3 &=0 \end{align*}
When the condition \(f_1 = 2 f_2 g - g'\) is satisfied, then this ode has direct solution given by
\begin{align} x &= -g \pm \triangle \tag {2} \end{align}
Where
\begin{align} \triangle = U \sqrt { 2 \int { \frac {f_0+g g' - f_2 g^2}{U^2} \,dt}+ c_1 } \tag {3}\end{align}
And \(U\) is given by
\begin{align} U &= e^{\int {f_2 \,dt}} \tag {4}\end{align}
But \(f_1=3\) and \(2 f_2 g - g'=3\). Hence the condition is satisfied. Calcuating \(U\) from (4) gives
\begin{align*} U &= e^{\int {f_2 \,dt}}\\ U &= e^{\int {0\,dt}}\\ U &= 1 \end{align*}
Substituting the above in (3) gives
\begin{align*} \triangle &= U \sqrt { 2 \int { \frac {f_0+g g' - f_2 g^2}{U^2} \,dt}+ c_1 }\\ &= 1\sqrt { 2 \int { \frac {\left (-t^{2}+2 t\right )+\left (-3 t\right ) \left (-3\right ) - \left (0\right ) \left (9 t^{2}\right )}{1} \,dt}+ c_1 }\\ &= \frac {\sqrt {-6 t^{3}+99 t^{2}+9 c_1}}{3} \end{align*}
Hence from (2) the solution is
\begin{align*}
x &= -g \pm \triangle \\
x &= 3 t +\frac {\sqrt {-6 t^{3}+99 t^{2}+9 c_1}}{3} \\
x &= 3 t -\frac {\sqrt {-6 t^{3}+99 t^{2}+9 c_1}}{3} \\
\end{align*}
|
|
|
| Direction field \(2 t +3 x+\left (3 t -x\right ) x^{\prime } = t^{2}\) | Isoclines for \(2 t +3 x+\left (3 t -x\right ) x^{\prime } = t^{2}\) |
Summary of solutions found
\begin{align*}
x &= 3 t -\frac {\sqrt {-6 t^{3}+99 t^{2}+9 c_1}}{3} \\
x &= 3 t +\frac {\sqrt {-6 t^{3}+99 t^{2}+9 c_1}}{3} \\
\end{align*}
2.1.18.3 Solved using first_order_ode_abel_second_kind_solved_by_converting_to_first_kind
1.362 (sec)
This is Abel second kind ODE, it has the form
\[ \left (x+g\right )x^{\prime }= f_0(t)+f_1(t) x +f_2(t)x^{2}+f_3(t)x^{3} \]
Comparing the above to given ODE which is
\begin{align*}2 t +3 x+\left (3 t -x\right ) x^{\prime } = t^{2}\tag {1} \end{align*}
Shows that
\begin{align*} g &= -3 t\\ f_0 &= -t^{2}+2 t\\ f_1 &= 3\\ f_2 &= 0\\ f_3 &= 0 \end{align*}
Applying transformation
\begin{align*} x&=\frac {1}{u(t)}-g \end{align*}
Results in the new ode which is Abel first kind
\begin{align*} u^{\prime }\left (t \right ) = \left (t^{2}-11 t \right ) u \left (t \right )^{3} \end{align*}
Which is now solved. Entering first order ode separable solverThe ode
\begin{equation}
u^{\prime }\left (t \right ) = t u \left (t \right )^{3} \left (t -11\right )
\end{equation}
is separable as it can be written as
\begin{align*} u^{\prime }\left (t \right )&= t u \left (t \right )^{3} \left (t -11\right )\\ &= f(t) g(u) \end{align*}
Where
\begin{align*} f(t) &= t \left (t -11\right )\\ g(u) &= u^{3} \end{align*}
Integrating gives
\begin{align*}
\int { \frac {1}{g(u)} \,du} &= \int { f(t) \,dt} \\
\int { \frac {1}{u^{3}}\,du} &= \int { t \left (t -11\right ) \,dt} \\
\end{align*}
\[
-\frac {1}{2 u \left (t \right )^{2}}=\frac {1}{3} t^{3}-\frac {11}{2} t^{2}+c_2
\]
We now need to find the singular solutions, these are found by finding for what values \(g(u)\) is zero,
since we had to divide by this above. Solving \(g(u)=0\) or
\[
u^{3}=0
\]
for \(u \left (t \right )\) gives
\begin{align*} u \left (t \right )&=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*}
-\frac {1}{2 u \left (t \right )^{2}} &= \frac {1}{3} t^{3}-\frac {11}{2} t^{2}+c_2 \\
u \left (t \right ) &= 0 \\
\end{align*}
Solving for \(u \left (t \right )\) gives
\begin{align*}
u \left (t \right ) &= 0 \\
u \left (t \right ) &= -\frac {3}{\sqrt {-6 t^{3}+99 t^{2}-18 c_2}} \\
u \left (t \right ) &= \frac {3}{\sqrt {-6 t^{3}+99 t^{2}-18 c_2}} \\
\end{align*}
Now we transform the solution \(u \left (t \right ) = -\frac {3}{\sqrt {-6 t^{3}+99 t^{2}-18 c_2}}\) to \(x\) using \(u \left (t \right )=\frac {1}{-3 t +x}\) which gives
\[
x = -\frac {\sqrt {-6 t^{3}+99 t^{2}-18 c_2}}{3}+3 t
\]
Now we transform the solution \(u \left (t \right ) = \frac {3}{\sqrt {-6 t^{3}+99 t^{2}-18 c_2}}\) to \(x\) using \(u \left (t \right )=\frac {1}{-3 t +x}\) which gives
\[
x = \frac {\sqrt {-6 t^{3}+99 t^{2}-18 c_2}}{3}+3 t
\]
|
|
|
| Direction field \(2 t +3 x+\left (3 t -x\right ) x^{\prime } = t^{2}\) | Isoclines for \(2 t +3 x+\left (3 t -x\right ) x^{\prime } = t^{2}\) |
Summary of solutions found
\begin{align*}
x &= -\frac {\sqrt {-6 t^{3}+99 t^{2}-18 c_2}}{3}+3 t \\
x &= \frac {\sqrt {-6 t^{3}+99 t^{2}-18 c_2}}{3}+3 t \\
\end{align*}
2.1.18.4 ✓ Maple. Time used: 0.003 (sec). Leaf size: 51
ode:=2*t+3*x(t)+(3*t-x(t))*diff(x(t),t) = t^2;
dsolve(ode,x(t), singsol=all);
\begin{align*}
x &= 3 t -\frac {\sqrt {-6 t^{3}+99 t^{2}+18 c_1}}{3} \\
x &= 3 t +\frac {\sqrt {-6 t^{3}+99 t^{2}+18 c_1}}{3} \\
\end{align*}
Maple trace
Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
trying Bernoulli
trying separable
trying inverse linear
trying homogeneous types:
trying Chini
differential order: 1; looking for linear symmetries
trying exact
<- exact successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & 2 t +3 x \left (t \right )+\left (3 t -x \left (t \right )\right ) \left (\frac {d}{d t}x \left (t \right )\right )=t^{2} \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d t}x \left (t \right ) \\ \square & {} & \textrm {Check if ODE is exact}\hspace {3pt} \\ {} & \circ & \textrm {ODE is exact if the lhs is the total derivative of a}\hspace {3pt} C^{2}\hspace {3pt}\textrm {function}\hspace {3pt} \\ {} & {} & \frac {d}{d t}G \left (t , x \left (t \right )\right )=0 \\ {} & \circ & \textrm {Compute derivative of lhs}\hspace {3pt} \\ {} & {} & \frac {\partial }{\partial t}G \left (t , x\right )+\left (\frac {\partial }{\partial x}G \left (t , x\right )\right ) \left (\frac {d}{d t}x \left (t \right )\right )=0 \\ {} & \circ & \textrm {Evaluate derivatives}\hspace {3pt} \\ {} & {} & 3=3 \\ {} & \circ & \textrm {Condition met, ODE is exact}\hspace {3pt} \\ \bullet & {} & \textrm {Exact ODE implies solution will be of this form}\hspace {3pt} \\ {} & {} & \left [G \left (t , x\right )=\mathit {C1} , M \left (t , x\right )=\frac {\partial }{\partial t}G \left (t , x\right ), N \left (t , x\right )=\frac {\partial }{\partial x}G \left (t , x\right )\right ] \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} G \left (t , x\right )\hspace {3pt}\textrm {by integrating}\hspace {3pt} M \left (t , x\right )\hspace {3pt}\textrm {with respect to}\hspace {3pt} t \\ {} & {} & G \left (t , x\right )=\int \left (-t^{2}+2 t +3 x \right )d t +\textit {\_F1} \left (x \right ) \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & G \left (t , x\right )=-\frac {t^{3}}{3}+t^{2}+3 x t +\textit {\_F1} \left (x \right ) \\ \bullet & {} & \textrm {Take derivative of}\hspace {3pt} G \left (t , x\right )\hspace {3pt}\textrm {with respect to}\hspace {3pt} x \\ {} & {} & N \left (t , x\right )=\frac {\partial }{\partial x}G \left (t , x\right ) \\ \bullet & {} & \textrm {Compute derivative}\hspace {3pt} \\ {} & {} & 3 t -x =3 t +\frac {d}{d x}\textit {\_F1} \left (x \right ) \\ \bullet & {} & \textrm {Isolate for}\hspace {3pt} \frac {d}{d x}\textit {\_F1} \left (x \right ) \\ {} & {} & \frac {d}{d x}\textit {\_F1} \left (x \right )=-x \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} \textit {\_F1} \left (x \right ) \\ {} & {} & \textit {\_F1} \left (x \right )=-\frac {x^{2}}{2} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \textit {\_F1} \left (x \right )\hspace {3pt}\textrm {into equation for}\hspace {3pt} G \left (t , x\right ) \\ {} & {} & G \left (t , x\right )=-\frac {1}{3} t^{3}+t^{2}+3 x t -\frac {1}{2} x^{2} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} G \left (t , x\right )\hspace {3pt}\textrm {into the solution of the ODE}\hspace {3pt} \\ {} & {} & -\frac {1}{3} t^{3}+t^{2}+3 x t -\frac {1}{2} x^{2}=\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} x \left (t \right ) \\ {} & {} & \left \{x \left (t \right )=3 t -\frac {\sqrt {-6 t^{3}+99 t^{2}-18 \mathit {C1}}}{3}, x \left (t \right )=3 t +\frac {\sqrt {-6 t^{3}+99 t^{2}-18 \mathit {C1}}}{3}\right \} \end {array} \]
2.1.18.5 ✓ Mathematica. Time used: 0.099 (sec). Leaf size: 67
ode=(2*t+3*x[t])+(3*t-x[t])*D[x[t],t]==t^2;
ic={};
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
\begin{align*} x(t)&\to 3 t-i \sqrt {\frac {2 t^3}{3}-11 t^2-c_1}\\ x(t)&\to 3 t+i \sqrt {\frac {2 t^3}{3}-11 t^2-c_1} \end{align*}
2.1.18.6 ✗ Sympy
from sympy import *
t = symbols("t")
x = Function("x")
ode = Eq(-t**2 + 2*t + (3*t - x(t))*Derivative(x(t), t) + 3*x(t),0)
ics = {}
dsolve(ode,func=x(t),ics=ics)
Timed Out
Python version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0]
Sympy version 1.14.0