29.2.10 problem 35

Internal problem ID [4643]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 2
Problem number : 35
Date solved : Sunday, March 30, 2025 at 03:32:11 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=\left (a +\cos \left (\ln \left (x \right )\right )+\sin \left (\ln \left (x \right )\right )\right ) y \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 14
ode:=diff(y(x),x) = (a+cos(ln(x))+sin(ln(x)))*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \,{\mathrm e}^{x \left (\sin \left (\ln \left (x \right )\right )+a \right )} \]
Mathematica. Time used: 0.059 (sec). Leaf size: 22
ode=D[y[x],x]==(a+Cos[Log[x]]+Sin[Log[x]]) y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to c_1 e^{x (a+\sin (\log (x)))} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.567 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq((-a - sin(log(x)) - cos(log(x)))*y(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{x \left (a + \sin {\left (\log {\left (x \right )} \right )}\right )} \]