# [Maxima] Problem with solve

Andrej Vodopivec andrej.vodopivec at gmail.com
Fri Dec 14 15:22:13 CST 2007

```Barton has added a nice package for solving such equations. You will

(%i2) ea : a/15+sqrt((3-a)^2+1)/10\$
(%i3) to_poly_solve(diff(ea, a), a);
Assuming that 30*sqrt((3-a)^2+1) # 0
(%o3) [[a=-(2*sqrt(5)-15)/5]]

HTH,

Andrej

On Dec 14, 2007 10:16 AM, Rene Grothmann <2007 at rene-grothmann.de> wrote:
> I tried one of the problems I gave to student in Maxima, and failed. You
> have to minimize the following (a shortest path problem between (0,0) and
> (3,1) with the side condition, that you can travel faster along the x-axis -
> I teach beginner classes this year):
>
> ea : a/15+sqrt((3-a)^2+1)/10
>
>                                              2
>                             a    sqrt((3 - a)  + 1)
> (%o1)                       -- + ------------------
>                             15           10
>
> solve(diff(ea,a)=0,a)
>
>                                       2
>                               2 sqrt(a  - 6 a + 10) - 9
> (%o2)                  [a = - -------------------------]
>                                           3
>
> Of course, it is quite easy to solve this by hand, or guiding Maxima to
> solve it. But is there any way to find the soluton automatically in Maxima?
>
> By the way, this equation has the interesting property, that you get a false
> solution, if you do it by hand the usual way, isolating the sqrt, squaring
> and solving.
>
> R. Grothmann
>
> PS: I take this opportunity to thank Maxima for existence, and those
> maintaining it. It has been of great value for my Euler program.
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
```