75.18.3 problem 592

Internal problem ID [17020]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 2 (Higher order ODEs). Section 15.3 Nonhomogeneous linear equations with constant coefficients. Initial value problem. Exercises page 140
Problem number : 592
Date solved : Monday, March 31, 2025 at 03:38:19 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

With initial conditions

\begin{align*} y \left (0\right )&=2\\ y^{\prime }\left (0\right )&=6 \end{align*}

Maple. Time used: 0.014 (sec). Leaf size: 10
ode:=diff(diff(y(x),x),x)+9*y(x) = 36*exp(3*x); 
ic:=y(0) = 2, D(y)(0) = 6; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = 2 \,{\mathrm e}^{3 x} \]
Mathematica. Time used: 0.018 (sec). Leaf size: 12
ode=D[y[x],{x,2}]+9*y[x]==36*Exp[3*x]; 
ic={y[0]==2,Derivative[1][y][0] ==6}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to 2 e^{3 x} \]
Sympy. Time used: 0.079 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(9*y(x) - 36*exp(3*x) + Derivative(y(x), (x, 2)),0) 
ics = {y(0): 2, Subs(Derivative(y(x), x), x, 0): 6} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 2 e^{3 x} \]