# Find the distance I traveled (c) by doing cos(a+b)?

1. Jan 5, 2005

### Gamish

If I travel A distance north, and B distance west, then can I find the distance I traveled (c) by doing cos(a+b)? I think that cos serves some sort of a purpose in finding the distance C, but I just can't figure it out. Can someone please help me out.

2. Jan 5, 2005

3. Jan 5, 2005

### Gamish

Im sorry, I think I should re-word my question. If I traveled from city City X to city Y, but I did not travel in a straight ling, how do I now the distance from city X to city Y? Instead of traveling in a straight line, I travel like x miles north, then x miles west. Sure, I can find the hyphotenius, but how do I find the distance I traveled from city X to Y?

(1/3*3 / 2) <> (1/2)

4. Jan 5, 2005

### HallsofIvy

"cos(a+b)" has nothing to do with this, especially since a and b are not angle!

da willem's answer is the one you want:

Pythagorean theorem: if the legs of a right triangle (the sides adjacent to the right angle) have length a and b and c is the length of the hypotenuse (the side opposite the right angle), then c2= a2+ b2.

5. Jan 5, 2005

### dextercioby

It's not important the road u took to get from A to B.You asked about the distance from A to B.These are towns and,unless big tsunami takes one of them with him,they are fixed.The distance is constant and assuming you neglect the earths's curvature,it's given by the pythagorean theorem.

Daniel.

6. Jan 5, 2005

### da_willem

if you travel x miles nort, then x miles west you traveled x=x=2x in total ?!

Or perhaps you mean on a curved surface like the earth. Then are you asking the distance through the earth, or the shortest line over the surface of the earth?

7. Jan 5, 2005

Guys, what he's asking is can he find teh distance between the cities using how far he travelled, if the road he took was not a straight line.

And of course, he can't. And there's no way cosine would help.

8. Jan 5, 2005

### HallsofIvy

Gamish, If you went x north and then y east, the distance YOU traveled is, of course, x+ y.
The straight line distance between your beginnning and ending points is

9. Jan 6, 2005

### Gamish

I am assuming that √(x2+ y2) means sqrt(x^2+y^2). erm, it seems simple, I must do some calculations with my new found knoledge.

Thanks you.

10. Jan 6, 2005

### Gamish

I have 2 questions.

1.Can you use the d=sqr(x^2+y^2) to also calulate the time it will take you to travel in a straight line from city city X to city Y. For instance, it took me 1 hour to travel the X line, then .5 hours to travel the Y line, therefore, at those speeds, if I traveled in a straight line from X to Y, I can calulate the time it will take by sqr(1^2+.5^2)=1.11 hours.

2.What if you didn't travel in 2 lines, but 3. From point a, to b, to c, how do you calculate the distance from a to b in a straight line?

11. Jan 6, 2005

### da_willem

If you move with constant speed v the time t it takes to travel the shortest distance can again be found using the Pythagorean theorem: $$t=d/v=\frac{\sqrt(x^2+y^2)}{v}=\sqrt{\frac{x^2}{v^2}+\frac{y^2}{v^2}}=\sqrt{t_x^2+t_y^2}$$

If there are angles of 90 degrees involved you can use the same theorem. Else you will have to use trigonometry.

Last edited: Jan 6, 2005
12. Jan 6, 2005

### Janitor

Something to keep in mind is that certain functions used in applied mathematics can only take arguments that are pure numbers. For instance, trigonometric functions like cosine don't make sense if the argument has units of length.

13. Jan 6, 2005

### Gamish

Oh, it just hit me! In a common sense way, I just figured out how to calulate the time of the shortest distance.

$$t=d/v=\frac{\sqrt(x^2+y^2)}{v}=\sqrt{\frac{x^2}{v^2}+\ frac{y^2}{v^2}}=\sqrt{t_x^2+t_y^2}$$

This is very simple

t=d/s, so if you know the distance by calculating sqr(x^2+y^2), then you already have your distance, so just divide it by the speed! like........ t=sqr(x^2+y^2)/s
But my question is how do u know the speed or time if you only know the distance? Can someone please explaine this is lamen terms?

14. Jan 7, 2005

### dextercioby

Since the distance in a straight line is equal to the product between time of travel along the straight line and the average velocity of travel along the straight line,viz.
$$d=v\cdot t$$.
,u have to know at least 2 of the quantities:if one is distance,u must know either the average velocity,or the time of travel.Knowing only one of them (e.g.the distance) will give u no information about the other 2,except the value of their product,which means that,when geometrically interpreted,they are on a curve,viz.a hyperbola (their product would be constant and from geometry we know that the locus of all points who are on this curve
$$xy=C\neq 0$$ is a hyperbola),meaning an infinite number of solutions.

Daniel.

15. Jan 7, 2005

### Gamish

So, you can calulate the distance from from X to Y, in a straight line by
srq(X^2+y^2) But you cannot calculate the time or speed if you traveled in a straight line? I think I know how to do it tho. I travel to CityX taking 2 routes, X and Y, the time it took me to travel each line was tX and tY, my speed traveling the 2 lines was vX and vY, so I will just use the equation
sqr(x^2+y^2) to calculate it all.

Time it will take to travel in a straight line = sqr(tX^2+tY^2)

Distance traveled in a straight line = sqr(X^2+Y^2)

Speed in a straight line = sqr(vX^2+vY^2)

Mathamaticly, this should work 100%, if I am wrong, please tell me why.

16. Jan 7, 2005

### da_willem

Divide the distance of the short line as you calculated it by your expression for the time it takes you to travel this distance. Compare with your expression for the velocity. Does this work mathematically?

17. Jan 8, 2005

### Gamish

:surprised It didn't work. look

I travel from city A to city B, in 2 straight lines, line X and line Y. If I travel in a straight line, I will express that line as Z.

Distance for X = 1 mile
Time for X = .15 Hours
Speed for X = 6.666 MPH

Distance for Y = 1.5
Time for Y = .225 Hours
Speed for Y = 6.666 MPH

Distance for Z = sqr(1^2+1.5^2) = 1.80277564 mile
Time for Z = sqr(.15^2+.225^2) = 0.270416346 Hours
Speed for Z = sqr(6.666^2+6.666^2) = 9.42714761 MPH

This does not work for straight line Z mathematically. look
speed=d/t = 1.5/.225=6.66666667
This is wrong, it says my speed will be 9.42714761 MPH, and it is wrong for all other units, like distance, time, and also speed. So, I am assuming that you can only calculate the distance in a straight line? But, I still think that there must be a way to do it. If you can calculate distance, you should be able to calculate everything else. Anyway, thank you for all of your replies.

18. Jan 11, 2005

### Gamish

Can someone please coment on the above posting and confirm my calculations? For some reason, they did not work out the way I though they would. you can only calculate distance in a straight line.

19. Jan 11, 2005

### jdavel

Gamish,

Why are you using d = 1.5 and t = .225 to find the speed, d/t, along Z???

And why would the speed along Z be sqr(6.666^2+6.666^2)???

20. Jan 11, 2005

Gamish,