15.8.48 problem 51

Internal problem ID [3051]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 12, page 46
Problem number : 51
Date solved : Sunday, March 30, 2025 at 01:14:26 AM
CAS classification : [[_linear, `class A`]]

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

With initial conditions

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

Maple. Time used: 0.028 (sec). Leaf size: 17
ode:=diff(y(x),x)+2*y(x) = 3*exp(2*x); 
ic:=y(0) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {3 \,{\mathrm e}^{2 x}}{4}+\frac {{\mathrm e}^{-2 x}}{4} \]
Mathematica. Time used: 0.054 (sec). Leaf size: 23
ode=D[y[x],x]+2*y[x]==3*Exp[2*x]; 
ic={y[0]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{4} e^{-2 x} \left (3 e^{4 x}+1\right ) \]
Sympy. Time used: 0.141 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x) - 3*exp(2*x) + Derivative(y(x), x),0) 
ics = {y(0): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {3 e^{2 x}}{4} + \frac {e^{- 2 x}}{4} \]