89.24.12 problem 12

Internal problem ID [24849]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 11. Variation of parameters and other methods. Exercises at page 171
Problem number : 12
Date solved : Thursday, October 02, 2025 at 10:48:38 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} 2 y-3 y^{\prime }+y^{\prime \prime }&=\frac {{\mathrm e}^{2 x}}{{\mathrm e}^{2 x}+1} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 31
ode:=diff(diff(y(x),x),x)-3*diff(y(x),x)+2*y(x) = exp(2*x)/(exp(2*x)+1); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} \left (-\arctan \left ({\mathrm e}^{x}\right )+c_2 +\left (c_1 +\ln \left ({\mathrm e}^{x}\right )-\frac {\ln \left ({\mathrm e}^{2 x}+1\right )}{2}\right ) {\mathrm e}^{x}\right ) \]
Mathematica. Time used: 0.045 (sec). Leaf size: 39
ode=D[y[x],{x,2}]-3*D[y[x],x]+2*y[x]== Exp[2*x]*1/(Exp[2*x]+1); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^x \left (-\arctan \left (e^x\right )-e^x \text {arctanh}\left (2 e^{2 x}+1\right )+c_2 e^x+c_1\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x) - 3*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - exp(2*x)/(exp(2*x) + 1),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (2*y(x)*exp(2*x) + 2*y(x) + exp(2*x)*Deriv