2.1.4 Problem 1.1.4
Internal
problem
ID
[13204]
Book
:
Handbook
of
exact
solutions
for
ordinary
differential
equations.
By
Polyanin
and
Zaitsev.
Second
edition
Section
:
Chapter
1,
First-Order
differential
equations
Problem
number
:
1.1.4
Date
solved
:
Sunday, January 18, 2026 at 06:41:42 PM
CAS
classification
:
[_linear]
2.1.4.1 Solved using first_order_ode_linear
0.094 (sec)
Entering first order ode linear solver
\begin{align*}
g \left (x \right ) y^{\prime }&=f_{1} \left (x \right ) y+f_{0} \left (x \right ) \\
\end{align*}
In canonical form a linear first order is \begin{align*} y^{\prime } + q(x)y &= p(x) \end{align*}
Comparing the above to the given ode shows that
\begin{align*} q(x) &=-\frac {f_{1} \left (x \right )}{g \left (x \right )}\\ p(x) &=\frac {f_{0} \left (x \right )}{g \left (x \right )} \end{align*}
The integrating factor \(\mu \) is
\begin{align*} \mu &= e^{\int {q\,dx}}\\ &= {\mathrm e}^{\int -\frac {f_{1} \left (x \right )}{g \left (x \right )}d x}\\ &= {\mathrm e}^{\int -\frac {f_{1} \left (x \right )}{g \left (x \right )}d x} \end{align*}
The ode becomes
\begin{align*}
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \mu p \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \left (\mu \right ) \left (\frac {f_{0} \left (x \right )}{g \left (x \right )}\right ) \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (y \,{\mathrm e}^{\int -\frac {f_{1} \left (x \right )}{g \left (x \right )}d x}\right ) &= \left ({\mathrm e}^{\int -\frac {f_{1} \left (x \right )}{g \left (x \right )}d x}\right ) \left (\frac {f_{0} \left (x \right )}{g \left (x \right )}\right ) \\
\mathrm {d} \left (y \,{\mathrm e}^{\int -\frac {f_{1} \left (x \right )}{g \left (x \right )}d x}\right ) &= \left (\frac {f_{0} \left (x \right ) {\mathrm e}^{\int -\frac {f_{1} \left (x \right )}{g \left (x \right )}d x}}{g \left (x \right )}\right )\, \mathrm {d} x \\
\end{align*}
Integrating gives \begin{align*} y \,{\mathrm e}^{\int -\frac {f_{1} \left (x \right )}{g \left (x \right )}d x}&= \int {\frac {f_{0} \left (x \right ) {\mathrm e}^{\int -\frac {f_{1} \left (x \right )}{g \left (x \right )}d x}}{g \left (x \right )} \,dx} \\ &=\int \frac {f_{0} \left (x \right ) {\mathrm e}^{\int -\frac {f_{1} \left (x \right )}{g \left (x \right )}d x}}{g \left (x \right )}d x + c_1 \end{align*}
Dividing throughout by the integrating factor \({\mathrm e}^{\int -\frac {f_{1} \left (x \right )}{g \left (x \right )}d x}\) gives the final solution
\[ y = {\mathrm e}^{\int \frac {f_{1} \left (x \right )}{g \left (x \right )}d x} \left (\int \frac {f_{0} \left (x \right ) {\mathrm e}^{\int -\frac {f_{1} \left (x \right )}{g \left (x \right )}d x}}{g \left (x \right )}d x +c_1 \right ) \]
Summary of solutions found
\begin{align*}
y &= {\mathrm e}^{\int \frac {f_{1} \left (x \right )}{g \left (x \right )}d x} \left (\int \frac {f_{0} \left (x \right ) {\mathrm e}^{\int -\frac {f_{1} \left (x \right )}{g \left (x \right )}d x}}{g \left (x \right )}d x +c_1 \right ) \\
\end{align*}
2.1.4.2 ✓ Maple. Time used: 0.001 (sec). Leaf size: 38
ode:=g(x)*diff(y(x),x) = f__1(x)*y(x)+f__0(x);
dsolve(ode,y(x), singsol=all);
\[
y = \left (\int \frac {f_{0} \left (x \right ) {\mathrm e}^{-\int \frac {f_{1} \left (x \right )}{g \left (x \right )}d x}}{g \left (x \right )}d x +c_1 \right ) {\mathrm e}^{\int \frac {f_{1} \left (x \right )}{g \left (x \right )}d x}
\]
Maple trace
Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
<- 1st order linear successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & g \left (x \right ) \left (\frac {d}{d x}y \left (x \right )\right )=f_{1} \left (x \right ) y \left (x \right )+f_{0} \left (x \right ) \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d x}y \left (x \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=\frac {f_{1} \left (x \right ) y \left (x \right )+f_{0} \left (x \right )}{g \left (x \right )} \\ \bullet & {} & \textrm {Collect w.r.t.}\hspace {3pt} y \left (x \right )\hspace {3pt}\textrm {and simplify}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=\frac {f_{1} \left (x \right ) y \left (x \right )}{g \left (x \right )}+\frac {f_{0} \left (x \right )}{g \left (x \right )} \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} y \left (x \right )\hspace {3pt}\textrm {on the lhs of the ODE and the rest on the rhs of the ODE}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )-\frac {f_{1} \left (x \right ) y \left (x \right )}{g \left (x \right )}=\frac {f_{0} \left (x \right )}{g \left (x \right )} \\ \bullet & {} & \textrm {The ODE is linear; multiply by an integrating factor}\hspace {3pt} \mu \left (x \right ) \\ {} & {} & \mu \left (x \right ) \left (\frac {d}{d x}y \left (x \right )-\frac {f_{1} \left (x \right ) y \left (x \right )}{g \left (x \right )}\right )=\frac {\mu \left (x \right ) f_{0} \left (x \right )}{g \left (x \right )} \\ \bullet & {} & \textrm {Assume the lhs of the ODE is the total derivative}\hspace {3pt} \frac {d}{d x}\left (y \left (x \right ) \mu \left (x \right )\right ) \\ {} & {} & \mu \left (x \right ) \left (\frac {d}{d x}y \left (x \right )-\frac {f_{1} \left (x \right ) y \left (x \right )}{g \left (x \right )}\right )=\left (\frac {d}{d x}y \left (x \right )\right ) \mu \left (x \right )+y \left (x \right ) \left (\frac {d}{d x}\mu \left (x \right )\right ) \\ \bullet & {} & \textrm {Isolate}\hspace {3pt} \frac {d}{d x}\mu \left (x \right ) \\ {} & {} & \frac {d}{d x}\mu \left (x \right )=-\frac {\mu \left (x \right ) f_{1} \left (x \right )}{g \left (x \right )} \\ \bullet & {} & \textrm {Solve to find the integrating factor}\hspace {3pt} \\ {} & {} & \mu \left (x \right )={\mathrm e}^{\int -\frac {f_{1} \left (x \right )}{g \left (x \right )}d x} \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \left (\frac {d}{d x}\left (y \left (x \right ) \mu \left (x \right )\right )\right )d x =\int \frac {\mu \left (x \right ) f_{0} \left (x \right )}{g \left (x \right )}d x +\mathit {C1} \\ \bullet & {} & \textrm {Evaluate the integral on the lhs}\hspace {3pt} \\ {} & {} & y \left (x \right ) \mu \left (x \right )=\int \frac {\mu \left (x \right ) f_{0} \left (x \right )}{g \left (x \right )}d x +\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \left (x \right ) \\ {} & {} & y \left (x \right )=\frac {\int \frac {\mu \left (x \right ) f_{0} \left (x \right )}{g \left (x \right )}d x +\mathit {C1}}{\mu \left (x \right )} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \mu \left (x \right )={\mathrm e}^{\int -\frac {f_{1} \left (x \right )}{g \left (x \right )}d x} \\ {} & {} & y \left (x \right )=\frac {\int \frac {{\mathrm e}^{\int -\frac {f_{1} \left (x \right )}{g \left (x \right )}d x} f_{0} \left (x \right )}{g \left (x \right )}d x +\mathit {C1}}{{\mathrm e}^{\int -\frac {f_{1} \left (x \right )}{g \left (x \right )}d x}} \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & y \left (x \right )=\left (\int \frac {{\mathrm e}^{-\int \frac {f_{1} \left (x \right )}{g \left (x \right )}d x} f_{0} \left (x \right )}{g \left (x \right )}d x +\mathit {C1} \right ) {\mathrm e}^{\int \frac {f_{1} \left (x \right )}{g \left (x \right )}d x} \end {array} \]
2.1.4.3 ✓ Mathematica. Time used: 0.053 (sec). Leaf size: 64
ode=g[x]*D[y[x],x]==f1[x]*y[x]+f0[x];
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\begin{align*} y(x)&\to \exp \left (\int _1^x\frac {\text {f1}(K[1])}{g(K[1])}dK[1]\right ) \left (\int _1^x\frac {\exp \left (-\int _1^{K[2]}\frac {\text {f1}(K[1])}{g(K[1])}dK[1]\right ) \text {f0}(K[2])}{g(K[2])}dK[2]+c_1\right ) \end{align*}
2.1.4.4 ✓ Sympy. Time used: 14.907 (sec). Leaf size: 85
from sympy import *
x = symbols("x")
y = Function("y")
f0 = Function("f0")
f1 = Function("f1")
g = Function("g")
ode = Eq(-f0(x) - f1(x)*y(x) + g(x)*Derivative(y(x), x),0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
\[
y{\left (x \right )} = \frac {\left (C_{1} + \int \frac {f_{0}{\left (x \right )} e^{- \int \frac {f_{1}{\left (x \right )}}{g{\left (x \right )}}\, dx}}{g{\left (x \right )}}\, dx + \int \frac {f_{1}{\left (x \right )} y{\left (x \right )} e^{- \int \frac {f_{1}{\left (x \right )}}{g{\left (x \right )}}\, dx}}{g{\left (x \right )}}\, dx\right ) e^{\int \frac {f_{1}{\left (x \right )}}{g{\left (x \right )}}\, dx}}{\left (e^{\int \frac {f_{1}{\left (x \right )}}{g{\left (x \right )}}\, dx}\right ) \int \frac {f_{1}{\left (x \right )} e^{- \int \frac {f_{1}{\left (x \right )}}{g{\left (x \right )}}\, dx}}{g{\left (x \right )}}\, dx + 1}
\]
Python version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0]
Sympy version 1.14.0
classify_ode(ode,func=y(x))
('factorable', '1st_exact', '1st_linear', 'Bernoulli', 'almost_linear', '1st_power_series', 'lie_group', '1st_exact_Integral', '1st_linear_Integral', 'Bernoulli_Integral', 'almost_linear_Integral')