# Need help solving 2 different differential equations (partially solved, but stuck)

• Jul 26th 2010, 11:58 AM
EmilyL
Need help solving 2 different differential equations (partially solved, but stuck)
I've been working on these for a WHILE, and they end up giving me integrals which seem pretty much impossible to solve or crazy unrealistic answers. If I'm doing the first few steps right, then can someone walk me through how to solve the integrals? Or, is there an easier way to solve the differential equations?:

1) solve (y-2x)dx + (3x-y)dy = 0

2) solve 3xydx + (x^2 + y^2)dy = 0

for number (1), I substituted y = ux and dy = udx + xdu

after some simplifying, I got:

(-u^2 + 4u - 2)xdx = -x^2(3-u)du

-dx/x = (u-3)/(u^2 -4u +2)du

-lnx = int[(u-3)du/(u^2 -4u +2)]

after trying all kinds of crazy weird stuff, including trig substitution, I ended up getting:

-lnx = (1/2)ln[(y/x)^2 -4y/x +2) - (1/4)arctan[{(y/x)-2}/sqrt(2)] - (1/8)sin(2arctan[{(y/x) - 2)}\sqrt(2)]

this just seems like a ridiculous answer, and I'm pretty sure I went wrong somewhere along the line. If someone could check through this ASAP and let me know where I went wrong, I'd greatly appreciate it!

2) Its a similar problem to #1. I subsituted y=ux and dy=udx + xdu

The integral I ended up getting was int[-dx/x] = int[(1+u^2)/(u^3 + 4u)]
The right side is what I'm having trouble with.

I tried seperating it into: (u)/(u^2 + 4) and 1/(u^3 + 4u)

The first part I solved through "u substitution" getting (1/2)ln(4 + u^2)

the 2nd part (with the 1 on top) I tried solving through partial fractions, but when I used partial fractions, I got (1/4) for A and 0 for both B and C, making it equal to 1/(4u) which I know is wrong. (Headbang)

Any help is greatly appreciated, thank you!
• Jul 26th 2010, 01:23 PM
Ackbeet
For Problem 1, Mathematica gives

$\displaystyle{-\sqrt{2}\tanh^{-1}\left(\frac{(y/x)-2}{\sqrt{2}}\right)-2\ln\left(x\sqrt{2-4(y/x)+(y/x)^{2}}\right)=C_{1}.}$

This doesn't strike me as too far off from what you got. One thing that does give me pause is that the argument for my tanh function and the argument for your tan function are the same. You might double-check your algebra. If you like, I could review it if you posted it. Your transformation to the $u$ domain is correct. I would double-check your $u$ integral. I'd probably do it with partial fractions.

For Problem 2, again, your $u$ substitution is correct. I would assume a partial fraction decomposition of

$\displaystyle{\frac{A}{u}+\frac{B+C u}{4+u^{2}}}.$

Because the second denominator does not factor over the reals, you might need both the B and the C. Try it, and see if a solution exists. If it does, then that method of partial fractions works.
• Jul 26th 2010, 01:34 PM
EmilyL
For (1), the denominator is u^2 - 4u + 2, so I don't think I can get it factored so I can do partial fractions.

For (2), I tried doing partial fractions in the form you showed, but by comparing coefficients, I got A= 1/4, B=0, and C=0.

I'm not sure if this is the right way, but I tried it a different way in which I substituted different values in for u, which got me A= 1/4, B=1, and C=-5/4

EDIT: but I did Bu + C for the numerator, not B + Cu
• Jul 26th 2010, 01:45 PM
Ackbeet
Problem 1: Yes, you can separate out the quadratic into distinct real roots. You have

$u^{2}-4u+2=0.$

$\displaystyle{u=\frac{4\pm\sqrt{16-4(1)(2)}}{2}=\frac{4\pm 2\sqrt{2}}{2}=2\pm\sqrt{2}.}$

Therefore, you can assume that

$\displaystyle{\frac{u-3}{u^2 -4u +2}=\frac{A}{u-(2+\sqrt{2})}+\frac{B}{u-(2-\sqrt{2})}.$

For Problem 2, I think you might have made a mistake in your partial fraction decomposition. We set

$\displaystyle{\frac{1+u^{2}}{u(u^{2} + 4)}=\frac{A}{u}+\frac{B+C u}{4+u^{2}}}.$

Adding the fractions on the RHS yields the following equation:

$1+u^{2}=A(4+u^{2})+Bu+Cu^{2}.$

Equating the coefficients of like powers of $x$ yields immediately that $B=0,$ $A=1/4,$ and $A+C=1,$ hence $C=3/4.$

Now you can plug that back into your equations and integrate perhaps a little easier, eh?
• Jul 26th 2010, 01:49 PM
EmilyL
Oh wow, yeah you're right I did the partial fraction decomposition wrong! I'll try that right now, thank you
• Jul 26th 2010, 01:56 PM
EmilyL
Okay, so for (2), I did the partial fractions and then integrated, finally getting:

$-ln(x) = (1/4)ln(y/x) + (3/8)ln[(y^2/x^2) +4]$
• Jul 26th 2010, 02:02 PM
Ackbeet
Looking good, except that the last term on the right is incorrect. The logarithm rule only works for linear factors in the denominator. You have to do a trig substitution on that integral.
• Jul 26th 2010, 02:17 PM
EmilyL
Quote:

Originally Posted by Ackbeet
Looking good, except that the last term on the right is incorrect. The logarithm rule only works for linear factors in the denominator. You have to do a trig substitution on that integral.

I did a substitution making v=u^2 +4 and dv= 2udu, giving me (3/8)int[dv/v], which is (3/8)lnv, which is (3/8)lnu^2 +4

I can't do it with substitution like that?

Also, for problem 2, I'm having trouble finding the coefficients. I got it to A+B=1 and 2A -Asqrt2 -2B -Bsqrt2 = -3
• Jul 26th 2010, 02:28 PM
Ackbeet
Regarding the second integral: Oops. My bad. I forgot about the u on top. You're fine.

Regarding Problem 1 (I think) and finding the coefficients: assuming your system is correct, all you have to do is solve a system of two equations and two unknowns. On a 2 x 2 system, you might find Kramer's Rule the fastest way to solve.
• Jul 26th 2010, 02:39 PM
EmilyL
for the first equation which I already integrated, can you show me how to just get x on the left side? I'm a little rusty on how to apply the "e"s and "ln"s as far as where to put the coefficients and how to deal with the negatives.

For the other problem I got coefficients of B= (sqrt2 +2)/4 and A=(2 - sqrt2)/4

Do these seem right? If so, it still seems like the problem will be hard to integrate
• Jul 26th 2010, 06:02 PM
Ackbeet
Ok. First step: exponentiate both sides. That is, raise e to the power of both sides, and equate. What do you get there?