Question 1205414
<pre>
{{{system((x+2)^2+(y-5)^2=4,-4x+y=k)}}}
{{{y=4x+k}}}

{{{drawing(2000/9,400,-10,10,-13,23,
graph(2000/9,400,-10,10,-13,23), circle(-2,5,2),line(-11,-23,11,65))}}}

That's a circle with center (-2,5) and radius 2 intersecting a line with
slope 4 and y-intercept k. So, k, the y-intercept of the line will be the
largest when the line is as far to the left of the circle and still intersects
the circle.

{{{drawing(2000/9,400,-10,10,-13,23,line(-2,5,-3.94025,5.480704),
graph(2000/9,400,-10,10,-13,23), circle(-2,5,2),line(-11,-23,11,65))}}}

That's when the line is tangent to the circle on the left side. That's also 
when the distance from the line to the center is the radius 2.

We use the point-to-line distance formula:

We get 0 on the right side of the line's equation:

{{{4x-y+k=0}}}

Perpendicular distance from the point (x<sub>1</sub>,y<sub>1</sub>)
to the line Ax+By+C=0 is

{{{d}}}{{{""=""}}}{{{abs(Ax[1]+By[1]+C)/sqrt(A^2+B^2)}}}

{{{2}}}{{{""=""}}}{{{abs(4(-2)-5+k)/sqrt(4^2+(-1)^2)}}}

{{{2}}}{{{""=""}}}{{{abs(-8-5+k)/sqrt(16+1)}}}

{{{2}}}{{{""=""}}}{{{abs(-13+k)/sqrt(17)}}}

{{{2sqrt(17)}}}{{{""=""}}}{{{abs(-13+k)}}}

{{{-13+k}}}{{{""=""}}}{{{"" +- 2sqrt(17)}}}
{{{k}}}{{{""=""}}}{{{13 +- 2sqrt(17)}}}
We want k to be a maximum so we use the + sign.

{{{k}}}{{{""=""}}}{{{13 + 2sqrt(17)}}} approximately 21.24621125.

Oh darn, I just realized that x and y had to be integers. Instead of
starting over it looks like the nearest integer x could be -4. So we have
to move the line a tiny bit right.

So, we plug -4 for x in the circle equation:

{{{(-4+2)^2+(y-5)^2=4}}}
{{{(-2)^2+(y-5)^2=4}}}
{{{4 + (y-5)^2=4}}}
{{{(y-5)^2=0}}}
{{{y=5}}}

So (-4,5) is the nearest point to the point of tangency that
has both coordinates integers.
So the line y=4x+k should go through (-4,5), moving it a tiny
bit right.

{{{y=4x+k}}}
{{{5=4(-4)+k}}}
{{{5=-16+k}}}
{{{21=k}}}

So the answer is 21.
 
Edwin</pre>