## E_S_J_F one year ago can someone please help me with solving ODE's. I can't seem to understand when to use separation of variables or integrating factor.

1. E_S_J_F

$\frac{ dy }{ dx }+2xy=x$

2. UsukiDoll

for separation of variables you need all y's on the left and all x's to the right and then integrate both sides h(y) dy = f(x) dx

3. E_S_J_F

for this question i used integrating factor instead of separation of variables. i just don't know which method to use when.

4. UsukiDoll

for integrating factor, your equation needs to be in the form of $\frac{dy}{dx} + p(x)y =q(x)$

5. UsukiDoll

wait let me recheck that formula

6. UsukiDoll

ok it's good

7. UsukiDoll

integrating factor seems to be the best choice on here.. your equation looks like it's in that form

8. E_S_J_F

dydx+2xy=x for this question how can you can tell which method to use?

9. E_S_J_F

i used integrating factor but apparently the solution is by separation of variables. i'm confused.

10. UsukiDoll

To use integrating factor your equation must be in the form $\frac{dy}{dx} + p(x)y =q(x)$ for separation of variables you should be able to have all y's on the left and all x's on the right. YOur equation should look like this... h(y) dy = f(x) dx maybe manipulation to the original equation must be done and then use separation of variables

11. UsukiDoll

$\frac{ dy }{ dx }+2xy=x$ try subtracting 2xy on both sides and factor out an x

12. E_S_J_F

yeah i did that and i got the answer. but i confusion lies when i the the question was in the form of integrating factor, so i used the integrating method. however the solution was with method of separating variables. my question is without knowing how they want us to solve the question using which one of 2 methods. Becoz i get different solutions with both methods

13. UsukiDoll

you are supposed to get the same solution regardless of what method you are using

14. E_S_J_F

really? so that means i'm something wrong in my solution

15. UsukiDoll

there's 5 variations of solving first order odes exact, substitution, homogeneous, separation of variables, and integrating factor. All of these methods produce the same answer... it's just that some methods are easier to do than others.

16. UsukiDoll

same thing applies to second order odes method of undetermined coefficients, laplace transform, and variation of parameters all give out the same solution.. but again one method is easier than the other.

17. E_S_J_F

oh i see, i'll try doing them again. Thanks for clarifying :)

18. UsukiDoll

I'm going to go eat dinner. This is a separable equation btw... sometimes you have shift terms first before we see a h(y) dy = f(x) dx format just like how subtracting 2xy and factoring an x made it closer to achieving h(y) dy = f(x) dx format. The problem is the left side is always the jerk and the right side is always nice.

19. UsukiDoll

|dw:1435302171281:dw|

20. UsukiDoll

|dw:1435302215700:dw| right hand side is always easy but the left is a ln and some log rules are needed. You may have to use e^ on both sides.

21. UsukiDoll

You can use this attached file as a reference guide. ODEs is the only magician Math course because no matter what method you choose, you will always get the same result. If I remembered correctly, each type of equation has certain characteristics and rules, so you may need to memorize what they are so you can be able to figure out which method is best to solve these ODEs.

22. UsukiDoll

For example, you CAN NOT use the EXACT method on an integrating factor equation! An exact equation is in the form of $M(t,y)+N(t,y)\frac{dy}{dt}=0$

23. UsukiDoll

sorry I spotted an error x( - fixed it