81.5.17 problem 17

Internal problem ID [18609]
Book : A short course on differential equations. By Donald Francis Campbell. Maxmillan company. London. 1907
Section : Chapter IV. Ordinary linear differential equations with constant coefficients. Exercises at page 58
Problem number : 17
Date solved : Monday, March 31, 2025 at 05:46:25 PM
CAS classification : [[_2nd_order, _quadrature]]

\begin{align*} e y^{\prime \prime }&=-\frac {\left (w L +P \right ) x}{2}-\frac {w \,x^{2}}{2} \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 37
ode:=e*diff(diff(y(x),x),x) = -1/2*(L*w+P)*x-1/2*w*x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-w \,x^{4}+\left (-2 w L -2 P \right ) x^{3}+24 c_1 x e +24 c_2 e}{24 e} \]
Mathematica. Time used: 0.01 (sec). Leaf size: 33
ode=e*D[y[x],{x,2}]==-(w*L+P)/2*x-w/2*x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {x^3 (w (2 L+x)+2 P)}{24 e}+c_2 x+c_1 \]
Sympy. Time used: 0.112 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
L = symbols("L") 
P = symbols("P") 
e = symbols("e") 
w = symbols("w") 
y = Function("y") 
ode = Eq(e*Derivative(y(x), (x, 2)) + w*x**2/2 + x*(L*w + P)/2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{2} x - \frac {w x^{4}}{24 e} + \frac {x^{3} \left (- L w - P\right )}{12 e} \]