{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# p19: Second order Wave Equation on Chebyshev Grid "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We solve\n",
"$$\n",
"u_{tt} = u_{xx}, \\qquad -1 < x < 1, \\qquad t > 0\n",
"$$\n",
"with boundary condition\n",
"$$\n",
"u(\\pm 1,t) = 0\n",
"$$\n",
"and initial condition\n",
"$$\n",
"u(x,0) = e^{-200 x^2}\n",
"$$"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"%config InlineBackend.figure_format = 'svg'\n",
"from chebfftPy import chebfft\n",
"from numpy import arange,cos,zeros,round,exp,pi\n",
"from mpl_toolkits.mplot3d import Axes3D\n",
"from matplotlib.collections import LineCollection\n",
"from matplotlib.pyplot import figure"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"\n",
"\n",
"\n"
],
"text/plain": [
"