83.6.4 problem 2 (d)

Internal problem ID [21947]
Book : Differential Equations By Kaj L. Nielsen. Second edition 1966. Barnes and nobel. 66-28306
Section : Chapter III. First order differential equations of the first degree. Ex. VII at page 50
Problem number : 2 (d)
Date solved : Thursday, October 02, 2025 at 08:19:01 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} 2 y+y^{\prime }&=\sin \left (3 x \right ) \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 23
ode:=diff(y(x),x)+2*y(x) = sin(3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {3 \cos \left (3 x \right )}{13}+\frac {2 \sin \left (3 x \right )}{13}+{\mathrm e}^{-2 x} c_1 \]
Mathematica. Time used: 0.056 (sec). Leaf size: 30
ode=D[y[x],x]+2*y[x]==Sin[3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {2}{13} \sin (3 x)-\frac {3}{13} \cos (3 x)+c_1 e^{-2 x} \end{align*}
Sympy. Time used: 0.085 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x) - sin(3*x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- 2 x} + \frac {2 \sin {\left (3 x \right )}}{13} - \frac {3 \cos {\left (3 x \right )}}{13} \]