29.2.13 problem 38

Internal problem ID [4646]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 2
Problem number : 38
Date solved : Monday, January 27, 2025 at 09:29:18 AM
CAS classification : [_linear]

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

Solution by Maple

Time used: 0.003 (sec). Leaf size: 24

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

Solution by Mathematica

Time used: 0.052 (sec). Leaf size: 47

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