87.27.10 problem 17

Internal problem ID [23878]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 6. Boundary value problems. Exercise at page 262
Problem number : 17
Date solved : Thursday, October 02, 2025 at 09:46:13 PM
CAS classification : [[_2nd_order, _quadrature]]

\begin{align*} y^{\prime \prime }&=0 \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=c_{1} \\ y \left (L \right )&=c_{2} \\ \end{align*}
Maple. Time used: 0.012 (sec). Leaf size: 16
ode:=diff(diff(y(x),x),x) = 0; 
ic:=[y(0) = c__1, y(L) = c__2]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {\left (-c_{1} +c_{2} \right ) x}{L}+c_{1} \]
Mathematica. Time used: 0.001 (sec). Leaf size: 20
ode=D[y[x],{x,2}]==0; 
ic={y[0]==c1,y[L]==c2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {\text {c1} L-\text {c1} x+\text {c2} x}{L} \end{align*}
Sympy. Time used: 0.035 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
L = symbols("L") 
c1 = symbols("c1") 
c2 = symbols("c2") 
y = Function("y") 
ode = Eq(Derivative(y(x), (x, 2)),0) 
ics = {y(0): c1, y(L): c2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = c_{1} + \frac {x \left (- c_{1} + c_{2}\right )}{L} \]