87.27.6 problem 10

Internal problem ID [23874]
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 : 10
Date solved : Thursday, October 02, 2025 at 09:46:10 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} 2 y-3 y^{\prime }+y^{\prime \prime }&={\mathrm e}^{x} \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=0 \\ y \left (1\right )&=0 \\ \end{align*}
Maple. Time used: 0.023 (sec). Leaf size: 27
ode:=diff(diff(y(x),x),x)-3*diff(y(x),x)+2*y(x) = exp(x); 
ic:=[y(0) = 0, y(1) = 0]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -\frac {\left (x \,{\mathrm e}-{\mathrm e}^{x}-x +1\right ) {\mathrm e}^{x}}{{\mathrm e}-1} \]
Mathematica. Time used: 0.019 (sec). Leaf size: 24
ode=D[y[x],{x,2}]-3*D[y[x],x]+2*y[x]==Exp[x]; 
ic={y[0]==0,y[1]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {e^x \left (-e x+x+e^x-1\right )}{e-1} \end{align*}
Sympy. Time used: 0.130 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x) - exp(x) - 3*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {y(0): 0, y(1): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (- x + \frac {e^{x}}{-1 + e} - \frac {1}{-1 + e}\right ) e^{x} \]