Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
5Activity
0 of .
Results for:
No results containing your search query
P. 1
Behavior of the bump function's derivatives

Behavior of the bump function's derivatives

Ratings: (0)|Views: 582|Likes:
Published by RhysU
An investigation into the behavior of the C^\inf bump function's ill-behaved derivatives and how they may be mitigated for numerical use.
An investigation into the behavior of the C^\inf bump function's ill-behaved derivatives and how they may be mitigated for numerical use.

More info:

Published by: RhysU on Aug 03, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

04/07/2014

pdf

text

original

 
Consider the classical
bump function with support on (-1,1) rescaled so it has magnitude 1 at its center.
In[2]:=
Bump
x_
:
Piecewise

Exp
x
2
x
2
1
, Abs
x
1

; Bump
x
Plot
Bump
x
,
x,
1, 1
, Filling
Axis
Out[2]=
x
2
1
x
2
Abs
x
10 True
Out[3]=
1.0
0.50.51.00.20.40.60.81.0
Observe that the second derivative becomes large in magnitude near the edges of the support. As the absolute value of the function and its derivatives is symmetric about the origin, only half of it is visualized.
In[4]:=
Plot
Evaluate
Table
Derivative
d

Bump

x
,
d, 0, 2

,
x, 0, 1
, Filling
Axis, PlotRange
Full,PlotLabel
"Zeroth, first, and second derivatives"
Out[4]=
0.20.40.60.81.05101520
Zeroth,first,andsecondderivatives
The magnitudes observed grow strikingly as the derivative order increases.
In[5]:=
Table

d, N
 MaxValue
 Abs
Derivative
d

Bump

x

, x

,
d, 0, 7
 
MatrixForm 
ut 5 // atr x orm=
0 1.1 2.170362 21.06593 506.6884 22604.95 1.62107
10
6
6 2.21471
10
8
7 3.95463
10
10
 
 
This growth makes the bump function ill-suited for numerical initialization smoothing on coarse grids. A coarse gridthat can fully resolve the bump function will likely not be able to resolve its derivatives. This lack of resolution maycause ringing to appear and can destabilize a simulation. One fix would be to initialize with a Gaussian rather than abump function. However, Gaussian functions do not have compact support (and alleviating that issue in a
-waybrings one back again to bump functions).One way to alleviate this problem is to use powers of the bump function to minimize the derivative magnitudes up tosome finite derivative order. Powers of the “magnitude-one” bump function still possess that same magnitude at x = 0and remain
.
In[6]:=
BumpPower
n_
:
Piecewise

Exp
n
1
2
1
2
1
, Abs
1
1

&; BumpPower
n

x
Plot
Evaluate
Table
Derivative
0

BumpPower
 power

x
,
 power, 1, 7

,
x, 0, 1
, Filling
Axis, PlotRange
Full,PlotLabel

"Bump function to increasing powers"
Out[6]=
n x
2
1
x
2
Abs
x
10 True
Out[7]=
0.20.40.60.81.00.20.40.60.81.0
Bumpfunctiontoincreasingpowers
Derivative maximum magnitudes seem to decrease with the chosen power up to some limiting case. After that case,the abruptness of the function’s magnitude increase at x = 0 dominates the behavior.
In[8]:=
Plot
Evaluate
Table
Derivative
1

BumpPower
 power

x
,
 power, 1, 7

,
x, 0, 1
, Filling
Axis, PlotRange
Full,PlotLabel
"First derivative of increasing powers"
Out[8]=
0.20.40.60.81.0
2.5
2.0
1.5
1.0
0.5
Firstderivativeofincreasingpowers
2
 
BumpFunctionPowers.nb
 
In[9]:=
Plot
Evaluate
Table
Derivative
2

BumpPower
 power

x
,
 power, 1, 12

,
x, 0, 1
, Filling
Axis, PlotRange
Full,PlotLabel
"Second derivative of increasing powers"
Out[9]=
0.20.40.60.81.0
20
101020
Secondderivativeofincreasingpowers
Spot checking a few powers suggests that low powers best control the second derivative.
In[10]:=
MagnitudeBumpPowerDerivative
n_, d_
:
 N
 MaxValue
 Abs
Derivative
d

BumpPower
n

x

, x

In[11]:=
Table
 MagnitudeBumpPowerDerivative
n, d
,
d, 0, 5
,
n, 1, 7
 
MatrixForm 
Out[11]//MatrixForm=
1. 1. 1. 1. 1. 1. 1.2.17036 1.91156 1.98514 2.11782 2.26213 2.40592 2.5456521.0659 10.2802 8.36423 8.06356 10. 12. 14.506.688 127.416 73.0156 57.093 51.8527 62.4822 75.872222604.9 2881.99 1129.32 687.778 534.214 542.248 595.2881.62107
10
6
103571. 29124.4 14355.1 9722.52 8005.8 7479.46
The table suggests that taking a power near four will optimally control the first and second derivative. Attempting tominimize the derivative absolute magnitudes shows the following continous power-dependence:
In[12]:=
Plot

 MagnitudeBumpPowerDerivative
n, 1
, MagnitudeBumpPowerDerivative
n, 2
,
n, 3, 5
, PlotRange
 All,
0, Full

,PlotLabel
"First and second derivative versus power taken"
Out[12]=
3.03.54.04.55.0246810
Firstandsecondderivativeversuspowertaken
Going to a non-integer power seems to buy very little benefit for the extra computational cost. The integer power 4seems to be a reasonable tradeoff between the first and second derivative’s maximum absolute magnitudes.
BumpFunctionPowers.nb
3

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->