44.1.26 problem 28

Internal problem ID [6901]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 1. Introduction to differential equations. Exercises 1.1 at page 12
Problem number : 28
Date solved : Wednesday, March 05, 2025 at 02:50:03 AM
CAS classification : [_linear]

\begin{align*} 2 x y^{\prime }-y&=2 x \cos \left (x \right ) \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 28
ode:=2*x*diff(y(x),x)-y(x) = 2*x*cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\sqrt {2}\, \sqrt {\pi }\, \operatorname {FresnelC}\left (\frac {\sqrt {2}\, \sqrt {x}}{\sqrt {\pi }}\right )+c_{1} \right ) \sqrt {x} \]
Mathematica. Time used: 0.039 (sec). Leaf size: 60
ode=2*x*D[y[x],x]-y[x]==2*x*Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to c_1 \sqrt {x}-\frac {1}{2} i \left (\sqrt {-i x} \Gamma \left (\frac {1}{2},-i x\right )-\sqrt {i x} \Gamma \left (\frac {1}{2},i x\right )\right ) \]
Sympy. Time used: 0.988 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x*cos(x) + 2*x*Derivative(y(x), x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \sqrt {x} \left (C_{1} + \sqrt {2} \sqrt {\pi } C\left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {\pi }}\right )\right ) \]