Docsity

Math Phys Problem Set 212A: Contour & Parametric Plots, Linear Algebra, Complex Analysis, Assignments of Physics

Toggle sidebar
bg1
Problems, set 2. PHYSICS 212A: Mathematical Physics
•Problems #1-4 are to be done using Mathematica, problems #5-8 (and 9*) without.
•In Mathematica, look up the following functions (and the ones cross-listed with them) :
(a) ContourPlot, Plot3D, ParametricPlot, ListPlot; check out commands that affect various op-
tions (color, line/point thickness, range of plotted function, etc.)
(b) Table, List and functions related to linear algebra
(c) Solve, NSolve, FindRoot
1. Plot the following function
f(x, y) = 3 exp Ã−(x+ 2)2+ (y+ 2)2
3!−4
(x+ 1)2+ (y+ 2)2+ 1
as a
(a) contour plot
(b) 3D plot
Do the same with the options changed from the default settings (with the aim of making
plots nicer):
(c) in (a) change PlotRange, ColorFunction, Contours, ContourLines
(d) in (b) change PlotRange, PlotPoints, ColorFunction, Mesh, ViewPoint, AspectRatio
2. (a) Using ParametricPlot, plot a circle with the center at C= (x0, y0) = (2,3.5) and radius
r=√3. Make sure the resulting picture does look like a circle.
(b) Using Solve find intersection points of that circle with the line y= 1.5x.
(c) Using FindRoot (and with the help of Plot) find intersection(s) of the same circle with
the function y= 4 sin2(x).
3. (a) Solve the following system of linear equations:
x−2y+z= 5
2x+ 2y−2z=−3
x−y+z= 1
(b) define the matrix:
M=
1−2 1
2 2 −2
1−1 1
and the vector b= (5,−3,1). Using linear algebra tools solve M·x=bfor x= (x, y, z).
Compare with (a).
(c) Use Do (or any other programming tools in Mathematica) to define an n×nmatrix
(with n > 10 of your choice), whose elements are all ai,j ≡0 except the first diagonal
below, and the first diagonal above the main diagonal, where the elements of the matrix are
ai,i±1= 1 (a special case of the 3-diagonal matrix). Obtain the list of eigenvalues of this
matrix. Order it from the lowest to the highest. Show, by a direct comparison of the lists,
that the eigenvalues are given by Ej=−2 cos ³πj
n+1 ´, where j= 1..n.
(Energies of the free electron on a chain of natoms.)
4. (a) Define a Mathematica function to give you f(n) = 1 + 1/2+1/3 + . . . + 1/n. Create a
list and use PlotList to plot f(n) from 1 to 100.
(b) Plot ln(n) (natural log) on a separate PlotList plot and then together with f(n) (use
Show). Explain why they are similar.
(c) By manipulating already defined lists, create a list of their difference, ln(n)−f(n), and
P lotList it together with −γ(where γis the Euler’s gamma constant, EulerGamma).
pf2

Partial preview of the text

Download Math Phys Problem Set 212A: Contour & Parametric Plots, Linear Algebra, Complex Analysis and more Assignments Physics in PDF only on Docsity!

Problems, set 2. PHYSICS 212A: Mathematical Physics

  • Problems #1-4 are to be done using Mathematica, problems #5-8 (and 9*) without.
  • In Mathematica, look up the following functions (and the ones cross-listed with them) : (a) ContourPlot, Plot3D, ParametricPlot, ListPlot; check out commands that affect various op- tions (color, line/point thickness, range of plotted function, etc.) (b) Table, List and functions related to linear algebra (c) Solve, NSolve, FindRoot
    1. Plot the following function

f (x, y) = 3 exp

( −

(x + 2)^2 + (y + 2)^2 3

) −

(x + 1)^2 + (y + 2)^2 + 1 as a (a) contour plot (b) 3D plot Do the same with the options changed from the default settings (with the aim of making plots nicer): (c) in (a) change PlotRange, ColorFunction, Contours, ContourLines (d) in (b) change PlotRange, PlotPoints, ColorFunction, Mesh, ViewPoint, AspectRatio

  1. (a) Using ParametricPlot, plot a circle with the center at C = (x 0 , y 0 ) = (2, 3 .5) and radius r =
  1. Make sure the resulting picture does look like a circle. (b) Using Solve find intersection points of that circle with the line y = 1. 5 x. (c) Using FindRoot (and with the help of Plot) find intersection(s) of the same circle with the function y = 4 sin^2 (x).
  2. (a) Solve the following system of linear equations:   

x − 2 y + z = 5 2 x + 2y − 2 z = − 3 x − y + z = 1 (b) define the matrix:

M =

 

 

and the vector b = (5, − 3 , 1). Using linear algebra tools solve M · x = b for x = (x, y, z). Compare with (a). (c) Use Do (or any other programming tools in Mathematica) to define an n × n matrix (with n > 10 of your choice), whose elements are all ai,j ≡ 0 except the first diagonal below, and the first diagonal above the main diagonal, where the elements of the matrix are ai,i± 1 = 1 (a special case of the 3-diagonal matrix). Obtain the list of eigenvalues of this matrix. Order it from the lowest to the highest. Show, by a direct comparison of the lists, that the eigenvalues are given by Ej = −2 cos

( (^) πj n+

) , where j = 1..n. (Energies of the free electron on a chain of n atoms.)

  1. (a) Define a Mathematica function to give you f (n) = 1 + 1/2 + 1/3 +... + 1/n. Create a list and use PlotList to plot f (n) from 1 to 100. (b) Plot ln(n) (natural log) on a separate PlotList plot and then together with f (n) (use Show). Explain why they are similar. (c) By manipulating already defined lists, create a list of their difference, ln(n) − f (n), and P lotList it together with −γ (where γ is the Euler’s gamma constant, EulerGamma).
  1. (a) find all zeros of the following functions in the complex plane:

i) cos z ii) sinh z

(b) obtain expressions for the inverse trigonometric functions in terms of the logarithm (ln):

i) cosh−^1 z ii) tan−^1 z

  1. By directly doing the line integrals in the complex plane (without using Cauchy formulas), evaluate the integral: ∫

C

z^2 dz

where the contour C is the rectangle ABDF with A = 1, B = 1 + i, D = −1 + i, and F = −1.

  1. Verify directly from manipulating the power series that:

ez^ ew^ = ez+w

  1. Sketch and discuss the branch cut and Riemann surface for the function:

f (z) =

√ 1 +

z

How many sheets does the Riemann surface have? Describe its topological character (that is, how the sheets are connected).

  1. ∗^ [This is an extra credit problem. No partial credit for attempting it.] Show that the transformation

w =

z maps any circle in the z-plane into a circle in the w-plane (straight line is a degenerate circle going through ∞).