# Math Help - Not quite sure how to solve this differential equation

1. ## Not quite sure how to solve this differential equation

y' + y/x = q(x)

It is first order, linear, non-constant coefficients, inhomogeneous.

I suspect an integrating factor is required, but I am not quite sure how the process works.

2. Originally Posted by kiwijoey
y' + y/x = q(x)

It is first order, linear, non-constant coefficients, inhomogeneous.

I suspect an integrating factor is required, but I am not quite sure how the process works.
$y'+y*p(x)=q(x)$
The integrating factor will be $e^{\int p(x)dx}$ as is always the case with equations of this form

$\int\frac{1}{x}dx=ln|x|$ and $e^{ln|x|}=x$
Yes we can ignore the absolute value

Now we multiply both sides by the integrating factor (x in this case)

$xy'+y=x*q(x)\rightarrow (xy)'=x*q(x)$ and we integrate both sides with respect to x to get

$\int (xy)'dx=\int x*q(x)dx\rightarrow xy=\int x*q(x)dx$

So $y=\frac{1}{x}\int x*q(x)dx$

3. Originally Posted by artvandalay11
$y'+y*p(x)=q(x)$
The integrating factor will be $e^{\int p(x)dx}$ as is always the case with equations of this form

$\int\frac{1}{x}dx=ln|x|$ and $e^{ln|x|}=x$
Yes we can ignore the absolute value

Now we multiply both sides by the integrating factor (x in this case)

$xy'+y=x*q(x)\rightarrow (xy)'=x*q(x)$ and we integrate both sides with respect to x to get

$\int (xy)'dx=\int x*q(x)dx\rightarrow xy=\int x*q(x)dx$

So $y=\frac{1}{x}\int x*q(x)dx$
I'm sure that you would probably want to include a constant of integration, right?

4. You do not need a constant of integration for the integrating factor

You do need one for the final step if you knew what q(x) was because that is how you get the family of functions that satisfy the differential equation

If you had an initial value, then you could solve for the constant explicity after you've integrated, but yes, you need a +C (or some constant) on the final integration to get the family of answers and not just one specific function