Application of differentiation. A sphere, of radium 26cm, has circular cylinder inscribed within it sycg that edges of the 2 circular ends of the cylinder are always on the surface of the sphere.At a particular instant, the radius of the cylinder is 24cm and is decreasing at the rate 0.5cm/s. Find the rate at which the height is changing at that instant. Find the radius of the cylinder when the curved surface area of the cylinder is maximum. 
I've no idea for this question. Can anybody guide me? Thanks a lot.
 A: See the image below for reference. There are two parts to the question, so we'll try them one at a time:
"At a particular instant, the radius of the cylinder is 24cm and is decreasing at the rate 0.5cm/s. Find the rate at which the height is changing at that instant."
Let $r$ be the radius of the cylinder, and let $h$ be the height of the cylinder. Applying the Pythagorean theorem to the triangle in the diagram, we get $${r^2+(\frac h 2) ^2}=26^2 \ \Rightarrow \ {r^2+\frac {h^2} 4}=676 \ \Rightarrow \ h^2=2704-4r^2 \ \Rightarrow \ h=\sqrt {2704-4r^2}$$
Now that we have a formula for $h$ that depends on $r$, we can use differentiation to find the instantaneous rate of change in height:  $$h'=\frac 1 {2 \sqrt {2704-4r^2}}*(-8r)=\frac {-4r} {\sqrt {2704-4r^2}} $$ So when $r=24$, we just plug it into the equation above and we get $h'=-\frac 1 5$, meaning the tangent of the function $h$ has a slope of $-\frac 1 5$ at $r=24$. This means that for every centimeter change in radius, there is $-\frac 1 5$ centimeter change in height. Then, taking into account the fact that the radius is decreasing at a rate of $0.5$cm/second at that moment, we multiply that by $-\frac 1 5$ and see that the height is increasing at a rate of $0.1$cm/second at that moment.
Now for the second part of the question:
"Find the radius of the cylinder when the curved surface area of the cylinder is maximum."
Let $S$ be the curved surface area of the cylinder (i.e. the two flat ends are not included), let $r$ be its radius, and $h$ be its height. We know $$S=2h\pi r$$
but because we're trying to find the radius when the surface area is a certain way, we want to write it in terms of $S$ and $r$ only. From our previous work, we can already put $h$ in terms of $r$. Substituting $h=\sqrt {2704-4r^2}$ into our equation for $S$ we get
$$S=2\pi r\sqrt {2704-4r^2}$$
Now we take the derivative of S and set it equal to zero in order to find where $S$ is at its max and mins. : $$S'=\frac {-8\pi r} {\sqrt {2704-4r^2}}+2\pi \sqrt {2704-4r^2}$$  Let $S'=0$: $$0=\frac {-8\pi r} {\sqrt {2704-4r^2}}+2\pi \sqrt {2704-4r^2}$$ We need to solve for $r$ now, so we multiply both sides by $\sqrt {2704-4r^2}$ and get $$0=-8\pi r +2\pi (2704-4r^2)=-8\pi r^2-8\pi r+5408\pi$$ Divide by $-8\pi$ on both sides to get $$0=r^2+r-676$$ Using the quadratic formula, the two solutions are $$r=\frac {-1\pm \sqrt {2705}} 2$$ However, only one of these values of $r$ is positive, and since you can't have a "negative length" in this context we choose the positive $r$ as our answer. You can plug in some "test values" for $r$ on various intervals and see if the resulting $S'$ are positive or negative, and this will assure you that the positive $r$ will indeed give you the maximum $S$. Therefore, $$r=\frac {\sqrt {2705}-1} 2$$ when $S$ is at its maximum value.

