2.13 problem 38

Internal problem ID [3302]

Book: Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section: Various 2
Problem number: 38.
ODE order: 1.
ODE degree: 1.

CAS Maple gives this as type [_linear]

\[ \boxed {y^{\prime }-g \left (x \right ) y=f \left (x \right )} \]

Solution by Maple

Time used: 0.0 (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}^{-\left (\int g \left (x \right )d x \right )}d x +c_{1} \right ) {\mathrm e}^{\int g \left (x \right )d x} \]

Solution by Mathematica

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

DSolve[y'[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 ) \]