#### Archived

This topic is now archived and is closed to further replies.

# differencial equations

This topic is 5504 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

the exam in math is comming near, so i need to "brush up" a bit... example: condtion: P(2,2) xy' - y' = xy + y how does one solve this? i know that y' is dy/dx... as i know u have forst solve the "homogenoues" part of the equation ie: y' +- something = 0 equation can also be written as: y'(x-1) = y (x+1) do u have to move all y-params on left side or can u say that y'(x-1) = 0 ?? [edited by - original vesoljc on January 21, 2003 3:35:01 PM]

##### Share on other sites
You''re on the right track; you have to separate your variables before integrating.

This is a game development board, so you should not ask this kind of question here. Look at the Forum FAQ.

Cédric

##### Share on other sites
cant we say that i''m making a "math" based game?

##### Share on other sites
Homework questions are reluctantly permitted, as long as you follow the guidelines of the FAQ, e.g., the main thing is that you should not just ask for an answer. Show your work and ask for guidance not answers.

In any case, please do try to keep even proper homework questions to a minimum, .

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

##### Share on other sites
this equation is homgenous

y''(x-1) = y (x+1)

y''/y = (x+1)/(x-1)

(1/y) * dy/dx = (x+1)/(x-1)

now integration (dx) will give you a solution.

##### Share on other sites
ga,

Please do not post answers to homework questions. The forum FAQ explains my policy on this.

Forum FAQ

Original vesoljc''s question did follow forum policy on homework, e.g., they showed enough of their work to prove they weren''t merely asking for an answer. And cedricl''s reply was appropriate, since it gave a hint at how to proceed. An explicit answer to the question is not appropriate.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

##### Share on other sites

so can "we" solve this as a first order linear differential equation?
y'' = dy/dx
dy/dx + p(x)y = q(x)
y''(x-1) = y(x+1)
y''(x-1) - y(x+1) = 0 /x-1)
y'' - y(x+1)/(x-1) = 0
p(x) = (x+1)/(x-1)
q(x) = 0

first, the integrating factor:
u(x) = e^(INT[p(x)dx]) = e^(INT[(x+1)/(x-1)dx]) which is umm...
we say that t = (x-1)
dt = 1*dx
so, INT[t+2/t dt] -> INT[t/t dt] + INT[2/t dt]
INT[dt] + 2*INT[1/t dt] -> INT[dx] + 2*INT[1/t dt]
since INT[1/x dx] = log[x] ->
x + 2*log[x-1],
which gives us u(x) = e^(x+2*Log[x-1])
second,
y = (INT[u(x)q(x)dx] + C ) / u(x)
q(x) = 0 ?
y = (INT[u(x)*0* dx] + C) / u(X)

so y = (0 + C) /u(x) ?
correct?

##### Share on other sites
the second smile " " should not be a smile but a division

##### Share on other sites
I''ll remind folks to review original vesoljc''s most recent reply, offering suggestions but not answers if you find anything wrong.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

##### Share on other sites
original vesoljc, your integration was executed nicely.

No need to go through the complications at the end, however. Once you've integrated both sides, you are given the starting conditions x and y, and thus enough information to find C. I don't know why you started putting it in to all this crazy notation with p(x), q(x), and u(x) flying all over the place, maybe it's just the way your Calculus professor has taught these integration techniques. I'm not saying it's a bad thing, but it can lead to confusion if used more often than necessary.

You already found the original function y, which was e[x + 2ln(x-1)] - as always, take the derivative of that to verify its correctness. First try to put it in a form that will yield the original, un-integrated equation. Anyway, in the final form y = e[x + 2ln(x-1)] + C, you can plug in the initial conditions to find C.

Also, smooth move substituting t for (x - 1) That was quite clever, I liked it. I was still looking for the pattern

[edited by - Zipster on January 27, 2003 2:33:25 AM]

##### Share on other sites
crazy notation u say?

i found this at www.sosmath.com. it''s called integrating factor method
if diff eq. is something like:
a(x)dy/dx + b(x)y = c(x), we rewrite this as:

dy/dx + p(x)y = q(x), where p(x) = b(x)/a(x) and q(x) = c(x)/a(x)

then u "can" do integrating factor (called I,u(x), whatever)
u(x) = e^(INT[p(x)dx]), while the general solution is
y = (INT[u(x)q(x)dx] + C) / u(x)

as i see it the second method is called seperable variables, where u put all y-based variables on one side, and x''s on the other.

so from our equation: dy/dx(x-1) = y(x+1) ->
dy/y = (x+1)/(x-1)dx, now we integrate each part
INT[dy/y] = ln[y]
INT[(x+1)/(x-1)dx] = x + 2ln[x-1]
so,
ln[y] = x + 2ln[x-1]
here i get a bit confuesed... we have to "ditch" the log''s, right?
so, y = e^(x+2ln[x-1]) ?

now, both methods should yield same results or what? do they?

to test if y is correct, we have to do a derivation of it, right?
y'' = (e^(x+2ln[x-1]))''
(e^x)'' = e^x, since x in this case is (x+2ln[x-1]), we have to derivate this too? so, y'' = e^(x+2ln[x-1]) * (x+2ln[x-1])'' ->
x'' + (2ln[x-1])'' -> 1 + ???
how to derivate 2ln[x-1] ?

##### Share on other sites
original*,

Thank you for the sosmath link. I''m adding it to the forum FAQ!

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

##### Share on other sites
I''ve never used the integrating factor method before, but since there''s literally dozens upon dozens of integration methods and formulas out there, I''m not surprised It appears to be nifty, but if you can recognize the implicit differentation going on beforehand then it saves you a lot of work.

quote:
how to derivate 2ln[x-1] ?

Bah, just reverse the integration It''s what you had originally.

##### Share on other sites
think i got it
the method i find best is the one found at sosmath (integrating factor), others (separable variables, constants variation?) are still not quite clear to me...
so, here we go:

example: solve DE at given condition

xy''-y''= xy-y condition P(2,2)

first we rewite this in the following form:
y'' + p(x)y = q(x)

xy''-y'' = xy-y
y''(x-1) = y(x+1) / x-1)
y'' = y(x+1)/(x-1)
y'' - y(x+1)/(x-1) = 0
p(x) = -( (x+1)/(x-1) )
q(x) = 0

second, find the integrating factor u(x):
u(x) = e^( INT[p(x)dx] )
INT[ p(x)dx ]
INT[ -(x+1)/(x-1)dx ] -> - INT[ (x+1)/(x-1) ]
t = x-1
dt = 1*dx
- INT[ (t+2)/t * dt ] -> - ( INT[t/t dt] + INT[2/t dt] ) -> - ( x + 2Log[x-1] )
u(x) = e^(-x - 2Log[x-1])

third:
y = (INT[ u(x)q(x) ] + C) / u(x)
since q(x) = 0, INT[ 0 ] -> 0
and we get
y = C / u(x) -> y = C / e^(- x -2Log[x-1])
question: this is general solution?

plug in the condition P(2,2):
2 = C / e^(-2)
C = 2e^(-2)
C = 0.27
y = 0.27 / e^(- x -2Log[x-1])
question: this is particular solution?

now, to give it a test, we try to solve starting equation:
xy'' - y'' = xy - y
we have x,y (2,2), we only need the y''
y'' = ( C / e^(- 2 - 2Log[x-1]) )''
this can be solved like
(f/g)'' = (f''g - fg'') / g^2
since f = C, f'' = 0, so first part f''g = 0
and we get:
y'' = - C * e^(-2-2Log[x-1] * (-1-(2/(x-1))) ) / (e^(-2-2log[x-1])^2

y''(x-1) = y(x+1)
plugin 2,2 and C

y'' = 2*3
y'' = 6
so, spinach again...
(- 0.27 * e^(-2) * (-3)) / (e^(-2))^2 = 6
0.81 * e^(-2) / e^(-4) = 6
0.81 * 0.135 / 0.0183 = 6
0.81 * 7.278 = 6 if my calc does not lie, this is true
the end...

would be nice if someone checked this, just to make sure
also, a short enlightment on other methods would be cool, till then peace, vsc out