12.10.34 problem 34

Internal problem ID [1838]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 5 linear second order equations. Section 5.7 Variation of Parameters. Page 262
Problem number : 34
Date solved : Monday, January 27, 2025 at 05:36:58 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} x^{2} y^{\prime \prime }+2 x y^{\prime }-2 y&=-2 x^{2} \end{align*}

With initial conditions

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

Solution by Maple

Time used: 0.014 (sec). Leaf size: 16

dsolve([x^2*diff(y(x),x$2)+2*x*diff(y(x),x)-2*y(x)=-2*x^2,y(1) = 1, D(y)(1) = -1],y(x), singsol=all)
 
\[ y = \frac {1}{2 x^{2}}+x -\frac {x^{2}}{2} \]

Solution by Mathematica

Time used: 0.016 (sec). Leaf size: 21

DSolve[{x^2*D[y[x],{x,2}]+2*x*D[y[x],x]-2*y[x]==-2*x^2,{y[1]==1,Derivative[1][y][1]==-1}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to -\frac {x^2}{2}+\frac {1}{2 x^2}+x \]