44.3.22 problem 30

Internal problem ID [7003]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 1. Introduction to differential equations. Review problems at page 34
Problem number : 30
Date solved : Monday, January 27, 2025 at 02:40:35 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.005 (sec). Leaf size: 55

dsolve(diff(y(x),x$2)+y(x)=exp(x^2),y(x), singsol=all)
 
\[ y = -\frac {{\mathrm e}^{\frac {1}{4}} \left (i \sin \left (x \right )-\cos \left (x \right )\right ) \sqrt {\pi }\, \operatorname {erf}\left (i x -\frac {1}{2}\right )}{4}-\frac {{\mathrm e}^{\frac {1}{4}} \left (\cos \left (x \right )+i \sin \left (x \right )\right ) \sqrt {\pi }\, \operatorname {erf}\left (i x +\frac {1}{2}\right )}{4}+\cos \left (x \right ) c_{1} +\sin \left (x \right ) c_{2} \]

Solution by Mathematica

Time used: 0.059 (sec). Leaf size: 80

DSolve[D[y[x],{x,2}]+y[x]==Exp[x^2],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to -\frac {1}{4} \sqrt [4]{e} \sqrt {\pi } \left (\text {erf}\left (\frac {1}{2}-i x\right ) \cos (x)+\text {erf}\left (\frac {1}{2}+i x\right ) (\cos (x)+i \sin (x))-\text {erfi}\left (\frac {1}{2} (2 x+i)\right ) \sin (x)\right )+c_1 \cos (x)+c_2 \sin (x) \]