81.5.15 problem 15

Internal problem ID [18599]
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 : 15
Date solved : Thursday, March 13, 2025 at 12:24:45 PM
CAS classification : [[_2nd_order, _quadrature]]

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

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