{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# p04: Periodic spectral differentiation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We compute derivatives of following periodic functions on finite interval\n",
"\n",
"$$\n",
"v(x) = \\max(0, 1-|x-\\pi|/2), \\qquad x \\in [0,2\\pi]\n",
"$$\n",
"\n",
"and\n",
"\n",
"$$\n",
"v(x) = \\exp(\\sin(x)), \\qquad x \\in [0,2\\pi]\n",
"$$"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"%config InlineBackend.figure_format='svg'\n",
"from numpy import pi,inf,linspace,zeros,arange,sin,cos,tan,exp,maximum,abs\n",
"from numpy.linalg import norm\n",
"from scipy.linalg import toeplitz\n",
"from matplotlib.pyplot import figure,subplot,plot,axis,title,text"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"\n",
"\n",
"\n"
],
"text/plain": [
"