83.17.8 problem 8

Internal problem ID [19133]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter III. Ordinary linear differential equations with constant coefficients. Misc. Examples on chapter III at page 50
Problem number : 8
Date solved : Monday, March 31, 2025 at 06:49:22 PM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\left (6\right )}-2 y^{\left (5\right )}+3 y^{\prime \prime \prime \prime }-4 y^{\prime \prime \prime }+3 y^{\prime \prime }-2 y^{\prime }+y&=\sin \left (\frac {x}{2}\right )^{2}+{\mathrm e}^{x} \end{align*}

Maple. Time used: 0.019 (sec). Leaf size: 64
ode:=diff(diff(diff(diff(diff(diff(y(x),x),x),x),x),x),x)-2*diff(diff(diff(diff(diff(y(x),x),x),x),x),x)+3*diff(diff(diff(diff(y(x),x),x),x),x)-4*diff(diff(diff(y(x),x),x),x)+3*diff(diff(y(x),x),x)-2*diff(y(x),x)+y(x) = sin(1/2*x)^2+exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (8 x^{2}+\left (64 c_5 -32\right ) x +64 c_2 +32\right ) {\mathrm e}^{x}}{64}+\frac {\left (-2 x^{2}+\left (64 c_6 -4\right ) x +64 c_3 +7\right ) \sin \left (x \right )}{64}+\frac {1}{2}+\frac {\left (\left (64 c_4 -8\right ) x +64 c_1 -10\right ) \cos \left (x \right )}{64} \]
Mathematica. Time used: 0.664 (sec). Leaf size: 76
ode=D[y[x],{x,6}]-2*D[y[x],{x,5}]+3*D[y[x],{x,4}]-4*D[y[x],{x,3}]+3*D[y[x],{x,2}]-2*D[y[x],x]+y[x]==Sin[x/2]^2+Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{64} \left (8 \left (4+e^x \left (x^2-4 x+8 c_6 x+4+8 c_5\right )\right )+\left (-2 x^2+(-4+64 c_4) x+7+64 c_3\right ) \sin (x)+2 (4 (-1+8 c_2) x-5+32 c_1) \cos (x)\right ) \]
Sympy. Time used: 0.586 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) - exp(x) - sin(x/2)**2 - 2*Derivative(y(x), x) + 3*Derivative(y(x), (x, 2)) - 4*Derivative(y(x), (x, 3)) + 3*Derivative(y(x), (x, 4)) - 2*Derivative(y(x), (x, 5)) + Derivative(y(x), (x, 6)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + C_{2} x\right ) \cos {\left (x \right )} + \left (C_{3} + x \left (C_{4} - \frac {x}{32}\right )\right ) \sin {\left (x \right )} + \left (C_{5} + x \left (C_{6} + \frac {x}{8}\right )\right ) e^{x} + \frac {1}{2} \]