This is the first homework assignment for Lasers and Optomechanics at Syracuse University.
It is due January 23, 2026
You will need to complete the questions in this jupyter notebook and submit it via gitlab
Tech References¶
%matplotlib widget
from ipywidgets import *
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
plt.style.use('dark_background')
fontsize = 14
mpl.rcParams.update(
{
"text.usetex": True,
"figure.figsize": (9, 6),
"figure.autolayout": True,
"font.family": "serif",
"font.serif": "georgia",
# 'mathtext.fontset': 'cm',
"lines.linewidth": 1.5,
"font.size": fontsize,
"xtick.labelsize": fontsize,
"ytick.labelsize": fontsize,
"legend.fancybox": True,
"legend.fontsize": fontsize,
"legend.framealpha": 0.7,
"legend.handletextpad": 0.5,
"legend.labelspacing": 0.2,
"legend.loc": "best",
"axes.edgecolor": "#b0b0b0",
"grid.color": "#707070", # grid color"
"xtick.color": "#b0b0b0",
"ytick.color": "#b0b0b0",
"savefig.dpi": 80,
"pdf.compression": 9,
}
)1Approximations Review¶
In this course, you will need to remember and use some basic approximations. These approximations all come from taking the Taylor Expansion of a function about some point :
1.1Question 1: Binomial Approximation¶
The binomial approximation to first order in is as follows:
Question 1A¶
Derive the binomial approximation using the Taylor Expansion to first order about
Question 1B¶
Find the second and third order terms of the binomial approximation
Question 1C¶
Plot the binomial function on for .
Compare to plots of the first, second, and third order binomial approximation.
At what does each approximation fail, becoming greater than 5% error?
Question 1A Solution: (This would be the cell you fill out)¶
Let
then at ,
Then the first derivative is
and the derivative evaluated at is
The Taylor Expansion to first order then becomes
Question 1B Solution:¶
Taking the second and third derivatives, and evaluating at 0 yields
The second order expansion is
The third order expansion is
def binom(xx:float, nn:float):
"""Binomial function (1 + xx)^nn
Inputs:
-------
xx: float or array of floats
binomial variable
nn: float
binomial exponent
Output:
-------
binom: float or array of floats
binomial expansion
"""
return (1 + xx)**nn# Parameter definitions. Protip: never make single-letter variable names
nn = 0.5
xx = np.linspace(-1, 2, 100)
taylor0 = 1
taylor1 = taylor0 + nn * xx
taylor2 = taylor1 + 0.5 * nn * (nn - 1) * xx**2
taylor3 = taylor2 + (1/6) * nn * (nn - 1) * (nn - 2) * xx**3# At which x does the error become greater than 10%?
# First, we divide the approximation by the real function,
# Second, we subtract 1 from that ratio
# Third, we take the absolute value of the subtraction
# Fourth, we look for the first location where the final result is greater than 0.1
# Fifth, we find where x > 0
# Sixth, we take the intersection of the indices found
# Seventh, we find the first index where the error is large for plotting
error = 0.05
model = binom(xx, nn)
xx_errors = np.array([])
for taylor in [taylor1, taylor2, taylor3]:
abs_errors = np.abs(taylor/model - 1) # final result
indices_error = np.argwhere(abs_errors > error)
indices_x = np.argwhere(xx > 0)
indices_final = np.intersect1d(indices_error, indices_x)
index = indices_final[0]
xx_errors = np.append(xx_errors, xx[index])
print(xx_errors)[0.87878788 1.3030303 1.42424242]
/var/folders/t1/fq8mx5mj0bx4kn1hlgb4hh840000gn/T/ipykernel_46996/3003632814.py:14: RuntimeWarning: divide by zero encountered in divide
abs_errors = np.abs(taylor/model - 1) # final result
fig, s1 = plt.subplots(1)
s1.plot(xx, binom(xx, nn), label="Binomial Function")
s1.plot(xx, taylor1, ls="--", label="Taylor 1")
s1.plot(xx, taylor2, ls="--", label="Taylor 2")
s1.plot(xx, taylor3, ls="--", label="Taylor 3")
s1.axvline(x=0, label=f"$x = 0$")
for ii, xx_error in enumerate(xx_errors):
s1.axvline(x=xx_error, color=f"C{ii+1}",ls=":", label=f"Taylor {ii+1} Error")
s1.set_title("Binomial Approximations about $x = 0$ for $n = " + f"{nn}" + "$")
s1.set_xlabel("$x$")
s1.set_ylabel("$f(x)$")
s1.legend()
s1.grid()
plt.show()1.2Question 2: Sine and Cosine Approximations¶
Repeat the Taylor Expansion approximations for
A. sine and
B. cosine
to second order about .
Make the plots, but you don’t need to calculate the 5% error point.
# Changing the plotting parameter from x -> yy
yy = np.linspace(-np.pi, np.pi, 100)
taylor_sine1 = yy
taylor_sine3 = taylor_sine1 - yy**3 / 6fig, s1 = plt.subplots(1)
s1.plot(yy, np.sin(yy), label=r"$ \sin(x) $")
s1.plot(yy, taylor_sine1, ls="--", label=r"$x$")
s1.plot(yy, taylor_sine3, ls="--", label=r"$x - x^3/6$")
s1.set_title("Sine Approximations about $x = 0$")
s1.set_xlabel("$x$")
s1.set_ylabel(r"$\sin(x)$")
s1.legend()
s1.grid()
plt.show()# Changing the plotting parameter from x -> yy
zz = np.linspace(-np.pi, np.pi, 100)
taylor_cosine0 = np.ones_like(zz)
taylor_cosine2 = taylor_cosine0 - zz**2 / 2fig, s1 = plt.subplots(1)
s1.plot(zz, np.cos(yy), label=r"$ \sin(x) $")
s1.plot(zz, taylor_cosine0, ls="--", label=r"$1$")
s1.plot(zz, taylor_cosine2, ls="--", label=r"$1 - x^2/6$")
s1.set_title("Cosine Approximations about $x = 0$")
s1.set_xlabel("$x$")
s1.set_ylabel(r"$\cos(x)$")
s1.legend()
s1.grid()
plt.show()1.3Question 3: Complex Number Review¶
Question 3A:¶
Plot the following complex function on a domain of :
where for , , and .
Question 3B:¶
Calculate the magnitude and argument for each .
Question 3C:¶
Calculate the velocity of the phasors with respect to , and draw them for each evaluated at
Question 3D:¶
What is the primary difference between and ?
Question 3E:¶
For , substitute for , and calculate the normalized time derivatives : ,
and find expressions for the normalized real polar coordinates .
Discuss how the expressions you found for the polar coordinates relate to the path you plotted for in part A.
What happens if ?
# For Part A, define the complex functions for plotting
def z1(phi):
return 2 + np.exp(1j * phi)
def z2(phi):
return 3 /(2 - np.exp(1j * phi))
def z3(phi, sigma=-0.5, omega=1):
return np.exp((sigma + 1j * omega) * phi)# For Part C, define the derivatives of the complex functions for plotting
def dz1(phi):
return 1j * np.exp(1j * phi)
def dz2(phi):
return 3 * 1j * np.exp(1j * phi) / (2 - np.exp(1j * phi))**2
def dz3(phi, sigma=-0.5, omega=1):
return (sigma + 1j * omega) * np.exp((sigma + 1j * omega) * phi)phis = np.linspace(0, 2*np.pi, 100)
aa = 2
bb = 1
sigma = -0.5
omega = 1
# Make convenient ploting vectors
plot_z1_re = np.real(z1(phis))
plot_z1_im = np.imag(z1(phis))
plot_z2_re = np.real(z2(phis))
plot_z2_im = np.imag(z2(phis))
plot_z3_re = np.real(z3(phis, sigma, omega))
plot_z3_im = np.imag(z3(phis, sigma, omega))Question 3A Solution¶
fig, s1 = plt.subplots(1)
line1, = s1.plot(plot_z1_re, plot_z1_im, label=r"$ z_1 $")
line2, = s1.plot(plot_z2_re, plot_z2_im, lw=2, ls=":", label=r"$ z_2 $")
line3, = s1.plot(plot_z3_re, plot_z3_im, ls="-", label=r"$ z_3 $")
s1.set_xlim([-3,3])
s1.set_ylim([-3,3])
s1.set_aspect('equal')
s1.set_title("Complex Number Plots")
s1.set_xlabel("Real")
s1.set_ylabel(r"$i$")
s1.legend()
s1.grid()
plt.show()Question 3B Solution:¶
Question 3C Solution¶
fig, [ax1,ax2,ax3] = plt.subplots(1, 3, figsize=(12,4))
for ii, func, dfunc, ax in zip(np.arange(1,4),[z1,z2,z3],[dz1,dz2,dz3],[ax1,ax2,ax3]):
text = f"$ z_{ii} $"
dtext = f"$ dz_{ii} $"
color = f"C{ii}"
zz_re = np.real(func(phis))
zz_im = np.imag(func(phis))
line1, = ax.plot(zz_re, zz_im, color=color, label=text)
for phi in np.linspace(0, 3*np.pi/2, 4):
zz0 = func(phi)
dz0 = dfunc(phi)
ax.arrow(np.real(zz0), np.imag(zz0), np.real(dz0), np.imag(dz0), shape='full', color=f"C{ii+3}", lw=1, length_includes_head=True, head_width=.10, zorder=2, label=dtext)
dtext = ""
if ii < 3:
ax.set_xlim([-3,4])
ax.set_ylim([-3,4])
else:
ax.set_xlim([-1,2])
ax.set_ylim([-1,2])
ax.set_aspect('equal')
ax.set_title(text)
ax.set_xlabel("Real")
ax.set_ylabel(r"$i$")
ax.legend()
ax.grid()
plt.show()Question 3D Solution¶
The primary difference between and is the evolution rate, i.e. their derivatives.
Both and trace out perfect circles centered at with radius .
However, the rate at which the circles are traced out are vastly different, which can be seen in the velocities plotted in the solution to Question 3C.
traces out the circle at a constant velocity. starts fast at , and slows down immediately, yielding a minimum velocity at .
Question 3E Solution¶
Subbing in , and taking the time derivatives:
which implies
Recalling from class the generalized time-derivative expressions for polar coordinates:
We can see a direct relation between the real and imaginary parts of the above equations:
This can also be seen in another way:
then taking the derivatives from there.
From the polar derivatives in Eq. (26), we can make some statements about the evolution of the path traced by over time. First, the sign of is of paramount importance to whether decays to zero or grows to infinity.
If , then grows to infinity.
If , then decays to zero.
If , then remains constant, and proceeds in an infinite circle.
For the angular term, is simply the angular frequency of the oscillations intrinsic to .
A negative term is possible here, it flips the propogation of the spiral from counterclockwise to clockwise.
A negative has no impact on the decay rate . It does flip the sign of the angular acceleration term , which is necessary to ensure decay for a negative or growth for a positive .
1.4Question 4: Electric field propogating in 2D¶
In class, we assumed that an plane wave was propogating in the direction, with the electric field oscillating in the direction. Suppose now that the is oscillating in the direction:
Question 4A:¶
What direction of propogation and magnetic field vector are now possible?
Draw a diagram of the electric field vector and the plane of propogation.
Question 4B:¶
What are the expressions for and if we constrain the direction of propogating to be (partially) in the positive direction?
Question 4A Solution¶
The electric field oscillates in the direction.
The direction of propogation of the wave must be perpendicular to that vector, in other words, anywhere in the plane normal to .
The equation for a plane is
where is a point in the plane, and is the normal vector out of the plane.
We set for simplicity, and , then solve. We find that
for all , so the plane of propogation is simply
The diagram of this solution is plotted below.
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
ax = fig.add_subplot(projection='3d')
# Define the plane (e.g., normal vector and a point)
normal = 1/np.sqrt(2)*np.array([1, 1, 0])
point = np.array([0, 0, 0])
# Create a meshgrid for the plane
size = 2
xx, zz = np.meshgrid(np.arange(-size, size, 0.5), np.arange(-size, size, 0.5))
# Calculate the Z values for the plane
# Equation of a plane: ax + by + cz = d, where d = normal . point
d = np.dot(normal, point)
yy = -normal[1] / normal[0] * xx
# Plot the plane
ax.plot_surface(xx, yy, zz, alpha=0.5, color='blue',label="Propogation Plane")
ax.quiver(0, 0, 0, normal[0], normal[1], normal[2], length=1.0, normalize=False, color='red', label=r"$\vec{E}$")
ax.set_xlabel('x')
ax.set_ylabel('y')
ax.set_zlabel('z')
ax.set_title('3D Plane and Arrow')
ax.legend()
# ax.set_axis_off()
plt.show()Question 4B Solution¶
If we constrain the wave to propogate in the positive direction, then from our result above,
And since we know that
we can calculate the curl of the field like
which comes out to be exactly equal to :
1.5Question 5: Spherical Plane Wave Intensity and Radiation Pressure¶
Suppose you have a sinusoidal spherical plane wave source a distance away along the axis from a cylindrical mirror with radius .
Use the center of the spherical wave as the origin, and the distance from that center as the variable .
Assume that the cylinder is in the plane.
Also assume that the spherical wave is emitting total power in all directions.
Question 5A:¶
What is the Poynting vector for the spherical waves?
Hint: Equation 9.49 of Griffith’s E&M may be helpful here
Question 5B:¶
What is the Poynting vector incident on the mirror center?
What about the mirror edge?
Write an expression for the Poynting vector incident anywhere on the mirror’s surface.
Question 5C:¶
Using your result from Question 5B, find the intensity incident on the mirror.
Question 5D:¶
Find the total power incident on the mirror.
Compare to the total power emitted by the spherical plane wave.
Question 5E:¶
Calculate the radiation pressure incident on the mirror.
Also find the radiation pressure force .
Assume the mirror is a perfect reflector.
If the mirror has a mass , what is its acceleration?
1.6Question 5A Solution¶
First, we consider the direction the wave is propogating in. A spherical wave is conveniently propogating in the radial direction. For ease of the next few questions, we define the vector with respect to two angles , such that if and , :
From this definition, if and ,
and if , .
Next, we write what the electric and magnetic fields are for a sinusoidal spherical plane wave. The electric field will be polarized in some direction, which must be orthogonal to the radial direction . We don’t bother to define , although we could using Eq. (36).
where the magnetic field direction is just the remaining orthogonal direction to and . We also note that the phase term , since .
Then the Poynting vector becomes
where we’ve used that in the last line.
Remembering BAC CAB:
yields our solution
%load_ext jupyter_tikz%%tikz
\begin{tikzpicture}[scale=1.5]
% Define parameters
\def\r{4} % wavefront radius
\def\d{2} % distance to cylinder center
\def\a{0.8} % cylinder radius
% Wavefront center at origin
\coordinate (O) at (0, 0);
\coordinate (C) at (\d, 0); % cylinder center
% Draw cylinder with front ellipse (facing origin) and back ellipse
% Front ellipse (facing toward origin)
\draw[red, thick] (C) ellipse ({0.15*\a} and {\a});
% Back ellipse (receded, smaller horizontal scale)
\draw[red, thick] (\d + 1.2, -\a) arc(-90:90:{0.15*\a} and {\a});
% \draw[red, dashed, thick] (\d + 1.2, -\a) -- (\d + 1.2, \a); % hidden edge (dashed)
% Connecting lines (top and bottom)
\draw[red, thick] (\d, \a) -- (\d + 1.2, \a);
\draw[red, thick] (\d, -\a) -- (\d + 1.2, -\a);
% Draw concentric spherical wavefronts (circular contours)
\draw[cyan, thin] (0, 0) circle (0.5);
\draw[cyan, thin] (0, 0) circle (1.0);
\draw[cyan, thin] (0, 0) circle (1.5);
\draw[cyan, thin] (0, 0) circle (2.0);
\draw[cyan, thin] (0, 0) circle (2.5);
\draw[cyan, thin] (0, 0) circle (3.0);
% Mark origin
\filldraw[white] (O) circle (2pt);
\node[white, below left] at (O) {O};
% Mark cylinder center
\filldraw[white] (C) circle (1pt);
% Add dimension labels
\draw[|-|, gray, thin] (0, 0) -- (\d, 0);
\node[below, gray] at (\d/2, 0) {$d$};
\draw[|-|, gray, thin] (\d + 0.3, 0) -- (\d + 0.3, \a);
\node[right, gray] at (\d + 0.3, \a/2) {$a$};
% Label wavefront radius
\draw[gray, thin] (0, 0) -- (\d, \a);
\node[above, gray] at (\d/2, \a/2) {$r$};
\end{tikzpicture}
1.7Question 5B Solution¶
At the center of the cylinder, .
At the edge of the cyclinder in the y-direction, .
We can generally write the magnitude of the as
for any location on the mirror’s surface.
This yields
This means we have a Poynting vector which oscillates spatially across the mirror surface.
These spatial wave front oscillations are very important for raw phase estimates, and are strongly related to the Gouy Phase Accumulation, which will become imporant when calculate higher order mode resonance conditions in optical cavities.
1.8Question 5C Solution¶
For the intensity anywhere on the mirror’s surface , we take our final Poynting vector magnitude and integrate over one phase cycle in time .
To find the Poynting vector magnitude , we identify the normal vector to the cylinder surface as ,
then isolate the direction by dotting with the Poynting vector for Anywhere on the Mirror Surface:
This appropriately scales for the power incident on mirror at an angle .
Now calculating the intensity over the surface
The intensity peaks at and , the nearest locations to the center of the cylinder.
1.9Question 5D Solution¶
The power incident on the mirror is the double integral over the mirror surface out to radius :
We define a radius on the mirror surface
to make our integral easier.
will become a single variable :
For the power calculation, we have
If we let the cylinder radius go to infinity, then the right hand term goes to zero and we recover
To get the total power , we integrate (40) over one cycle to get total intensity , then spatially over a spherical surface.
The power calculation is then a double integral over a sphere’s surface:
which gives us our total power
This makes sense: we should catch half of the power as we let the radius of the cylinder go to infinity, and we have