68.1.54 problem 75

Internal problem ID [17121]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 1. Introduction to Differential Equations. Exercises 1.1, page 10
Problem number : 75
Date solved : Thursday, October 02, 2025 at 01:43:32 PM
CAS classification : [_linear]

\begin{align*} x y^{\prime }+y&=\cos \left (x \right ) \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 12
ode:=x*diff(y(x),x)+y(x) = cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\sin \left (x \right )+c_1}{x} \]
Mathematica. Time used: 0.019 (sec). Leaf size: 22
ode=x*D[y[x],x]+y[x]==Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {\int _1^x\cos (K[1])dK[1]+c_1}{x} \end{align*}
Sympy. Time used: 0.149 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) + y(x) - cos(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + \sin {\left (x \right )}}{x} \]