76.17.17 problem 26

Internal problem ID [17703]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 4. Second order linear equations. Section 4.7 (Variation of parameters). Problems at page 280
Problem number : 26
Date solved : Tuesday, January 28, 2025 at 11:01:29 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Solution by Maple

Time used: 0.007 (sec). Leaf size: 43

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

Solution by Mathematica

Time used: 0.242 (sec). Leaf size: 254

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