7.11.39 problem 40

Internal problem ID [360]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 2. Linear Equations of Higher Order. Section 2.5 (Nonhomogeneous equations and undetermined coefficients). Problems at page 161
Problem number : 40
Date solved : Saturday, March 29, 2025 at 04:51:38 PM
CAS classification : [[_high_order, _missing_x]]

\begin{align*} y^{\prime \prime \prime \prime }-y&=5 \end{align*}

With initial conditions

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

Maple. Time used: 0.038 (sec). Leaf size: 14
ode:=diff(diff(diff(diff(y(x),x),x),x),x)-y(x) = 5; 
ic:=y(0) = 0, D(y)(0) = 0, (D@@2)(y)(0) = 0, (D@@3)(y)(0) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = -5+\frac {5 \cos \left (x \right )}{2}+\frac {5 \cosh \left (x \right )}{2} \]
Mathematica. Time used: 0.003 (sec). Leaf size: 23
ode=D[y[x],{x,4}]-y[x]==5; 
ic={y[0]==0,Derivative[1][y][0] ==0,Derivative[2][y][0] ==0,Derivative[3][y][0] ==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {5}{4} \left (e^{-x}+e^x+2 \cos (x)-4\right ) \]
Sympy. Time used: 0.136 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x) + Derivative(y(x), (x, 4)) - 5,0) 
ics = {y(0): 0, Subs(Derivative(y(x), x), x, 0): 0, Subs(Derivative(y(x), (x, 2)), x, 0): 0, Subs(Derivative(y(x), (x, 3)), x, 0): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {5 e^{x}}{4} + \frac {5 \cos {\left (x \right )}}{2} - 5 + \frac {5 e^{- x}}{4} \]