Find the potential in the interior of a sphere of unit radius when the potential on the surface f(θ)=cos^2(θ).

Should it be Like this:f(r,θ)=(r/R)cos^2(θ)?

Likely.

But I am writing this as a trial and error...

How to show this is the answer...i.e. what should be the correct procedure of approach?