44.3.5 problem 11

Internal problem ID [6986]
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 : 11
Date solved : Wednesday, March 05, 2025 at 04:01:15 AM
CAS classification : [[_2nd_order, _missing_x]]

\begin{align*} y^{\prime \prime }+9 y&=18 \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 18
ode:=diff(diff(y(x),x),x)+9*y(x) = 18; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sin \left (3 x \right ) c_{2} +\cos \left (3 x \right ) c_{1} +2 \]
Mathematica. Time used: 0.012 (sec). Leaf size: 21
ode=D[y[x],{x,2}]+9*y[x]==18; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to c_1 \cos (3 x)+c_2 \sin (3 x)+2 \]
Sympy. Time used: 0.096 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(9*y(x) + Derivative(y(x), (x, 2)) - 18,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \sin {\left (3 x \right )} + C_{2} \cos {\left (3 x \right )} + 2 \]