SERVING THE QUANTITATIVE FINANCE COMMUNITY

• 1
• 2
• 3
• 4
• 5
• 8

Cuchulainn
Topic Author
Posts: 62898
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Silly questions

Can $(1-x)(1+x)log((1+x)/(1-x))$ ever become unbounded? (not including the infinities).
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

Alan
Posts: 10321
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

### Re: Silly questions

Can $(1-x)(1+x)log((1+x)/(1-x))$ ever become unbounded? (not including the infinities).
I'd say it's a  bounded function for any real |x| <= 1 or indeed on any bounded domain for x.

But, it becomes an unbounded complex function on the real line or half-line

Posts: 23951
Joined: September 20th, 2002, 8:30 pm

### Re: Silly questions

for |x|>1, f is complex;
for |x|<1, f is real; and
for |x|=1, f converges to 0 from both sides

Obviously, a sequential computation for x approaching either +1 or -1 might have unbounded intermediate terms but the full expression remains bounded.

ppauper
Posts: 70239
Joined: November 15th, 2001, 1:29 pm

### Re: Silly questions

it's bounded except at what you term the infinities at $|x|=\infty$

$(1-x)(1+x)\ln\frac{1+x}{1-x}=(1-x)(1+x)\ln(1+x)-(1-x)(1+x)\ln(1-x)$

the only potential problem values would have been $x=\pm 1$ and if you look at those 2 points, you see that  they are not in fact problems because the factors (1+x) and (1-x) out front kill any bad behavior from the logarithm

as $x\to 1$ it tends to $-2(1-x)\ln(1-x)\to 0$
as $x\to -1$ it tends to $2(1+x)\ln(1+x)\to 0$

Cuchulainn
Topic Author
Posts: 62898
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: Silly questions

it's bounded except at what you term the infinities at $|x|=\infty$

$(1-x)(1+x)\ln\frac{1+x}{1-x}=(1-x)(1+x)\ln(1+x)-(1-x)(1+x)\ln(1-x)$

the only potential problem values would have been $x=\pm 1$ and if you look at those 2 points, you see that  they are not in fact problems because the factors (1+x) and (1-x) out front kill any bad behavior from the logarithm

as $x\to 1$ it tends to $-2(1-x)\ln(1-x)\to 0$
as $x\to -1$ it tends to $2(1+x)\ln(1+x)\to 0$
Very good. I think it can in general be boiled down to

$\displaystyle\lim_{x\to0} x^k log(x) = 0$ for $k = 1,2,3,..$.

The background to my problem was transforming the real line to $(-1,1)$ by $y = tanh(x)$ for a PDE(x) to PDE(y) and you want the transformed coefficients to be bounded.
//
BTW it seems that $(1/2)\log\frac{1+x}{1-x}$ is called the Fisher z-transform.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

Paul
Posts: 10794
Joined: July 20th, 2001, 3:28 pm

### Re: Silly questions

This is the sort of post that gives a mathsy website a bad reputation, not stories about Donald Trump.

Posts: 23951
Joined: September 20th, 2002, 8:30 pm

### Re: Silly questions

We all know Donald Trump is unbounded on both the real and fake number systems.

Paul
Posts: 10794
Joined: July 20th, 2001, 3:28 pm

### Re: Silly questions

Posts: 23951
Joined: September 20th, 2002, 8:30 pm

### Re: Silly questions

Well, I'd hate for this site to be branded as suspicious for having lots of terrorizing al' gebra, al' gorithms, and references to Osama bin Ary

ppauper
Posts: 70239
Joined: November 15th, 2001, 1:29 pm

### Re: Silly questions

I think it can in general be boiled down to

$\displaystyle\lim_{x\to0} x^k log(x) = 0$ for $k = 1,2,3,..$.
that's true for all $k>0$, not just for integers, so e.g. $\displaystyle\lim_{x\to0} x^{1/2} log(x) = 0$

Cuchulainn
Topic Author
Posts: 62898
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: Silly questions

This is the sort of post that gives a mathsy website a bad reputation, not stories about Donald Trump.
There's only one thing worse than talking about maths, and that's not talking about it. It will last longer than Donald Trump who will be vote out in 2 years.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

Cuchulainn
Topic Author
Posts: 62898
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: Silly questions

It's silly question time again and today's silly question is:

Consider the continuous 'hat' function

$f(x) = 2x, 0 \leq x \leq 1/2;$ $f(x) = 2(1-x), 1/2 \leq x \leq 1$.

I want to approximate $f(x)$ to any accuracy by (ideally) an infinitely differentiable function. An analytical and easily computable solution is desired. Ideally, the approximation should be in continuous space; failing that, a discrete approximation might be OK.

// Some Wilmotters might remember a similar question a while back ..(the one with the Jack Nicholson avatar).
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

ppauper
Posts: 70239
Joined: November 15th, 2001, 1:29 pm

### Re: Silly questions

approximate on what interval?
[0,1] you could use a fourier series
or stretch it to [-1,1] and use chebyshev

outrun
Posts: 4573
Joined: April 29th, 2016, 1:40 pm

### Re: Silly questions

(edit ppauper and I cross posted, I was also thinking about Chebyshev)
---

I tried a Chebyshev approximation (which is infinitely differentiable since it's a sum of (orthogonal) polynomials), but it doesn't converge very fast. I bet that'll be a general issue with geneneric (popular) polynomial basis because of the discontinuity of the derivative at the peak on one hand and you wanting  infinitely differentiability at the other hand.
import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(-1, 1, 2000)

# hat function
y = 1 - abs(x)

p = np.polynomial.Chebyshev.fit(x, y, 128, domain=(-1,1))

plt.plot(x, y, 'r.')
plt.plot(x, p(x), 'k', lw=2)
plt.title('fit')
plt.show()

plt.plot(x, p(x) - y, 'k', lw=2)
plt.title('error')
plt.show()

plt.semilogy(np.abs(p.coef),'*')
plt.title('maginitude coefficients')
plt.show()

Perhaps cutting off the top -just a tiny bit- and replacing it with a spline that matches derivatives left and right will be a good approximation, and infinitely differentiable?

ppauper
Posts: 70239
Joined: November 15th, 2001, 1:29 pm

### Re: Silly questions

the fourier series is
$\sum_{m=1}^{\infty}\frac{8}{m^2\pi^2}\sin\frac{m\pi}{2}\sin m\pi x$

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...

 JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...

GZIP: On