50.1.60 problem 60

Internal problem ID [10058]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 60
Date solved : Tuesday, September 30, 2025 at 06:51:51 PM
CAS classification : [[_2nd_order, _quadrature]]

\begin{align*} y^{\prime \prime }&=4 \sin \left (x \right )-4 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 18
ode:=diff(diff(y(x),x),x) = 4*sin(x)-4; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -2 x^{2}-4 \sin \left (x \right )+c_1 x +c_2 \]
Mathematica. Time used: 0.063 (sec). Leaf size: 34
ode=D[y[x],{x,2}]==4*Sin[x]-4; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \int _1^x\int _1^{K[2]}4 (\sin (K[1])-1)dK[1]dK[2]+c_2 x+c_1 \end{align*}
Sympy. Time used: 0.032 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-4*sin(x) + Derivative(y(x), (x, 2)) + 4,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{2} x - 2 x^{2} - 4 \sin {\left (x \right )} \]