My question is this:

The potential at the surface of a sphere (radius R) is given by
V_0 = k cos 3theta
where k is constant. Find the potential inside and outside the sphere as well as the surface charge density (lower case sigma(theta)) on the sphere. (assume there is no charge inside or outside the sphere.

So that's my question but the problem is my teacher is really pickey in how students do it and I just want some clarfication so ok. First I did some trig. for the given problem V_0 =3k cos(theta) which I got 4k cos^3(theta) - 3k cos (theta). Then I went to the next step and used the Legendre polynomials which I only used P_1 and P_3 and changed the X's to cosines so P_1 (cos theta) = cos theta and
P_3 (cos theta) = [(5 cos^3 theta)/2 - (3cos theta)/2] which then I had to solve which I did but he did not like that I floated the k around.... since i replaced it as x and y and then in the end I added the k... 4kcos^theta - 3kcos thta = x[(5 cos^3 theta)/2 - (3cos theta)/2] + y cos theta which then I did (5x cos^3 theta)/2 + y - 3x/2 where then I did 4k= 5x/2 and got x = 8k/5 and for the other part I plugged the x to -3k = b- (3x/2) and got b = -3k/5. However he did not like the fact that I kept the k floating around and I do not understand that part....thats the only problem I have...he liked the rest of my work I have done so far but does anyone know what he means? Some clarfication would be a great help! since he did say the outcome (8k/5) P_3 (cos theta) - (3k/5) P_1 (cos theta) was fine but to re-do the way I found the 8k/5 and -3k/5. (Oh and I did find the inside and outside potential and currently finding the surface charge density so I don't need much help in that but any suggestions will be great in knowing which equation would be great to use to find surface potential) Thanks!

It seems like you are working on a problem involving finding the potential inside and outside a sphere with a given potential at the surface. Your teacher is specifically concerned about the way you handled the constant term in your equation. Let me explain how you can address this concern.

In the first step, you correctly manipulated the given potential expression V_0 = k cos 3theta to V_0 = 4k cos^3(theta) - 3k cos(theta).

Now, when using Legendre polynomials to expand the potential, you introduced two variables (x and y) to represent the coefficients of the Legendre polynomials P_1 and P_3. This is a valid approach. However, your teacher's concern seems to be the fact that you kept the constant term (k) floating around during your calculations.

To address this concern, you can modify your approach as follows:

1. Write the potential expression in terms of Legendre polynomials without floating the constant term (k) around:
V(theta) = x P_1(cos theta) + y P_3(cos theta)

2. Substitute the explicit forms of P_1 and P_3:
V(theta) = x cos theta + y [(5 cos^3 theta)/2 - (3cos theta)/2]

3. Equate this expression to the given potential V_0 = 4k cos^3(theta) - 3k cos(theta):
4k cos^3(theta) - 3k cos(theta) = x cos theta + y [(5 cos^3 theta)/2 - (3cos theta)/2]

4. Compare the coefficients of corresponding powers of cos(theta) on both sides:
For the cos^3(theta) term: 4k = (5y)/2
For the cos(theta) term: -3k = x - (3y)/2

5. Solve these two equations simultaneously to find the values of x and y:
From the first equation: y = (8k)/5
Substitute this value of y into the second equation: -3k = x - (3(8k)/10)
Simplify: -3k = x - (24k)/10

6. Rearrange the second equation to solve for x:
x = -3k + (24k)/10 = (8k)/5

So, you indeed obtained the correct values for x and y as x = (8k)/5 and y = (8k)/5 in your original approach.

It seems like your teacher had a specific preference in terms of formatting the final answer and separating the constant term (k) from the coefficients. By presenting the final answer as 8k/5 * P_3(cos theta) - 3k/5 * P_1(cos theta), you comply with your teacher's request and have an acceptable expression.

As for finding the surface charge density (sigma(theta)), you can differentiate the potential expression with respect to the normal direction to the surface of the sphere. The surface charge density can be related to this derivative. However, since you mentioned you are currently working on that part, I won't go into further detail unless you specifically ask for it.