Ok.Next time please keep the marks I made so I know which problem I should look at.

Physics 229& 100 Homework #1
Name: Nasser Abbasi

1. Practice in transcribing expressions into Mathematica syntax
a) Find the determinant of this matrix:

"AbbasiN12_GRADED_1.gif"

"AbbasiN12_GRADED_2.gif"

"AbbasiN12_GRADED_3.gif"

b) If "AbbasiN12_GRADED_4.gif"  , what is "AbbasiN12_GRADED_5.gif" ?

"AbbasiN12_GRADED_6.gif"

"AbbasiN12_GRADED_7.gif"

c) In your E&M book, you find the following equation which describes an LCR circuit : "AbbasiN12_GRADED_8.gif"   . Use DSolve to find the general solution to the equation.

"AbbasiN12_GRADED_9.gif"

"AbbasiN12_GRADED_10.gif"

d) Find the first 3 terms in the Taylor's series expansion of "AbbasiN12_GRADED_11.gif"   about x=0.

"AbbasiN12_GRADED_12.gif"

"AbbasiN12_GRADED_13.gif"

2

The electromagnetic energy density inside a cavity at temperature T has a distribution of frequencies f. The distribution is given by the famous Planck formula  "AbbasiN12_GRADED_14.gif", where h is Planck's constant, k is Boltzmann's constant, and c is the velocity of light.

a) Make a plot of the energy density as a function of f for T=100K and 300K. Be sure to include the physically relevant range of f. Make the curves different colors. Make a substitution rule to provide numerical values for the constants.

"AbbasiN12_GRADED_15.gif"

"AbbasiN12_GRADED_16.gif"

"AbbasiN12_GRADED_17.gif"

b) Find the total energy in the cavity, which is given by the integral of the energy density over frequency. Leave the result in symbolic form( i.e. in terms of h, k, c, etc.) . You might want to include an Assumptions->Re[ ]>0 to avoid If statements in the answer. See examples of this in Integrate.

"AbbasiN12_GRADED_18.gif"

"AbbasiN12_GRADED_19.gif"

c) The power flux in the radiation is the total energy times the rate at which it moves (which is the speed of light, c) times a geometrical factor (1/4). Evaluate this and find the numerical coefficient of "AbbasiN12_GRADED_20.gif" ; this is the Stefan-Boltzmann constant of radiative transfer.

"AbbasiN12_GRADED_21.gif"

"AbbasiN12_GRADED_22.gif"

"AbbasiN12_GRADED_23.gif"

3

Conic sections can be described by the equation "AbbasiN12_GRADED_24.gif", where e is the eccentricity, and r and θ are polar coordinates, with x=r Cos[θ] and y=r Sin[θ]. Use ParametricPlot to draw the curves for e=0.8, e=1, and e=1.5

"AbbasiN12_GRADED_25.gif"

"AbbasiN12_GRADED_26.gif"

"AbbasiN12_GRADED_27.gif"

"AbbasiN12_GRADED_28.gif"

4

The temperature in degrees Fahrenheit F is related to the temperature in degrees centigrade C by the formula F="AbbasiN12_GRADED_29.gif". The temperature in Kelvin K is related to the centigrade temperature by C-273=K. Use Table to  make a table which gives all three temperatures for K=0,300 in 10 degree increments. Use TableForm with TableHeadings to make a nice printout.

"AbbasiN12_GRADED_30.gif"

Kelvin Centigrade Fahrenheit
0 -273. -459.4
10 -263. -441.4
20 -253. -423.4
30 -243. -405.4
40 -233. -387.4
50 -223. -369.4
60 -213. -351.4
70 -203. -333.4
80 -193. -315.4
90 -183. -297.4
100 -173. -279.4
110 -163. -261.4
120 -153. -243.4
130 -143. -225.4
140 -133. -207.4
150 -123. -189.4
160 -113. -171.4
170 -103. -153.4
180 -93. -135.4
190 -83. -117.4
200 -73. -99.4
210 -63. -81.4
220 -53. -63.4
230 -43. -45.4
240 -33. -27.4
250 -23. -9.4
260 -13. 8.6
270 -3. 26.6
280 7. 44.6
290 17. 62.6
300 27. 80.6

5

Consider the system of linear equations

I x +y +z -I w = 0
x +I y -I z +w = I
x -y "AbbasiN12_GRADED_31.gif" "AbbasiN12_GRADED_32.gif" = 1
x -I y "AbbasiN12_GRADED_33.gif" "AbbasiN12_GRADED_34.gif" = 0

a) Solve for x,y,z,w using Solve.

"AbbasiN12_GRADED_35.gif"

"AbbasiN12_GRADED_36.gif"

"AbbasiN12_GRADED_37.gif"

"AbbasiN12_GRADED_38.gif"

"AbbasiN12_GRADED_39.gif"

b) Extract the matrix of coefficients.  One convenient way to do this is to use Input-> Create Table/Matrix/Palette->Matrix.  Solve for x,y,z,w using Inverse. Convince yourself you get the same answers as in part a.

"AbbasiN12_GRADED_40.gif"

"AbbasiN12_GRADED_41.gif"

"AbbasiN12_GRADED_42.gif"

"AbbasiN12_GRADED_43.gif"

"AbbasiN12_GRADED_44.gif"

"AbbasiN12_GRADED_45.gif"

"AbbasiN12_GRADED_46.gif"

"AbbasiN12_GRADED_47.gif"

"AbbasiN12_GRADED_48.gif"

"AbbasiN12_GRADED_49.gif"

"AbbasiN12_GRADED_50.gif"

6

The Bernoulli numbers "AbbasiN12_GRADED_51.gif" appear in many formulas you will find in tables of integrals. They are defined as the coefficients of powers of z in the expansion

"AbbasiN12_GRADED_52.gif"=1+"AbbasiN12_GRADED_53.gif"z+"AbbasiN12_GRADED_54.gif""AbbasiN12_GRADED_55.gif"+"AbbasiN12_GRADED_56.gif""AbbasiN12_GRADED_57.gif"...

Write a function bern[n] that returns the nth Bernoulli number. Use Series and Coefficient[expr,form] to extract the coefficient. Use the function and the Table command to make a table of the first 20 Bernoulli numbers. Compare with the built-in function BernoulliB.

"AbbasiN12_GRADED_58.gif"

n bern[n] BernoulliB[n]
1 "AbbasiN12_GRADED_59.gif" "AbbasiN12_GRADED_60.gif"
2 "AbbasiN12_GRADED_61.gif" "AbbasiN12_GRADED_62.gif"
3 0 0
4 "AbbasiN12_GRADED_63.gif" "AbbasiN12_GRADED_64.gif"
5 0 0
6 "AbbasiN12_GRADED_65.gif" "AbbasiN12_GRADED_66.gif"
7 0 0
8 "AbbasiN12_GRADED_67.gif" "AbbasiN12_GRADED_68.gif"
9 0 0
10 "AbbasiN12_GRADED_69.gif" "AbbasiN12_GRADED_70.gif"
11 0 0
12 "AbbasiN12_GRADED_71.gif" "AbbasiN12_GRADED_72.gif"
13 0 0
14 "AbbasiN12_GRADED_73.gif" "AbbasiN12_GRADED_74.gif"
15 0 0
16 "AbbasiN12_GRADED_75.gif" "AbbasiN12_GRADED_76.gif"
17 0 0
18 "AbbasiN12_GRADED_77.gif" "AbbasiN12_GRADED_78.gif"
19 0 0
20 "AbbasiN12_GRADED_79.gif" "AbbasiN12_GRADED_80.gif"

7

Consider the quadratic equation "AbbasiN12_GRADED_81.gif" , where R1 and R2 are independent random numbers uniformly distributed on [0,1] .

a) For each choice of random coefficients R1 and R2, the equation has two solutions, x1 and x2. Write a function printsol[neq_] which prints out  x1 and x2  for neq randomly generated equations. Use a Do loop. Execute the function for neq->15.

"AbbasiN12_GRADED_82.gif"

"AbbasiN12_GRADED_83.gif"

"AbbasiN12_GRADED_84.gif"

"AbbasiN12_GRADED_85.gif"

"AbbasiN12_GRADED_86.gif"

"AbbasiN12_GRADED_87.gif"

"AbbasiN12_GRADED_88.gif"

"AbbasiN12_GRADED_89.gif"

"AbbasiN12_GRADED_90.gif"

"AbbasiN12_GRADED_91.gif"

"AbbasiN12_GRADED_92.gif"

"AbbasiN12_GRADED_93.gif"

"AbbasiN12_GRADED_94.gif"

"AbbasiN12_GRADED_95.gif"

"AbbasiN12_GRADED_96.gif"

"AbbasiN12_GRADED_97.gif"

"AbbasiN12_GRADED_98.gif"

"AbbasiN12_GRADED_99.gif"

"AbbasiN12_GRADED_100.gif"

"AbbasiN12_GRADED_101.gif"

"AbbasiN12_GRADED_102.gif"

"AbbasiN12_GRADED_103.gif"

"AbbasiN12_GRADED_104.gif"

"AbbasiN12_GRADED_105.gif"

"AbbasiN12_GRADED_106.gif"

"AbbasiN12_GRADED_107.gif"

"AbbasiN12_GRADED_108.gif"

"AbbasiN12_GRADED_109.gif"

"AbbasiN12_GRADED_110.gif"

"AbbasiN12_GRADED_111.gif"

"AbbasiN12_GRADED_112.gif"

"AbbasiN12_GRADED_113.gif"

"AbbasiN12_GRADED_114.gif"

b) Write a function reimxy[neq_] which computes the solutions x1 and x2 discussed above, and plots the location of each point in the complex plane.  Initialize a list xy={}, and use Re, Im, AppendTo, ListPlot,  and Do. Execute the function for neq->5000. What fraction of the solutions are Real, i.e. have zero imaginary part? Use a counter and If.

"AbbasiN12_GRADED_115.gif"

"AbbasiN12_GRADED_116.gif"

"AbbasiN12_GRADED_117.gif"

8  

Find the center of mass of a solid half sphere of radius R . Recall that the position of the  center of mass is "AbbasiN12_GRADED_118.gif", where M is the total mass and ρ is the density. Include a diagram which specifies your coordinate system. Go here for a reminder about how to do this.

"AbbasiN12_GRADED_119.gif"

"AbbasiN12_GRADED_120.gif"

"AbbasiN12_GRADED_121.gif"

"AbbasiN12_GRADED_122.gif"

9 (grads only)

The wavefunctions for the quantum mechanical harmonic oscillator are proportional to "AbbasiN12_GRADED_123.gif""AbbasiN12_GRADED_124.gif"(x) where "AbbasiN12_GRADED_125.gif"(x) are the Hermite polynomials defined by "AbbasiN12_GRADED_126.gif"(x)="AbbasiN12_GRADED_127.gif""AbbasiN12_GRADED_128.gif""AbbasiN12_GRADED_129.gif". Write a function hermite[n] which returns the nth Hermite polynomial. Compare your answer with the built-in function HermiteH[n,x].Write a function psi[n] that returns the nth harmonic oscillator wave function.  Make sure that your wave functions are normalized, ie that  "AbbasiN12_GRADED_130.gif"=1. Plot psi[13] and psi[13]^2, the probability density of finding the particle at x. (See the examples section of Plot for the trick for getting Plot to work properly.)

10 (grads only)

van der Waals attraction to a wall
van der Waals interactions between molecules produce an attractive interaction described by a potential of the form "AbbasiN12_GRADED_131.gif", where r is the distance between 2 molecules. Show that the interaction energy between a molecule and a half space ( a solid wall) is "AbbasiN12_GRADED_132.gif"if the molecule is a distance h from a wall with density of molecules ρ.
The molecule is at vector position x1={0,0,h}

"AbbasiN12_GRADED_133.gif"

x2={x,y,z} is the position of a typical molecule in the wall, and ranges over the region z<0 . If the number density of molecules in the solid wall is ρ, the potential energy of interaction between the molecule at x1 and all of the molecules in the wall is ∫∫∫"AbbasiN12_GRADED_134.gif"dx dy dz, where the range of integration is over the solid half space.


Created by Wolfram Mathematica 6.0 for Students - Personal Use Only  (24 February 2008) Valid XHTML 1.1!