|
-
Sep 10th, 2001, 06:27 AM
#1
Thread Starter
Fanatic Member
Calculus problem
I remember this problem from school and I have mucked around with solutions.
The problem is: You are crossing a railway line that is x feet across, your speed is y, there is a train approaching at speed z. What is the optimal angle to cross the railway at to maximize the time available to cross?
Any ideas,
P.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Sep 10th, 2001, 06:51 AM
#2
transcendental analytic
You need to know where both you and the train is initially positioned as well.
As time needs to be maximized, the train will pass by as you are across, that is final position and time are equal
Y = you
T= train
.p intial position vector
.v velocity vector
.t time scalar
the equation is as follows:
Y.p+Y.v*Y.t=T.p+T.v*T.t
substitute your velocity vector with the angle (a) and length (l):
Y.p+(cos(a)*l*j+sin(a)*l*k)*Y.t=T.p+T.v*T.t
j and k are unit vectors. Solve a
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Sep 10th, 2001, 11:21 AM
#3
Thread Starter
Fanatic Member
Yep - but whats the equation? - I was being lazy and doing it on the train on the way home. I'll bowdlerize yours
Somehow I knew you'd answer this one.
Tx.
P.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Sep 10th, 2001, 12:54 PM
#4
Lively Member
You are really sick.
or what would you call a person who relies on calculus at death's door ?
-
Sep 10th, 2001, 01:25 PM
#5
transcendental analytic
|(Y.p+(cos(a)*l*j+sin(a)*l*k)*Y.t)-(T.p+T.v*T.t )|
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Sep 10th, 2001, 04:15 PM
#6
Code:
/|
a/ |b
/ |
/ |
/ |
-----
c
I always learned "b" was the shortest route So fastest....?
Pseudo code:
Code:
If Train = NOT NEAR
Walk
Else
If Train = NOT Really NEAR
Run(Fast)
else
If You = NOT Stupid
Wait(TrainPassed)
else
Run(Screaming AND Hope_Not_To_Get_Hit)
end if
End If
-
Sep 11th, 2001, 07:11 AM
#7
Thread Starter
Fanatic Member
Hmmm. I think Kedaman's help is a little more concrete...
Cheers,
P.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Sep 15th, 2001, 05:41 AM
#8
Addicted Member
The max. time to cross means that the train will be level with you just as you reach the other side of the tracks.
When you have crossed the tracks, at angle a, then you have also travelled x * y * t * tan a along the track
While the train will have travelled z * (d + y * tan a) * t along the track.
Where d is the starting distance down the track of the train.
Angle a is the angle of crossing from perpendicular to ther tracks.
This gives:
tan a = z * d / (x * y - z * y)
with no calculus.
-
Sep 15th, 2001, 06:01 AM
#9
transcendental analytic
Well apparently paulw insisted on having it, so he changed the issue into maximize distance between self and train, I would never spoil the chance to avoid calculus
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Sep 16th, 2001, 04:45 AM
#10
Addicted Member
I have a degree in avoiding calculus.
-
Sep 16th, 2001, 12:08 PM
#11
Hyperactive Member
There are 10 types of people in the world - those that understand binary, and those that don't.
-
Sep 17th, 2001, 03:37 AM
#12
Thread Starter
Fanatic Member
Sadly, I have a degree in Mathematics and I can't remember this 
P.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Sep 17th, 2001, 07:17 AM
#13
Hyperactive Member
degree...
where did you read ure degree??
There are 10 types of people in the world - those that understand binary, and those that don't.
-
Sep 17th, 2001, 08:23 AM
#14
Addicted Member
Re: degree...
Originally posted by DavidHooper
where did you read ure degree??
Mostly from the comfort of my bed, with occasional days out to the Anti-Calculus University of Anti-Hard-Workingshire.
-
Sep 17th, 2001, 10:59 AM
#15
Thread Starter
Fanatic Member
King's College, London.
but it was a long time ago, and I was very young...
Cheers,
P.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Sep 18th, 2001, 08:22 PM
#16
New Member
I have to question chrisf's solution based on dimensional analysis. Looking at his denominator (x * y - z * y), we have ft * ft/s - ft/s * ft/s. That I have problems with subtracting unlike units. One of the items this problem is missing is how far away is the train at time zero.
_W_|
\ |
\ | X
\ |
\|_________Wo___________
So we have (y*t)^2 = W^2 + X^2
and W + Wo = z*t
This can be viewed as maximizing W, or t or the angle.
I'll leave this to the calculus experts to do the rest.
Enjoy life,
Parke
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|