79.1.25 problem 5

Internal problem ID [18512]
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 : 5
Date solved : Tuesday, January 28, 2025 at 11:51:35 AM
CAS classification : [_linear]

\begin{align*} x^{\prime } t +x g \left (t \right )&=h \left (t \right ) \end{align*}

Solution by Maple

Time used: 0.002 (sec). Leaf size: 35

dsolve(t*diff(x(t),t)+x(t)*g(t)=h(t),x(t), singsol=all)
 
\[ x = \left (\int \frac {h \left (t \right ) {\mathrm e}^{\int \frac {g \left (t \right )}{t}d t}}{t}d t +c_{1} \right ) {\mathrm e}^{-\int \frac {g \left (t \right )}{t}d t} \]

Solution by Mathematica

Time used: 0.075 (sec). Leaf size: 63

DSolve[t*D[x[t],t]+x[t]*g[t]==h[t],x[t],t,IncludeSingularSolutions -> True]
 
\[ x(t)\to \exp \left (\int _1^t-\frac {g(K[1])}{K[1]}dK[1]\right ) \left (\int _1^t\frac {\exp \left (-\int _1^{K[2]}-\frac {g(K[1])}{K[1]}dK[1]\right ) h(K[2])}{K[2]}dK[2]+c_1\right ) \]