solve 1/(x^2+1) * y' + xy = 3 for y(0)=0

So I needed to find the integrating factor which is r(x)=e^(integral(p(x)dx))
so here p(x) is just x therefore r(x)=e^(x^2/2)?

Then I am supposed to be able to put it in the form

d/dx(r(x)y)=RHS but this doesn't work because if you take the derivative of that you're supposed to get the LHS. This doesn't work out obviously.

What am I doing wrong? Do I have to break the 1/x^2+1 into partial fraction decomp? But how would that help?

Thanks!

first you need to get y' by itself.

y' + x(x^2+1) y = 3(x^2+1)
Now the integrating factor is e^(1/2 (x^2+1)^2)

try that.

Note that in a linear differential equation, the y' term is not supposed to have any coefficient. Hence, you must turn the differential equation into this form.

[1/(x^2+1) * y'] + xy = 3

Multiply the whole equation by (x^2 + 1)

y' + [x*(x^2 + 1)]*y = 3(x^2 + 1)

Now, p(x) = [x*(x^2 + 1)]
= (x^3 + x)

Integrating factor = I.F. = e^(integral(p(x)dx))
= e^(integral((x^3 + x)dx))

Then, as is true for linear differential equations,

y*(I.F.) = integral(I.F. * q(x))

Where q(x) = 3(x^2 + 1)

extra credit:

why did Arora and I come up with different integrating factors?
Can they both be correct?

To solve the given differential equation, you are correct in using the method of integrating factor. However, there seem to be a few misconceptions and mistakes in your approach. Let's go through the correct steps:

1. Starting with the given equation: (1/(x^2+1)) * y' + xy = 3

2. First, we check whether the given equation is linear. In this case, it is not linear due to the 1/(x^2+1) term. However, we can transform it into a linear equation using the integrating factor.

3. The integrating factor is calculated as r(x) = e^(integral(p(x)dx)), where p(x) is the coefficient of y' (in this case, p(x) = x). The integral of p(x) is (x^2/2), so the integrating factor is r(x) = e^(x^2/2).

4. Now, we multiply the entire equation by the integrating factor r(x):
e^(x^2/2) * (1/(x^2+1)) * y' + xy * e^(x^2/2) = 3 * e^(x^2/2)

5. The left-hand side can then be expressed as the derivative of a product using the product rule. Recall that d/dx(uv) = v * du/dx + u * dv/dx. We can rewrite the left-hand side as:
d/dx (y * e^(x^2/2)) = 3 * e^(x^2/2)

6. Integrating both sides with respect to x, we get:
∫ d/dx (y * e^(x^2/2)) dx = ∫ 3 * e^(x^2/2) dx

7. On the left-hand side, we can apply the fundamental theorem of calculus to obtain the integral term back as y * e^(x^2/2):
y * e^(x^2/2) = ∫ 3 * e^(x^2/2) dx

8. Now, we can solve for y by dividing by e^(x^2/2):
y = (∫ 3 * e^(x^2/2) dx) / e^(x^2/2)

9. Finally, we can evaluate the integral on the right-hand side to find the solution for y.

Note: It is not necessary to apply partial fraction decomposition in this case as the integrating factor method can be used directly. However, partial fraction decomposition may be useful in other cases where the equation has rational functions.