# Homework Help: Path of light in a medium with increasing refractive index

1. Feb 6, 2017

### ChrisJ

1. The problem statement, all variables and given/known data
A medium has a refractive index, $n(y)=n_0 \sqrt{1+y/a}$ which increases along y. Assume $n_0$ and $a$ are constants and always positive. If a light beam enters horizontally along y, through (0,0), find the curve the path of the light ray takes.

2. Relevant equations
$F - y' \frac{\partial F}{\partial y'} = \textrm{constant}$
$ds = dx \sqrt{1+(y')^2}$
Fermats principle

3. The attempt at a solution
I am completely lost on this one. Was only introduced to functionals and calculus of variations etc less than two weeks ago. This is the first time attempting a problem.

I just don't know where to start. It has to take the path which takes the shortest time, and light travels slower with increasing n. So I assume one needs to $\frac{\partial n}{\partial y}$ to be as small as possible.

I was not sure if I needed it yet or at all but found $\frac{\partial n}{\partial y}=\frac{n_0}{2\sqrt{a^2+ay}}$ .

From Fermats Principle, using my $F$ as $F=n(y) \sqrt{1+y'^2}=n_0 \sqrt{1+y/a}\sqrt{1+y'^2}$

Breaking the equation down I put in the relevant equations section I found
$$F - y'\frac{\partial F}{\partial y'} =n_0 \sqrt{1+y/a}\sqrt{1+y'^2}- y' \left[n_0y'(1+y/a)^{1/2}(1+y'^2)^{-1/2} \right ] = C \\ C = n_0 \sqrt{1+y/a} \left [ (1+y'^2)-y'^2(1+y'^2)^{-1/2}) \right ] \\ C = n(y) \left [ (1+y'^2)-y'^2(1+y'^2)^{-1/2} \right ] \\ C = \frac{n(y)}{\sqrt{1+y'^2}}$$

Now I am stuck on where to go from here, just a little help/advice would be much appreciated.

Thanks :)

2. Feb 6, 2017

### Staff: Mentor

What is F?

You should be able to find an equation for x'(y) where x is the displacement orthogonal to y and the derivative is with respect to y. After that it is just a single integral to solve.

3. Feb 6, 2017

### ChrisJ

F is from the Euler-Lagrange equation, which has normally been a function of y, y' and x in the examples we've had. And when it does not depend explicitly on x, it simplifies (according to our lecturer) to the first equation I put in the relevant equations section.

An equation for x'(y)? I didn't realise that was ever needed? Since the functional depends only on y, y' and I think implicitly on x. I think the wording of the question is a bit confusing without the diagram that was included, essentially the light beam is entering parallel to x, through (0,0) and then gets curved down the y axis. I copied the question a bit wrong, it was meant to say "enters horizontally through y" not along.

Do I just rearrange the equation I ended with in my attempt and solve for y' and integrate over x? If so, what would the upper limit be?

I am really confused with this problem, as it is unlike any other examples the lecturer went through. Although I can see that is somewhat similar to the Brachistochrone problem, but instead of the potential energy/gravity we have the refractive index which acts similar to the potential. Most other examples involved some constraints on the end point, but with this one I cant see what that should be, if there should be one at all.

4. Feb 7, 2017

### Staff: Mentor

Needed? I think that approach is much easier as it does not involve differential equations.
Some variable. You'll get the path as function of that variable, which is your trajectory. I would expect x(y) to be easier to find than y(x).

5. Feb 7, 2017

### haruspex

Perhaps you already understand this, but in case not...
Euler's equation is for extremals of ∫F.dx. In the present case, that gives the time taken to move from one x value to another.
The result seems paradoxical. If the ray enters horizontally at x=0, and takes the least time to reach, say, x=1, why would it head upwards to where the index is greater? Logically, it should immediately deflect downwards to where the going is faster.
I think the resolution is that the equation assumes the initial direction is optimised for the destination. If you were to fix, say, y=0 for the endpoint then the initial y' would be negative. Since we are instead fixing the initial y' as zero, and final x as xf say, we will find the path to some (xf, yf) where yf is such that an initial y' of zero is the best choice for it.

Hope that helps.

6. Feb 7, 2017

### epenguin

It did not understand what 'enters horizontally' meant, but I see it was in fact a misunderstanding. I still don't understand how the light is supposed to enter the medium even after you have corrected! Normal? Or what?

The thing about Fermat's principle is that it was first applied as it seems you are applying it here to refraction and a 'corpuscular' theory of light. But for that theory to work don't you need to assume that the light travels faster in the denser medium?

7. Feb 7, 2017

### haruspex

I interpret it as parallel to the x axis. It's the "along y" that did not make sense to me. "Through y" is only marginally better.
Why do you say that? ∫n(y)ds is minimised.

8. Feb 8, 2017

### epenguin

Have not time at the moment to go through what was done, but what has to be minimised is Time which = ∫(dy/dt) dt.
However the OP said "light travels slower with increasing n", but it has to be formulated instead that it travels faster e.g. (dy/dt) = A + Bn . (A, B positive).

I would only suggest also that whatever the student has done, if in difficulty he first formulate the simpler problem of being incident normal so that the space path is simple and straight, and analyse the tim- distance relation there, after which is in better position to analyse other angles of incidence in which case the light follows a curved path in space.

Last edited: Feb 8, 2017
9. Feb 8, 2017

### haruspex

No, Δt = ∫(1/v)ds, where v = ds/dt and ds2=dx2+dy2.
All of ChrisJ's work in post #1 looks fine to me. The last equation leads to a parabola, I believe.

Edit:
As I understand the question, the ray enters along the negative x axis and encounters a surface along the y axis, so it is incident normal. But because there is an index gradient in the y direction the path is not straight.

@ChrisJ , are you still stuck? Manipulate your final equation in post #1 to the form y'=....

10. Feb 8, 2017

### ChrisJ

Yes this is correct. The wording of the question is not the best, plus my typo/error in the original post didn't help. It is my fault, I should have included the diagram with the post to make things clearer..

I haven't had a chance to work more on it yet as had other work due today. Will be having another crack this afternoon :) .

11. Feb 8, 2017

### ChrisJ

Ok well I have worked it through, following similar steps as in examples we have had and I have come to an answer, a more than likely very wrong answer haha. I don't think it is correct. But here is what I did...

ok so from my last equation in my OP, rearranged for$y'$ (and writing $n(y)$ explicitly, found that...

$$y' = \left [ n_0C^{-2}(1+y/a)^{1/2}-1 \right ]^{1/2}$$
Then making a substitution, setting $n_0C^{-2}(1+y/a)^{1/2}=\cosh^2 \theta$
$$y' = \left [ \cosh^2 \theta -1 \right ]^{1/2} = \sinh \theta = \frac{dy}{dx} \\ \therefore dx = \frac{dy}{\sinh \theta}$$
Then from my substitution, solved for $y$
$$n_0C^{-2}(1+y/a)^{1/2}=\cosh^2 \theta \\ n_0^2 C^{-4}(1+y/a)=\cosh^4 \theta \\ y = \frac{\cosh^4 \theta - n_0^2/C^4}{\frac{n_0^2}{C^4 a}} \\ y = a C^4 n_0^{-2} \cosh^4 \theta - a \\ \therefore dy = 4aC^4n_0^{-2} \cosh^3 \theta \sinh \theta d\theta$$
Then dividing $dy$ with $y'=\sinh \theta$
$$dx = \frac{dy}{y'}=\frac{4aC^4n_0^{-2} \cosh^3 \theta \sinh \theta}{\sinh \theta} d\theta \\ dx = 4aC^4n_0^{-2} \cosh^3 \theta \\ x = 4aC^4n_0^{-2} \int \cosh^3 \theta d\theta \\ x = \frac{4aC^4}{n_0^2}(\frac{1}{3}\sinh^3 \theta - \sinh \theta + C_2) \\ x = \frac{4aC^4}{3n_0^2}(\sinh^3 \theta - 3\sinh \theta + C_3)$$

It doesn't look correct to me, I don't know if that was a smart substitution to make, but it was the only one I could think of that would have drastically simplified it.

12. Feb 8, 2017

### haruspex

I'm afraid I disagree with your first equation in post #11. I do not get a nested surd. Looks like you forgot to square a term. If you still get that equation, please post your steps to it.

13. Feb 8, 2017

### ChrisJ

Yes you're correct, I don't know how I missed that!

I now have it as
$$y' = ( n_0^2 C^{-2} + y n_0^2 C^{-2} a^{-1} -1)^{1/2}$$
and setting $n_0^2 C^{-2} + y n_0^2 C^{-2} a^{-1} = \cosh^2 \theta$
$$y' = (\cosh^2 \theta - 1)^{1/2} = \sinh \theta = \frac{dy}{dx} \\ \therefore dx = \frac{dy}{\sinh \theta}$$
and from the subsitution,
$$n_0^2 C^{-2} + y n_0^2 C^{-2} a^{-1} = \cosh^2 \theta \\ y = \frac{\cosh^2 \theta - \frac{n_0^2}{C^2}}{\frac{n_0^2}{C^2 a}} \\ y = a C^2 n_0^{-2} \cosh^2 \theta - a \\ \therefore dy = 2aC^2 n_0^{-2} \cosh \theta \sinh \theta d\theta \\ \therefore dx = \frac{dy}{\sinh \theta} = 2a C^2 n_0^{-2} \cosh \theta d\theta \\ \rightarrow x = \frac{2a C^2}{n_0^2} \sinh \theta + C_2 \\$$
Setting $b = \frac{a C^2}{n_0^2}$
$$x = 2b \sinh \theta + C_2 \\ y = b \cosh^2 \theta - a$$

14. Feb 8, 2017

### haruspex

What's a useful relationship between sinh and cosh (squared)?

15. Feb 9, 2017

### ChrisJ

Ok if what I have done so far is correct, to get y in terms of x, I've now done...

from $x=2b \sinh \theta + C_2$

$$\frac{x-C_2}{2b}= \sinh \theta = \sqrt{\cosh^2 \theta -1} \\ \frac{(x-C_2)^2}{4b^2}+1= \cosh^2 \theta$$
and then substituting that into $y=b \cosh^2 \theta - a$
$$y(x)=b \left( \frac{(x-C_2)^2}{4b^2}+1 \right ) -a \\ y(x)=\frac{(x-C_2)^2}{4b}+b-a$$

If this is correct so far, do I need to determine those two integration constants to fully solve it, if so, how on earth would I go about that?

Btw, thanks a lot for you're help/guidance :)

Last edited: Feb 9, 2017
16. Feb 9, 2017

### haruspex

You can easily check whether it is a solution of the original differential equation.
(I solved the one at the start of post #13 by considering polynomial solutions. It was immediately apparent that a quadratic should be a solution.)
You know two facts at x=0. What are they?

17. Feb 10, 2017

### ChrisJ

It doesn't matter too much now as I have already submitted the coursework, but to find the constants, I used that we know that $y(0)=0$ and that $y'(0)=0$ and ended up doing it in a rush, but I think I remember that my final answer was $y(x) = \frac{x^2}{4a}$ and got that answer like 10 minutes before the coursework was due so didn't have time to double check my work, and now after double checking things know that it is not correct. Should still get close to full marks for doing most of the work and following the correct steps.