I've been trying to work out this question for hours and I can't seem to figure it out.

Question: "Point 'A' is situated in the bottom left hand corner of a vertical rectangle with the dimensions 6m x 3m. Point 'B' is situated in the opposite top corner of the rectangle. What is the minimum distance that could connect the two points of this right angled triangle? You must find this answer using optimisation and calculus."

I have worked out the answer is 6.708 metres using Pythagoras' Theorem, however I can't seem to get this answer using optimisation and calculus. I would assume you would begin with the following:
d = square root(x^2+y^2)
Where d= distance

4 answers

Let's put the rectangle on the x-y grid
so that A is (0,0) and B is (3,6)
the equation of the line from A to B is clearly
y = 2x
d = √(x^2 + y^2)
= (x^2 + 4x^2)^(1/2) = √(5x^2) = (√5)x
dd/dx = √5

So for each unit of x, the length changes by √5

x goes from 0 to 3,
clearly when x = 0 , d = √5(0) = 0 , (the minimum ? )
when x = 3 , d = √5(3) = appr 6.708
Thank you so much for your help on this :)
Just a question though..
After you say y = 2x, you sub in y as 4x? ie. =(x^2+4x^2)^(1/2)
where did the '4x' come from?
since we had y^2
subbing in 2x for y would give us (2x)^2 = (2x)(2x) = 4x^2
notice it was 4x^2 and not 4x like you stated
Oh I see, thankyou for your help!!