# Lecture Notes

### Site Tools

math121b:midterm2

# Midterm 2 for Math 121B

You may use book and your note, but no discussion with each other.

## 1. Gamma functions and Beta function (15 points)

You may use Gamma or Beta function to express the final answer. Please show intermediate steps, otherwise there are no points.

1. Compute the integral (5 points) $$\int_0^1 \frac{x^4}{\sqrt{1-x^3}} dx$$

2. Compute the integral (5 points) $$\int_0^1 x^2 (-\ln x)^2 dx$$

3. Compute the special value of Gamma functions (the result should not be expressed using Gamma function).

• $\Gamma(-1/2) = ?$ (2 points)
• $|\Gamma(1/2 + i )|^2 = ?$ (3 points) [Hint: $\Gamma(p)\Gamma(1-p) = \pi / \sin(p \pi)$ ]

## 2. Legendre Function (25 points)

1. Compute $P_3(x)$ using Rodrigue formula. (5 points)

2. Prove the recursion relation 5.8( c) (10 points) $$P_l'(x) - xP_{l-1}'(x) = l P_{l-1}(x)$$ using the generating function $$\Phi(x,h) = \sum_{n=0}^\infty h^n P_n(x) = \frac{1}{\sqrt{1 - 2 x h + h^2} }$$

3. Compute $\int_{-1}^1 x^n P_n(x) dx$. ( 10 points)

Hint:( you don't have to use these hints)

• Find the constant $c$, such that $P_n(x) = c x^n + \z{ lower order terms}$. (try Rodrigue formula)
• Show that $\int_{-1}^1 P_n(x)^2 dx = \int_{-1}^1 c x^n P_n(x) dx$
• Look up $\int_{-1}^1 P_n(x)^2 dx$ in Boas.

## 3. Bessel Function (30 points)

These problems are from Boas Chapter 12.

1. Problem 12.1. (7 points)

2. Problem 15.6 (7 points) Making the computer plot is optional.

3. Problem 19.1 (10 points)

4. Problem 20.3, 20.6, 20.7 (6 points)

• 20.3: $4/\pi$
• 20.6: $-1/(2n+1)$.
• 20.7: $(1/x) e^{i (x - (n+1) \pi /2)}$

## 4. Solving PDE with separation of variables (30 points)

1. Solve the steady state heat equation on 2D square $[0,1]^2$. (10 point) $$\Delta u(x,y) = 0, \quad 0 \leq x, y \leq 1$$ with boundary condition that $$u(0, y)= 0, u(1,y)=1, u(x, 0)=0, u(x,1)=1.$$

2. Solve the steady state heat equation on 3D unit ball. (10 point) $$\Delta u(r, \theta, \phi) = 0$$ with boundary condition at $r=1$ that $$u(1, \theta, \phi) = \cos(\theta) \sin(\theta) \sin(\phi)$$

Hint: use $P_2^1(\cos \theta) = -3 \cos(\theta) \sin(\theta)$

3. Solve the heat flow equation on a circle. (10 point) $$\d_t u(t, \theta) = \d_\theta^2 u(t, \theta).$$ such that the initial condition is $$u(0, \theta) = \cos^2(\theta).$$

Hint: you may find the following formula useful $$\cos(2\theta) = \cos^2(\theta) - \sin^2(\theta) = 2 \cos^2 \theta - 1.$$ 