This problem appears in another thread and as usual is solved there. But can we get a nice approximation using only geogebra?
Find the value of a that minimizes the sum of the two distances of the line segments (3,5) (1,a) and (1,a)(4,9)
1) Create a slider the goes from -10 to 10. It will be called a.
2) Set rounding to 15 digits in options.
3) Create point (3,5) and (1,a) by entering that into the input bar.
4) Now enter point (4,9).
5) Draw line segment s BC and BA.
6) b and c will appear in the algebra pane.
7) Enter in the input bar dist =b +c
Now adjust the position of the slider on the screen to where you can see it and hide the x and y axes.
8) Use the shift and right arrow to increment the slider a until you get the smallest value you can for dist. This will happen at a = 6.6
9) Go back into the slider and adjust the increment smaller and smaller to zero in on the a value that produces the smallest value for dist.
10) Play with really small increments until you settle on the smallest value for the variable dist. It will be 6.6.
We are done. No calculus, no vectors, no inequalities and we have an answer! See the diagram below.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Thinking is cheating.