85.59.10 problem 10

Internal problem ID [22851]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 4. Linear differential equations. A Exercises at page 203
Problem number : 10
Date solved : Thursday, October 02, 2025 at 09:15:45 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-4 y^{\prime }+4 y&=\sqrt {x} \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 43
ode:=diff(diff(y(x),x),x)-4*diff(y(x),x)+4*y(x) = x^(1/2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{2 x} \left (x -\frac {3}{4}\right ) \sqrt {2}\, \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {2}\, \sqrt {x}\right )}{8}+\left (c_1 x +c_2 \right ) {\mathrm e}^{2 x}+\frac {3 \sqrt {x}}{8} \]
Mathematica. Time used: 0.197 (sec). Leaf size: 52
ode=D[y[x],{x,2}]-4*D[y[x],x]+4*y[x]==Sqrt[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{8} e^{2 x} \left (-2 \sqrt {2} x \Gamma \left (\frac {3}{2},2 x\right )+\sqrt {2} \Gamma \left (\frac {5}{2},2 x\right )+8 (c_2 x+c_1)\right ) \end{align*}
Sympy. Time used: 0.719 (sec). Leaf size: 70
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sqrt(x) + 4*y(x) - 4*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {3 \sqrt {x}}{8} + \left (C_{1} + x \left (C_{2} + \frac {\sqrt {2} \sqrt {\pi } \operatorname {erf}{\left (\sqrt {2} \sqrt {x} \right )}}{8}\right ) - \frac {3 \sqrt {2} \sqrt {\pi } \operatorname {erf}{\left (\sqrt {2} \sqrt {x} \right )}}{32}\right ) e^{2 x} \]