74.2.15 problem 20

Internal problem ID [15856]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 1. Introduction to Differential Equations. Review exercises, page 23
Problem number : 20
Date solved : Tuesday, January 28, 2025 at 08:10:21 AM
CAS classification : [[_linear, `class A`]]

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

With initial conditions

\begin{align*} y \left (0\right )&=1 \end{align*}

Solution by Maple

Time used: 0.013 (sec). Leaf size: 20

dsolve([diff(y(x),x)+2*y(x)=x^2,y(0) = 1],y(x), singsol=all)
 
\[ y = \frac {x^{2}}{2}-\frac {x}{2}+\frac {1}{4}+\frac {3 \,{\mathrm e}^{-2 x}}{4} \]

Solution by Mathematica

Time used: 0.036 (sec). Leaf size: 31

DSolve[{D[y[x],x]+2*y[x]==x^2,{y[0]==1}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to e^{-2 x} \left (\int _0^xe^{2 K[1]} K[1]^2dK[1]+1\right ) \]