Hello, janvdl!
You should get a number for the value of x.
A Passenger train is x times faster than a Goods train.
If the trains move in the same directrion, it takes them x times longer to pass each other
than when they're moving in opposite directions. .What is x?
Let v = speed of the Goods train.
Let xv = speed of the Passenger train.
Going in opposite directions, their relative speed is: .xv + v mph.
It is as if the G-train is stopped,
. . and the P-train is approaching at xv + v mph. Code:
* - - - - - * * - - - - - *
| Passenger | → | Passenger |
* - - - - - * * - - - - - *
* - - - *
| Goods |
* - - - *
To pass the G-train, the P-train must move the length of the G-train (LG)
. . plus the length of the P-train (LP).
Suppose it takes t hours for this to happen.
. . Then we have: .(xv + v)t .= .LG + LP .[1]
Going in the same direction, their relative speed is: .xv - v mph
It is as if the G-train is stopped,
. . and the P-train is approaching at xv - v mph.
To pass the G-grain, the P-train must move the length of the G-train
. . plus the length of the P-train.
We are told that this takes xt hours.
. . Then we have: .(xv - v)xt .= .LG + LP .[2]
Equate [2] and [1]: .(xv - v)xt .= .(xv + v)t . . → . . v(x - 1)xt .= .v(x + 1)t
. . Divide by vt: .(x - 1)x .= .x + 1
. . and we have the quadratic: .x² - 2x - 1 .= .0
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . _
Using the Quadratic Formula, the positive root is: .x .= .1 + √2