Computational Physics II
• Assignment 6 - Korteweg-deVries Equation for Solitons

Due: April 14

Code


1. Solving the KdV Equation

$U_t+\epsilon UU_x+\mu U_{xxx}=0$
$u(x-ct)=\frac{3c}{\epsilon}\mathrm{sech}^2\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right]$

First I will solve for the various partial derivatives needed:
$u_t = \frac{3c^2}{\epsilon} \mathrm{sech}^2\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right] \mathrm{tanh}\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right] \sqrt{\frac{c}{\mu}}$
$u_x = \frac{-3c}{\epsilon} \mathrm{sech}^2\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right] \mathrm{tanh}\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right] \sqrt{\frac{c}{\mu}}$
$u_{xxx} = \frac{6c^2}{\epsilon \mu} \sqrt{\frac{c}{\mu }} \mathrm{sech}\left[\frac{1}{2} (-c t+x) \sqrt{\frac{c}{\mu }}\right]^4 \mathrm{tanh}\left[\frac{1}{2} (-c t+x) \sqrt{\frac{c}{\mu }}\right] - \frac{3 c^2}{\epsilon \mu} \sqrt{\frac{c}{\mu }} \mathrm{sech}\left[\frac{1}{2} (-c t+x) \sqrt{\frac{c}{\mu }}\right]^2 \mathrm{tanh}\left[\frac{1}{2} (-c t+x) \sqrt{\frac{c}{\mu }}\right]^3$


$U_t+\epsilon UU_x+\mu U_{xxx}$

Now substituting these in...
$= \frac{3c^2}{\epsilon} \mathrm{sech}^2\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right] \mathrm{tanh}\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right] \sqrt{\frac{c}{\mu}} $
$+ \epsilon \frac{3c}{\epsilon}\mathrm{sech}^2\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right] \frac{-3c}{\epsilon} \mathrm{sech}^2\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right] \mathrm{tanh}\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right] \sqrt{\frac{c}{\mu}} $
$+ \mu \left( \frac{6c^2}{\epsilon \mu} \sqrt{\frac{c}{\mu }} \mathrm{sech}\left[\frac{1}{2} (-c t+x) \sqrt{\frac{c}{\mu }}\right]^4 \mathrm{tanh}\left[\frac{1}{2} (-c t+x) \sqrt{\frac{c}{\mu }}\right]
- \frac{3 c^2}{\epsilon \mu} \sqrt{\frac{c}{\mu }} \mathrm{sech}\left[\frac{1}{2} (-c t+x) \sqrt{\frac{c}{\mu }}\right]^2 \mathrm{tanh}\left[\frac{1}{2} (-c t+x) \sqrt{\frac{c}{\mu }}\right]^3 \right)$
$= \frac{3c^2}{\epsilon} \sqrt{\frac{c}{\mu}} \mathrm{sech}^2\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right] \mathrm{tanh}\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right] $
$- \frac{9c^2}{\epsilon} \sqrt{\frac{c}{\mu}} \mathrm{sech}^4\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right] \mathrm{tanh}\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right]$
$+ \frac{6c^2}{\epsilon} \sqrt{\frac{c}{\mu }} \mathrm{sech}^4\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right] \mathrm{tanh}\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right] $
$- \frac{3 c^2}{\epsilon} \sqrt{\frac{c}{\mu }} \mathrm{sech}^2\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right] \mathrm{tanh}^3\left[\frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)\right] $


Let $\alpha = \frac{1}{2}\sqrt{\frac{c}{\mu}}(x-ct)$, then we can write the equation as:

$\frac{3c^2}{\epsilon} \sqrt{\frac{c}{\mu}} \left[ \mathrm{sech}^2(\alpha) \mathrm{tanh}(\alpha) - \mathrm{sech}^4(\alpha) \mathrm{tanh}(\alpha) - \mathrm{sech}^2(\alpha) \mathrm{tanh}^3(\alpha) \right]$
$= \frac{3c^2}{\epsilon} \sqrt{\frac{c}{\mu}} \mathrm{sech}^2(\alpha) \mathrm{tanh}(\alpha) \left[ 1 - \mathrm{sech}^2(\alpha) - \mathrm{tanh}^2(\alpha) \right]$
$= \beta \left[ 1 - \frac{1}{\mathrm{cosh}^2(\alpha)} - \frac{\mathrm{sinh}^2(\alpha)}{\mathrm{cosh}^2(\alpha)} \right]$
$= \beta \left[ 1- \frac{1+ \mathrm{sinh}^2}{\mathrm{cosh}^2} \right] = 0$

2. Wave Velocity

3. Square Waves

4. Shock Waves


© 2008 Sean M. Arietta
University of Virginia