User:Jiangpx/6321 hw6

=Problem 2 - Non-homogeneous L2-ODE-VC=

Given
$$\begin{align} & (1)\cdots xy''+2y'+xy=\sin (x) \\ & (2)\cdots (x-1)y''-xy'+y=\sin (x) \\ \end{align}$$

Find
The complete Solutions

Solution
(1)

We know the homogeneous solutions are

$$\begin{align} & {{u}_{1}}=\frac{\cos x}{x} \\ & {{u}_{2}}=\frac{\sin x}{x} \\ \end{align}$$

The particular solution is given as

$${{y}_{p}}={{u}_{1}}(x)\int{\frac{1}{h(x)}\left( \int{h(x)\frac{f(x)}{{{u}_{1}}(x)}dx} \right)}dx$$

where

$$\begin{align} & h(x)={{u}_{1}}^{2}(x)\cdot \exp \left( \int{{{a}_{1}}(x)dx} \right) \\ & {{a}_{1}}(x)=\frac{2}{x} \\ \end{align}$$

Then we may get h(x) as

$$h(x)=\frac{{{\cos }^{2}}x}\cdot \exp \left( \int{\frac{2}{x}dx} \right)={{\cos }^{2}}x$$

Then the particular solution can be evaluated as follows

$$\begin{align} & {{y}_{p}}=\frac{\cos x}{x}\cdot \int{\frac{1}{{{\cos }^{2}}x}\left( \int{{{\cos }^{2}}x\frac{\sin x/x}{\cos x/x}dx} \right)}dx \\ & {{y}_{p}}=\frac{\cos x}{x}\cdot \int{\frac{1}{{{\cos }^{2}}x}\left( \int{(\cos x)(\sin x)dx} \right)}dx \\ & {{y}_{p}}=\frac{\cos x}{x}\cdot \int{\frac{1}{{{\cos }^{2}}x}\left( \frac{-1}{2}{{\cos }^{2}}x \right)}dx \\ & {{y}_{p}}=\frac{\cos x}{x}\cdot \frac{-x}{2} \\ & {{y}_{p}}=-\frac{1}{2}\cos x \\ \end{align}$$

Therefore, the complete solution can be written as

$$y(x)=\frac{{{k}_{1}}\cos x}{x}+\frac{{{k}_{2}}\sin x}{x}-\frac{1}{2}\cos x$$

where k1 and k2 are integration constants.

(2)

Two homogeneneous solutions are

$$\begin{align} & {{u}_{1}}=\exp (x) \\ & {{u}_{2}}=x \\ \end{align}$$

With

$${{a}_{1}}(x)=\frac{-x}{x-1}$$

Integrating factor h(x) is

$$\begin{align} & h(x)={{[\exp (x)]}^{2}}\cdot \exp \left( \int{\frac{-x}{x-1}dx} \right) \\ & h(x)=\frac{\exp (x)}{x-1} \\ \end{align}$$

Then particular solution is

$$\begin{align} & {{y}_{p}}={{u}_{1}}(x)\int{\frac{1}{h(x)}\left( \int{h(x)\frac{f(x)}{{{u}_{1}}(x)}dx} \right)}dx \\ & {{y}_{p}}=\exp (x)\cdot \int{\frac{x-1}{\exp (x)}}\left( \int{\frac{\exp (x)}{x-1}\cdot \frac{\sin x/(x-1)}{\exp (x)}dx} \right)dx \\ & {{y}_{p}}=\exp (x)\cdot \int{\frac{x-1}{\exp (x)}\left( \int{\frac{\sin x}dx} \right)dx} \\ & \\ \end{align}$$

Therefore, the complete solution can be written as

$$y(x)={{k}_{1}}\exp (x)+{{k}_{2}}x+\exp (x)\cdot \int{\frac{x-1}{\exp (x)}\left( \int{\frac{\sin x}dx} \right)dx}$$

=Problem 3 - Solve non-homogeneous L2-ODE-VC using direct method=

Given
$$\begin{align} & (1-{{x}^{2}}){y}''-2x{y}'+2y=\frac{1}{1-{{x}^{2}}} \\ & {{u}_{1}}(x)=x \\ \end{align}$$

Find
The complete solution $$y(x)$$ using the direct method

Solution
Method 1 - Wronskian

From previous homework, we obtained the two homogeneous solution as

$$\begin{align} & {{u}_{1}}(x)=x \\ & {{u}_{2}}(x)=\frac{x}{2}\log (\frac{1+x}{1-x})-1 \\ \end{align}$$

The complementary function is

$${{y}_{h}}=A{{u}_{1}}(x)+B{{u}_{2}}(x)$$

The particular solution can be obtained via the method of variation of parameters

$${{y}_{p}}=\int\limits_{x}{\frac{{{u}_{1}}(s){{u}_{2}}(x)-{{u}_{1}}(x){{u}_{2}}(s)}{(1-{{s}^{2}})({{u}_{1}}(s){{u}_{2}}'(s)-{{u}_{1}}'(s){{u}_{2}}(s))}ds}$$

Using Abel's formula

$$W(x)=W({{x}_{0}})\exp \left\{ -\int_^{x}{{{a}_{1}}(s)ds} \right\}$$

With

$${{a}_{1}}(s)=\frac{-2s}{1-{{s}^{2}}}$$ the Wronskian can be expressed as

$$W=({{u}_{1}}(s){{u}_{2}}'(s)-{{u}_{1}}'(s){{u}_{2}}(s))=\frac{1-{{s}^{2}}}$$

With

$$W(0)=1$$

The particular solution is

$$\begin{align} & {{y}_{p}}(x)={{u}_{2}}(x)\int{{{u}_{1}}(x)dx}-{{u}_{1}}(x)\int{{{u}_{2}}(x)dx} \\ & {{y}_{p}}(x)=\frac{2}{{u}_{2}}(x)-{{u}_{1}}(x)\left\{ \frac{{{x}^{2}}-1}{4}\log (\frac{1+x}{1-x})-\frac{x}{2} \right\} \\ & {{y}_{p}}(x)=\frac{2}\left[ \frac{x}{2}\log (\frac{1+x}{1-x})-1 \right]-x\left\{ \frac{{{x}^{2}}-1}{4}\log (\frac{1+x}{1-x})-\frac{x}{2} \right\} \\ & {{y}_{p}}(x)=\frac{x}{4}\log (\frac{1+x}{1-x}) \\ \end{align}$$

Method 2 - Direct Method

1st homogeneous solutions is

$${{u}_{1}}(x)=x$$

With $${{a}_{1}}(x)=\frac{-2x}{1-{{x}^{2}}}$$

The integrating factor is

$$\begin{align} & h(x)={{u}_{1}}^{2}(x)\cdot \exp \left( \int{{{a}_{1}}(x)dx} \right) \\ & h(x)={{x}^{2}}\cdot \exp \left( \int{\frac{-2x}{1-{{x}^{2}}}dx} \right) \\ & h(x)={{x}^{2}}\cdot \exp \left( \log (1-{{x}^{2}}) \right) \\ & h(x)={{x}^{2}}(1-{{x}^{2}}) \\ \end{align}$$

2nd homogeneous solution can be obtained as

$${{u}_{2}}(x)={{u}_{1}}(x)\int{\frac{dx}{h(x)}}$$

Then

$${{u}_{2}}(x)=x\int{\frac{dx}{{{x}^{2}}(1-{{x}^{2}})}}=x\left( \frac{1}{2}(\log \frac{1+x}{1-x}-\frac{2}{x}) \right)=\frac{x}{2}\log \frac{1+x}{1-x}-1$$

The particular solution can be obtained as

$${{y}_{p}}={{u}_{1}}(x)\int{\frac{1}{h(x)}}\left( \int{h(x)\frac{f(x)}{{{u}_{1}}(x)}dx} \right)dx$$

with $$f(x)=\frac{1}$$

Then

$$\begin{align} & {{y}_{p}}=x\int{\frac{1}{{{x}^{2}}(1-{{x}^{2}})}}\left( \int{{{x}^{2}}\cdot (1-{{x}^{2}})\frac{1}{{{(1-{{x}^{2}})}^{2}}\cdot x}dx} \right)dx \\ & \cdots =x\int{\frac{1}{{{x}^{2}}(1-{{x}^{2}})}}\left( \int{\frac{xdx}{1-{{x}^{2}}}} \right)dx \\ & \cdots =-\frac{x}{2}\int{\frac{\log (1-{{x}^{2}})}{{{x}^{2}}(1-{{x}^{2}})}}dx \\ & \\ \end{align}$$

Therefore, the complete solution can be written as

$$\begin{align} & y(x)={{k}_{1}}{{u}_{1}}+{{k}_{2}}{{u}_{2}}+{{y}_{p}} \\ & \cdots \cdots ={{k}_{1}}\cdot (x)+{{k}_{2}}\cdot \left( \frac{x}{2}\log \left( \frac{1+x}{1-x} \right)-1 \right)-\frac{x}{2}\int{\frac{\log (1-{{x}^{2}})}{{{x}^{2}}(1-{{x}^{2}})}}dx \\ \end{align}$$

Given
Spherical Coordinates

$$\begin{align} & x=r\cos \theta \cos \phi \\ & y=r\cos \theta \sin \phi \\ & z=r\sin \theta \\ \end{align}$$

Find
The length of an infinitesimal $$d{{s}^{2}}$$ and the Laplacian $$\Delta \psi $$

Solution
Just as in the cartesian coordinate system,

$$d{{s}^{2}}=d{{x}^{2}}+d{{y}^{2}}+d{{z}^{2}}$$

In spherical coordinate system, think of a little cube with three perpendicular sides

$$\langle dr\cdots rd\theta \cdots r\cos \theta d\phi \rangle $$

then

$$\begin{align} & d{{s}^{2}}={{(dr)}^{2}}+{{(rd\theta )}^{2}}+{{[(r\cos \theta )d\phi ]}^{2}} \\ & d{{s}^{2}}=d{{r}^{2}}+{{r}^{2}}d{{\theta }^{2}}+{{r}^{2}}{{\cos }^{2}}\theta d{{\phi }^{2}} \\ \end{align}$$

The Laplacian is given as $$\Delta \psi =\frac{1}\sum\limits_{i=1}^{3}{\frac{\partial }{\partial {{\xi }_{i}}}\left[ \frac\frac{\partial \psi }{\partial {{\xi }_{i}}} \right]}$$

with $$\begin{align} & {{h}_{1}}=1 \\ & {{h}_{2}}=r \\ & {{h}_{3}}=r\cos \theta \\ \end{align}$$

Therefore,

$$\begin{align} & \Delta \psi =\frac{1}{{{r}^{2}}\cos \theta }\left\{ \frac{\partial }{\partial r}\left[ \frac{{{r}^{2}}\cos \theta }\frac{\partial \psi }{\partial r} \right]+\frac{\partial }{\partial \theta }\left[ \frac{{{r}^{2}}\cos \theta }\frac{\partial \psi }{\partial \theta } \right]+\frac{\partial }{\partial \phi }\left[ \frac{{{r}^{2}}\cos \theta }\frac{\partial \psi }{\partial \phi } \right] \right\} \\ & \Delta \psi =\frac{1}\frac{\partial }{\partial r}\left[ {{r}^{2}}\frac{\partial \psi }{\partial r} \right]+\frac{1}{{{r}^{2}}\cos \theta }\left[ \frac{\partial }{\partial \theta }\left( \cos \theta \frac{\partial \psi }{\partial \theta } \right) \right]+\frac{1}{{{r}^{2}}{{\cos }^{2}}\theta }\left[ \frac{{{\partial }^{2}}\psi }{\partial {{\phi }^{2}}} \right] \\ \end{align}$$

=Problem 5 - Laplacian in Cylindrical Coordinate System=

Given
$$\begin{align} & {{x}_{1}}=x=r\cos \phi ={{\xi }_{1}}\cos {{\xi }_{2}} \\ & {{x}_{2}}=y=r\sin \phi ={{\xi }_{1}}\sin {{\xi }_{2}} \\ & {{x}_{3}}=z={{\xi }_{3}} \\ \end{align}$$

Find
$$\begin{align} & (1)Express\left\{ d{{x}_{i}} \right\}\operatorname{in}\cdot terms\cdot of\cdot \left\{ d{{\xi }_{i}} \right\}and\left\{ {{\xi }_{i}} \right\} \\ & (2)Find\cdot d{{s}^{2}}=\sum\limits_{i=1}^{3}{dx_{i}^{2}}=\sum\limits_{i=1}^{3}{h_{i}^{2}\cdot d\xi _{i}^{2}}\cdot and\cdot Express\left\{ {{h}_{i}} \right\}in\cdot terms\cdot of\cdot \left\{ {{\xi }_{i}} \right\} \\ & (3)Find\cdot Laplacian\cdot \Delta \psi \\ & (4)Obtain\cdot Bessel\cdot Equation\cdot by\cdot solving\cdot \Delta \psi =0 \\ \end{align}$$

Solution
(1)

$$\begin{align} & dx=\frac{\partial x}{\partial r}dr+\frac{\partial x}{\partial \phi }d\phi =\cos \phi \cdot dr+(-r\sin \phi )\cdot d\phi \\ & dy=\frac{\partial y}{\partial r}dr+\frac{\partial y}{\partial \phi }d\phi =\sin \phi \cdot dr+(r\cos \phi )\cdot d\phi \\ & dz=dz \\ \end{align}$$

or

$$\begin{align} & d{{x}_{1}}=\cos {{\xi }_{2}}\cdot d{{\xi }_{1}}-{{\xi }_{1}}\sin {{\xi }_{2}}\cdot d{{\xi }_{2}} \\ & d{{x}_{2}}=\sin {{\xi }_{2}}\cdot d{{\xi }_{1}}+{{\xi }_{1}}\cos {{\xi }_{2}}\cdot d{{\xi }_{2}} \\ & d{{x}_{3}}=d{{\xi }_{3}} \\ \end{align}$$

(2)

$$\begin{align} & d{{s}^{2}}={{(dr)}^{2}}+{{(rd\phi )}^{2}}+{{(dz)}^{2}} \\ & d{{s}^{2}}=d{{r}^{2}}+{{r}^{2}}d{{\phi }^{2}}+d{{z}^{2}} \\ & d{{s}^{2}}=d\xi _{1}^{2}+\xi _{1}^{2}d\xi _{2}^{2}+d\xi _{3}^{2} \\ \end{align}$$

with

$$\begin{align} & {{h}_{1}}=1 \\ & {{h}_{2}}=r={{\xi }_{1}} \\ & {{h}_{3}}=1 \\ \end{align}$$

(3)

The Laplacian is given as

$$\Delta \psi =\frac{1}\sum\limits_{i=1}^{3}{\frac{\partial }{\partial {{\xi }_{i}}}\left[ \frac\frac{\partial \psi }{\partial {{\xi }_{i}}} \right]}$$

With $${{h}_{1}}{{h}_{2}}{{h}_{3}}={{\xi }_{1}}$$, The Laplacian becomes

$$\begin{align} & \Delta \psi =\frac{1}\left\{ \frac{\partial }{\partial {{\xi }_{1}}}\left( {{\xi }_{1}}\frac{\partial \psi }{\partial {{\xi }_{1}}} \right)+\frac{\partial }{\partial {{\xi }_{2}}}\left( \frac{1}\frac{\partial \psi }{\partial {{\xi }_{2}}} \right)+\frac{\partial }{\partial {{\xi }_{3}}}\left( {{\xi }_{1}}\frac{\partial \psi }{\partial {{\xi }_{3}}} \right) \right\} \\ & \Delta \psi =\frac{1}\frac{\partial }{\partial {{\xi }_{1}}}\left( {{\xi }_{1}}\frac{\partial \psi }{\partial {{\xi }_{1}}} \right)+\frac{1}{\xi _{1}^{2}}\frac{{{\partial }^{2}}\psi }{\partial \xi _{2}^{2}}+\frac{{{\partial }^{2}}\psi }{\partial \xi _{3}^{2}} \\ \end{align}$$

(4)

Set the Laplacian to zero and write it as follows

$$\Delta \psi =\frac{1}{r}\frac{\partial }{\partial r}\left( r\frac{\partial \psi }{\partial r} \right)+\frac{1}\frac{{{\partial }^{2}}\psi }{\partial {{\phi }^{2}}}+\frac{{{\partial }^{2}}\psi }{\partial {{z}^{2}}}$$

Assume

$$\psi (r,\phi ,z)=R(r)\cdot Phi(\phi )\cdot Z(z)$$

Then

$$\Delta \psi =Phi\cdot Z\cdot \frac{1}{r}\frac{d}{dr}\left( r\frac{dR}{dr} \right)+R\cdot Z\cdot \frac{1}\frac{{{d}^{2}}Phi}{d{{\phi }^{2}}}+R\cdot Phi\cdot \frac{{{d}^{2}}Z}{d{{z}^{2}}}=0$$

Divide by $$R\cdot Phi\cdot Z$$, we may get

$$\frac{1}{R\cdot r}\frac{d}{dr}\left( r\frac{dR}{dr} \right)+\frac{1}{Phi\cdot {{r}^{2}}}\frac{{{d}^{2}}Phi}{d{{\phi }^{2}}}+\frac{1}{Z}\frac{{{d}^{2}}Z}{d{{z}^{2}}}=0$$

Assume

$$\frac{1}{Z}\frac{{{d}^{2}}Z}{d{{z}^{2}}}=k$$

Multiply by $${{r}^{2}}$$ we may get

$$\frac{r}{R}\frac{d}{dr}\left( r\frac{dR}{dr} \right)+\frac{1}{Phi}\frac{{{d}^{2}}Phi}{d{{\phi }^{2}}}+{{(rk)}^{2}}=0$$

Define

$$\frac{1}{Phi}\frac{{{d}^{2}}Phi}{d{{\phi }^{2}}}=-{{m}^{2}}$$

Then

$$\begin{align} & r\frac{d}{dr}\left( r\frac{dR}{dr} \right)+\left( {{(rk)}^{2}}-{{m}^{2}} \right)R=0 \\ & {{r}^{2}}\frac{{{d}^{2}}R}{d{{r}^{2}}}+r\frac{dR}{dr}+\left( {{(rk)}^{2}}-{{m}^{2}} \right)R=0 \\ \end{align}$$

Define $$x=rk$$, then

$$\begin{align} & \frac{dR}{dr}=\frac{dR}{dx}\frac{dx}{dr}=k\frac{dR}{dx} \\ & \frac{{{d}^{2}}R}{d{{r}^{2}}}=\frac{d}{dr}\left( k\frac{dR}{dx} \right)=k\frac{d}{dx}\left( k\frac{dR}{dx} \right)={{k}^{2}}\frac{{{d}^{2}}R}{d{{x}^{2}}} \\ \end{align}$$

Therefore

$$\begin{align} & {{r}^{2}}{{k}^{2}}\frac{{{d}^{2}}R}{d{{x}^{2}}}+rk\frac{dR}{dx}+\left( {{(rk)}^{2}}-{{m}^{2}} \right)R=0 \\ or \\ & {{x}^{2}}\frac{{{d}^{2}}R}{d{{x}^{2}}}+x\frac{dR}{dx}+({{x}^{2}}-{{m}^{2}})R=0 \\ \end{align}$$

Thus Bessel's equation is obtained.

=Problem 6 - Lapalcian in Spherical Coordinate System with Math/Phy Convention=

Given
Solution of Problem 4 and definition of $$\theta $$ measured clockwisely from the North Pole

Find
The expression of Lapalcian

Solution
$$\Delta \psi =\frac{1}\frac{\partial }{\partial r}\left[ {{r}^{2}}\frac{\partial \psi }{\partial r} \right]+\frac{1}{{{r}^{2}}\sin \theta }\left[ \frac{\partial }{\partial \theta }\left( \sin \theta \frac{\partial \psi }{\partial \theta } \right) \right]+\frac{1}{{{r}^{2}}{{\sin }^{2}}\theta }\left[ \frac{{{\partial }^{2}}\psi }{\partial {{\phi }^{2}}} \right]$$