MapleSpaceDist.mws

>    with(plots):surface2:=implicitplot3d(2*x+2*y-z=2,x=-3..6,y=-3..6,z=-1..5,orientation=[20,65],labels=[x,y,z]):

>    Points:=pointplot3d({[1,1,2],[5,5,0]},symbol=cross,symbolsize=50,color=green):

>    line1:=spacecurve([1+2*t,1+2*t,2-t,t=0..2],thickness=2,color=blue,axes=normal,orientation=[20,65]):

>    surface1:=plot3d(x^2+y^2,x=-3..6,y=-3..6,view=-1..5,axes=BOXED,orientation=[20,65],labels=[x,y,z]):

>    vector1:=arrow(<1,1,2>,<1,1,-0.5>,width=[0.06,relative],color=red,thickness=3):

>    display(Points,surface1,line1);

[Maple Plot]

>    display(vector1,Points,surface1,surface2,line1);

[Maple Plot]

Change the View

>    display(vector1,Points,surface1,surface2,line1);

[Maple Plot]

Graph of the distance function

>    plot3d(sqrt((x-5)^2+(y-5)^2+(x^2+y^2)^2),x=-1..3,y=-1..3,view=5..9,axes=BOXED,orientation=[20,65],labels=[x,y,z]);

[Maple Plot]

Setting the partial derivatives equal to zero, solving the system, finding the minimum distance (This was in fact done prior to the work shown above.)

>    f:=sqrt((x-5)^2+(y-5)^2+(x^2+y^2)^2);

f := (x^2-10*x+50+y^2-10*y+x^4+2*x^2*y^2+y^4)^(1/2)

>    fx:=diff(f,x);

fx := 1/2/(x^2-10*x+50+y^2-10*y+x^4+2*x^2*y^2+y^4)^(1/2)*(2*x-10+4*x^3+4*x*y^2)

>    fy:=diff(f,y);

fy := 1/2/(x^2-10*x+50+y^2-10*y+x^4+2*x^2*y^2+y^4)^(1/2)*(2*y-10+4*x^2*y+4*y^3)

>    solve({fx=0,fy=0});

{y = 1, x = 1}, {y = 1/2*RootOf(_Z^2+2*_Z+5,label = _L1), x = 1/2*RootOf(_Z^2+2*_Z+5,label = _L1)}

>    eval(f,{x=1,y=1});

36^(1/2)

OR

>    ff:=(x-5)^2+(y-5)^2+(x^2+y^2)^2;

ff := (x-5)^2+(y-5)^2+(x^2+y^2)^2

>    ffx:=diff(ff,x);

ffx := 2*x-10+4*(x^2+y^2)*x

>    ffy:=diff(ff,y);

ffy := 2*y-10+4*(x^2+y^2)*y

>    solve({ffx=0,ffy=0});

{y = 1, x = 1}, {y = 1/2*RootOf(_Z^2+2*_Z+5,label = _L1), x = 1/2*RootOf(_Z^2+2*_Z+5,label = _L1)}

>    eval(f,{x=1,y=1});

36^(1/2)

>