23.3.81 problem 83

Internal problem ID [5795]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 83
Date solved : Tuesday, September 30, 2025 at 02:03:27 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} 4 y-4 y^{\prime }+y^{\prime \prime }&={\mathrm e}^{2 x} \cos \left (x \right )^{2} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 25
ode:=4*y(x)-4*diff(y(x),x)+diff(diff(y(x),x),x) = exp(2*x)*cos(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{2 x} \left (\sin \left (x \right )^{2}+4 c_1 x +x^{2}+4 c_2 \right )}{4} \]
Mathematica. Time used: 0.026 (sec). Leaf size: 35
ode=4*y[x] - 4*D[y[x],x] + D[y[x],{x,2}] == E^(2*x)*Cos[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{8} e^{2 x} \left (2 x^2-\cos (2 x)+8 c_2 x+8 c_1\right ) \end{align*}
Sympy. Time used: 0.299 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*y(x) - exp(2*x)*cos(x)**2 - 4*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + x \left (C_{2} + \frac {x}{4}\right ) - \frac {\cos ^{2}{\left (x \right )}}{4}\right ) e^{2 x} \]