73.14.10 problem 21.12

Internal problem ID [15349]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 21. Nonhomogeneous equations in general. Additional exercises page 391
Problem number : 21.12
Date solved : Monday, March 31, 2025 at 01:35:05 PM
CAS classification : [[_high_order, _missing_x]]

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

With initial conditions

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

Maple. Time used: 0.030 (sec). Leaf size: 20
ode:=diff(diff(diff(diff(y(x),x),x),x),x)+diff(diff(y(x),x),x) = 1; 
ic:=y(0) = 4, D(y)(0) = 3, (D@@2)(y)(0) = 0, (D@@3)(y)(0) = 2; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {x^{2}}{2}+\cos \left (x \right )-2 \sin \left (x \right )+5 x +3 \]
Mathematica. Time used: 60.022 (sec). Leaf size: 88
ode=D[y[x],{x,4}]+D[y[x],{x,2}]==1; 
ic={y[0]==4,Derivative[1][y][0] ==3,Derivative[2][y][0] ==0,Derivative[3][y][0]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x \left (-\int _1^0(-\cos (K[1])+2 \sin (K[1])+1)dK[1]\right )+\int _1^x\int _1^{K[2]}(-\cos (K[1])+2 \sin (K[1])+1)dK[1]dK[2]-\int _1^0\int _1^{K[2]}(-\cos (K[1])+2 \sin (K[1])+1)dK[1]dK[2]+3 x+4 \]
Sympy. Time used: 0.125 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 4)) - 1,0) 
ics = {y(0): 4, Subs(Derivative(y(x), x), x, 0): 3, Subs(Derivative(y(x), (x, 2)), x, 0): 0, Subs(Derivative(y(x), (x, 3)), x, 0): 2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x^{2}}{2} + 5 x - 2 \sin {\left (x \right )} + \cos {\left (x \right )} + 3 \]