On Apr 6, 9:09 am, Danread5 <danre...@me.com> wrote:
>
> sage: d = sqrt(x^2 + 5^2)
> sage: D = sqrt((20-x)^2 + 10^2)
> sage: T = d + D; T
> sqrt(x^2 + 25) + sqrt((x - 20)^2 + 100)
> sage: diff(T, x)
> (x - 20)/sqrt((x - 20)^2 + 100) + x/sqrt(x^2 + 25)
> sage: solve((x - 20)/sqrt((x - 20)^2 + 100) + x/sqrt(x^2 + 25) == 0,
> x)
> [x == 20*sqrt(x^2 + 25)/(sqrt(x^2 + 25) + sqrt(x^2 - 40*x + 500))]
>
> For some reason, Sage isn't solving completely for x, or isn't
> 'seeing' the x^2...
>
> Any help gladly appreciated!

This problem can be easily solved mentally -

"Find the point on the x-axis, the sum of distances of which to (0, 5)
and (20, -10) is minimal."

Of course, it is the point of intersection of the line connecting
these points and the x-axis.

Now, it is obvious from the picture including also vertical lines at
x=0 and x =20, that the 2 triangles are similar. The left triangle has
height 5, and the right one has hight 10, twice greater, so their
sides on the x-axis also have the same ratio, 1:2, i.e. the length of
the horizontal side of the left triangle is 1/3 of the distance from 0
to 20, i.e. 20/3.

Alec

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to