Hello /sci/, I need a little bit of help. I'm trying to teach myself differential equations because I'm out of school due to financial reasons. I'm working on the pdf below.
http://www.cengage.com/math/book_content/0495108243_zill/projects_archive/de8e/Project3.pdf
My question is how I would approach solving this ODE with Euler's method. I've attached a picture of the actual problem to hopefully make it easier for you.
My initial value is y(L)=0, so do I just move backwards in steps of L (i.e. 1L, 0.75L, 0.50L, 0.25L, 0L) and make my Euler table that way?
>>7665323
I don't know Euler's method so I won't try to teach it, but this is how I would solve your equation (I rename your ratio R):
[math] y'= \frac{ y-R \sqrt{ x^2+y^2 }}{x} [/math]
[math] y'= \frac{y}{x} - R \sqrt{ 1+ \left( \frac{y}{x} \right)^2 } [/math]
sub in u=y/x,
[math] x u' + u = u - R \sqrt{ 1+ u^2 } [/math]
[math] x u' = - R \sqrt{ 1+ u^2 } [/math]
which is separable.
>>7665396
So I would just divide each side by the square root term and by x, and then integrate each side? Then, I could solve for R by re-substituting y/x for u?
>>7665490
Exactly. Don't forget to use your boundary condition to find the constant of integration.
>>7665498
Okay, cool! And I use my initial value that y(L)=0, correct? Could I also say that y(0)=0, since I know that I'll be at the same vertical position once I reach the "opposite shore" as I was when I started? Then I could go from 0 to L is a positive fashion.
You've helped a lot. Thank you. I think that this will set me on the right track for the rest of the problem.
They have removed t from the equation. Euler's method (I think) would be to choose a value for dx, say -1/N, set x=w y=0, then update
ynew = y + (dy/dx) dx
xnew = x + dx
Here dy/dx is the right hand side of (3) in the book. After N updates, you will get x=0, and you can see how close y is to zero. You would need to run this many times, with different values of v_r/v_s, and maybe different values of N, until you get close to the kayaks.
Solving explicitly might be easier!
>>7665505
This is a first order differential equation, which means that you'll only pick up one constant of integration (i.e. you only need one boundary condition, which is given). Since you are integrating with u and x, it is probably better to change your BC to u(L)=y(L)/L=0.
You can either:
>Perform an indefinite integral and then sub in your BC to get the constant you pick up.
>Perform the integral on the LHS from 0 to u and on the RHS from L to x.
You should try to understand the latter one, you might be in the mindset that you have to integrate between constant points (given that you suggested 0 to L), but your limits are allowed to be variables.
>You've helped a lot. Thank you.
My pleasure, hope your finances improve anon, night night.
>>7665704
Yes, arbitrary step. I think it should be -w/N instead of 1/N though. Euler is for a numerical solution though, not an explicit one.
In the end, it seems as long as you swim faster than the river flows, you will make it.
>>7665732
Yeah, that's the conclusion I came to as far as logic goes. Now I just need to prove it mathematically. I think I see what you're saying about the changing steps, based on what you're saying and what my book is saying. I think I'll just plug it into a math program and let it run a couple thousand iterations for me. Thank you so much!