38.3.27 problem 35

Internal problem ID [8294]
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 : 35
Date solved : Tuesday, September 30, 2025 at 05:21:52 PM
CAS classification : [[_2nd_order, _missing_x]]

\begin{align*} y^{\prime \prime }+9 y&=5 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 18
ode:=diff(diff(y(x),x),x)+9*y(x) = 5; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sin \left (3 x \right ) c_2 +\cos \left (3 x \right ) c_1 +\frac {5}{9} \]
Mathematica. Time used: 0.009 (sec). Leaf size: 23
ode=D[y[x],{x,2}]+9*y[x]==5; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_1 \cos (3 x)+c_2 \sin (3 x)+\frac {5}{9} \end{align*}
Sympy. Time used: 0.036 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(9*y(x) + Derivative(y(x), (x, 2)) - 5,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 )} + \frac {5}{9} \]