68.2.7 problem 12

Internal problem ID [17135]
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 : 12
Date solved : Thursday, October 02, 2025 at 01:44:15 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+2 y^{\prime }+2 y&=x \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 25
ode:=diff(diff(y(x),x),x)+2*diff(y(x),x)+2*y(x) = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-x} \sin \left (x \right ) c_2 +{\mathrm e}^{-x} \cos \left (x \right ) c_1 +\frac {x}{2}-\frac {1}{2} \]
Mathematica. Time used: 0.01 (sec). Leaf size: 33
ode=D[y[x],{x,2}]+2*D[y[x],x]+2*y[x]==x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x-1}{2}+c_2 e^{-x} \cos (x)+c_1 e^{-x} \sin (x) \end{align*}
Sympy. Time used: 0.105 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x + 2*y(x) + 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x}{2} + \left (C_{1} \sin {\left (x \right )} + C_{2} \cos {\left (x \right )}\right ) e^{- x} - \frac {1}{2} \]