xy' + 3y = sin x/x^2 ive tried using the "general" equation for a linear first order equation but to no avail. any help would be appreciated. im stuck at the bit where i have to integrate sin(x)/x^3 btw
Why? You only need to integrate $\displaystyle \sin{x}$. First, switch the DE to standard form. Then multiply the whole DE by $\displaystyle x^3$, which is the integrating factor. You've probably forgotten to multiply $\displaystyle x^3$ in the right-hand side.
$\displaystyle x\frac{dy}{dx} + 3y = \frac{\sin{x}}{x^2}$
$\displaystyle \frac{dy}{dx} + \frac{3}{x}y = \frac{\sin{x}}{x^3}$
The Integrating Factor is $\displaystyle e^{\int \frac{3}{x}\, dx} = e^{3\ln x} = e^{\ln x^3} = x^3$.
Multiply both sides by $\displaystyle x^3$.
$\displaystyle x^3\frac{dy}{dx} + 3x^2y = \sin{x}$
The left hand side is a product rule expansion of $\displaystyle \frac{d}{dx}(x^3y)$.
$\displaystyle \frac{d}{dx}(x^3y) = \sin{x}$
$\displaystyle x^3y = \int \sin{x} \, dx$
$\displaystyle x^3y = -\cos{x} + C$
$\displaystyle y = -x^{-3}\cos{x} + Cx^{-3}$.