Physics 6C Solutions to the Practice Final Exam Fall 2 Consider the differential equation x y +x(x+)y y = () (a) Explain why the method of Frobenius method fails for this problem. The method of Frobenius fails because it works only for Fuchsian equations, of the type z 2 u +p(z)zu +q(z)u =, (2) where p(z) and q(z) are non-singular as z. This is clearly not the case for (). (b) Make an inspired guess, and assume that a solution to eq. () exists of the form y(x) = n= c n x n () Determine the coefficients c n. Then sum the series and identify y(x) as a well known function. Inserting the series () into equation () we have: c n ( n )( n)x n+ + c n ( n)(x n+ +x n ) c n x n =, (4) n= n= which we can rewrite as: {[(n+2)(n+) (n+)]c n+ (n+)c n }x n =. (5) or equivalently, Consequently, n= (n+)x n [(n+)c n+ c n ] =. (6) n= The solution to this equation is: Hence, the solution to () is c n+ = c n, for n =,,2,,... (7) n+ c n = c n n = c n 2 n(n ) = = c n!. (8) n= y(x) = c n= x n n! = c e /x (9)
2 Consider the Sturm-Liouville problem: subject to the boundary conditions: y() = y(b) =, where b >. x 2 y +xy +λy = () (a) Eq. () is an Euler differential equation that can be solved exactly. Find all the eigenvalues λ and the corresponding eigenfunctions y λ (x). The equation can be solves with a change of variables x = e z x y x = dy dz, y x2 2 x 2 = d2 y dz 2 dy dz, () y (z) y (z)+y (z)+λy(z) = = y +λy = = y(z) = Acos λz +Bsin λz (2) In terms of the variable z = lnx, the boundary conditions become y(z = ) = and y(z = lnb) = : y(z = ) = = A =, y(z = lnb) = = λ = πn, for n =,2,,... () lnb Theeigenvaluesareλ n = π 2 n 2 /ln 2 bandtheunnormalizedeigenfunctionsarey λ (x) = sin(πnlnx/lnb). (b) Rewrite eq. () in Sturm-Liouville form: d dx [A(x)y ]+[λb(x)+c(x)]y =. (4) Then, using a theorem proven in class (whose proof you need not repeat here), write down the orthogonality relation satisfied by the eigenfunctions found in part (a). For eq. () to be written in Sturm-Liouville form, it has to be written in the form d dx [A(x)y ]+[λb(x)+c(x)]y = A(x)y +A (x)y +[λb(x)+c(x)]y =, (5) that is, the y factor must be the derivative of the y one. This is achieved by dividing by x: xy +y + λ x y = = A(x) = x, B(x) =, C(x) = (6) x Then, because of Sturm-Liouville s theorem, λ acquires a discrete number of eigenvalues which are positive and the eigenfunctions relative to different λ eigenvalues are orthonormal That is, b b B(x)y λ (x)y λ (x)dx = for λ λ. (7) ( sin πn lnx ) ( sin πm lnx ) dx = for n m (8) lnb lnb x (c) Determine the normalization constant of the eigenfunctions such that the result given in part (b) is an orthonormality relation. 2
We have to calculate b ( sin 2 πn lnx ) dx lnb x = lnb πn πn sin 2 ydy = 2 lnb, (9) after changing variables to y = πnlnx/lnb. Hence, the orthonormal eigenfunctions are ( 2 lnb sin πn lnx ), for n =,2,,... (2) lnb Water at o is flowing though a long cylindrical pipe of radius rapidly enough so that we may assume that the temperature is o at all points. At t =, the water is turned off and the surface of the pipe is maintained at 4 o from then on (neglect the wall thickness of the pipe). Find the temperature distribution in the water as a function of r and t. We solve the heat flow equation in 2 dimensions: 2 u = α 2 t u (2) The usual separation of variables u = F(x,y)T(t) = R(r)Θ(θ)T(t) gives Our solution is then 2 F F = T α 2 T = k2 = T(t) = e k2 α 2 t (22) r R (rr ) +k 2 r 2 = Θ Θ = n2 = Θ(θ) = e ±inθ, R(r) = J n (kr) (2) u(r,θ,t) = A n J n (kr)e ±inθ e k2 α 2 t (24) and it has to satisfy the initial and boundary conditions u(r,θ,t = ) =, u(,θ,t > ) = 4. As there is no θ-dependence in these conditions, the solution will be θ-independent, that is, n =. Then, u = J (kr)e k2 α 2 t (25) To satisfy the boundary conditions, let us add a constant term: the new function still satisfy the heat flow equation because of its linearity: Then u = J (kr)e k2 α 2t +4 (26) u(r =,t) = 4 = 4+J (k)e k2 α 2 t = J (k)e k2 α 2t = for all values of t, (27) which implies that J (k) =. That is, k = k m is a zero for the Bessel function J (x), where m is a positive integer. Thus, u(r,t) = 4+ A m J (k m r)e k2 mα 2 t m= (28)
Now we must satisfy the initial condition u(r,t = ) = = 4+ A m J (k m r) = m= A m J (k m r) = 6. (29) m= We can solve for the A m by multiplying both sides of the above equation by rj (k n r) and integrating from r = to r = using the orthogonality relation, rj (k n r)j (k m r)dr = 2 [J (k n )] 2 δ nm. () It follows that Hence, 2 [J (k n )] 2 A n = 6 rj (k n r)dr = 6 rj (k n r) = 6 J (k n ). () k n k n A n = Inserting this result into (28) yields the final result, 4 u(r,t) = 4+2 2 k n J (k n ). (2) m= J (k m r) k m J (k m ) e k2 m α2t. () The electric potential φ( r), due to an electric charge density ρ( r) is given by ρ( r ) φ( r) = r r dv (4) Consider the charge distribution: ρ(r,θ,φ ) = { ρ cosθ, for r < R,, for r > R, (5) where θ is measured with respect to a fixed z-axis, R is a fixed radius, and ρ is a constant. (a) Evaluate φ(r) assuming that r points along the z-axis, for all r > R. We use the identity r r = r l r l+p l(cosγ), r > r. (6) l= The indefinite integral can be performed by setting p = in the recursion relation given in eq. (5.) on p. 592 of Boas and then integrating both sides of the equation. 4
where γ is the angle between r and r. Taking r to lie the z axis, i.e. r = rˆk, we note that θ = which yields γ = θ. Hence, φ( r = rˆk) = l= = 4πρ r l r l+p l(cosθ )ρ cosθ r 2 dr dω = ρ R l= R r l+2 r l+ dr 2π P l (x)p (x)dx r r 2 dr = πρ R 4 r 2 (7) (b) Assuming that φ( r) as r, write down a general solution to Laplace s equation for φ( r) in the region r > R. (In this region, there is no electric charge, so φ( r) satisfies 2 φ = ) Use spherical co-ordinates (r, θ, φ); your answer should have the form of an expansion in spherical harmonics (summed over l and m). At this point, the expansion coefficients are undetermined. Laplace s equation in spherical coordinates is solved by separation of variables as usual and gives: φ( r) = l= m=l l (a lm r l +b lm r l )Yl m (θ,φ) (8) where the spherical harmonics, Y m l (θ,φ) Pm l (cosθ)e±imφ. Because we are looking for a solution that goes to at infinity, the coefficients a lm =. (c) Argue from the azimuthal symmetry of the problem that φ(r,θ,φ) must be independent of φ. Conclude that the general solution for φ(r,θ,φ) has the form of an expansion over Legendre polynomials (summed over l). The boundary conditions we have to satisfy are (5), where there is no φ dependence; then, also our solution will have no φ-dependence, that is, we will have m = in (8). This is because to find the coefficients b lm we use orthogonality relations of the Yl m. Then we will have a sum of terms proportional to Pl (cosθ) = P l(cosθ). (d) Now for the slick part. In part (a), you computed φ( r) assuming that r points along the z- axis, for all r > R. Using the expansion obtained in part (c), set θ = and determine the expansion coefficients by comparing like powers of r. Write down your final solution for φ( r), which is now valid for all r such that r > R. The solution for θ = is writable as φ(r,θ = ) = b l r l P l () = l= From (7) we can read the coefficients b l : b l r l (9) l= Then our solution for any r (r > R) is b l = δ l πρ R 4 (4) φ( r) = πρ R 4 cosθ r 2. (4) 5
5 Suppose it is known that % of the population have a certain kind of cancer. It is also known that a test for this kind of cancer is positive in 99% of the people who have it but is also positive in 2% of the people who do not have it. What is the probability that a person who tests positive has a cancer of this type? Bayes formula states that P(B A) = P(A B) P(A) where in Boas notation, A B = AB and P ( B A) = P A (B). Likewise, P(A B) = P(A B) P(B), (42). (4) Diving these two formulae, the common factor of P(A B) cancels. Recalling that P(B) = P(B A)P(A)+P(B A c )P(A c ), (44) where the complement of A, denoted by A c, consists of are all events not contained in A, it follows that P(A B) = P(B A)P(A) P(B) = P(B A)P(A) P(B A)P(A)+P(B A c )P(A c ). (45) Let A be the condition in which the patient has the cancer and B be the test being positive: The requested probability is the probability of A given that B occurs, P(A B) = P(B A)P(A) P(B) = P(B A)P(A) P(B A)P(A)+P(B A c )P(A c ) =.99..99.+.2.99 =. (46) That is, there is a 2/ probability that the result of the test is a false positive. 6 Let x be a continuous random variable such that x is non-negative. The probability density is given by where λ is a positive constant. (a) Determine the value of the constant c. Probability has to be normalized to, so we have = p(x)dx = c f(x) = ce x/λ (47) e x/λ dx = cλ = c = λ. (48) 6
(b) Compute the expectation value E(x). integrating by parts, we obtain: E(x) = (c) Compute the variance Var(x). x λ e x/λ dx = xe x/λ + Using Var(x) = E(x 2 ) [E(x)] 2, we again integrate by parts to obtain. Var(x) = x 2 λ e x/λ dx λ 2 = λ 2 x 2 e x/λ The standard deviation is then given by +2 e x/λ dx = λ. (49) xe x/λ dx = λ 2 +2λ 2 = λ 2. (5) σ = Var(x) = λ. (5) (d) What is the probability that x falls within three standard deviations of the mean? Sincethe mean of thedistribution is equal to λ andthevariable x is definedonly for non-negative values, we see that x falls within three standard deviations of the mean if x λ λ. Given that x, it follows that x 4λ. Hence, P = 4λ (e) Evaluate the cumulative distribution function F(x). p(x)dx = e 4 =.987. (52) F(x) = x p(t)dt = x λ e t/λ dt = e x/λ. (5) Note that F() = and F( ) = as required for the cumulative distribution function when the random variable x can only take on non-negative values. 7