Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

plotting complicated function

I would like to approximate the sum h(a,x)=2nn1n=0log|Tna(x)| where n is large like n=10005000 and for a fixed a Ta(x)=|1x||1x|1+a where x(0,1).

By fixing x to be a value x0(0,1), e.g. x0=1/π, h(a,x0)=h(a,1/π) a function of one variable, and I want to plot a 2D graph of point (a,h(a,1/π)), by fixing n=2000, for a[0,1].

I figure how to calculate the value at one given a using sagemath, for example, when a=1,

T(x) = 1/x - floor(1/x)

s=0

for k in xrange(0,1000):

 a=0

 a=nest(T, k, 0.79)

 b=abs(a)

 c=log(b)

 s=s+c

Then 21000s give the approximation for the sum when x=0.79,n=1000,a=1.

But for plotting, I think I need to define the function h(a,x) which is a summation over composition of functions. I try to use sum and symbolic_sum but fail.

Any help how to achieve this please ?

plotting complicated function

I would like to approximate the sum h(a,x)=2nn1n=0log|Tna(x)| where n is large like n=10005000 and for a fixed a Ta(x)=|1x||1x|1+a where x(0,1).

By fixing x to be a value x0(0,1), e.g. x0=1/π, h(a,x0)=h(a,1/π) a function of one variable, and I want to plot a 2D graph of point (a,h(a,1/π)), by fixing n=2000, for a[0,1].

I figure how to calculate the value at one given a using sagemath, SageMath, for example, when a=1,

T(x) = 1/x - floor(1/x)

s=0

floor(1/x) s = 0 for k in xrange(0,1000):

 a=0

 a=nest(T, xrange(0, 1000):
     a = 0
     a = nest(T, k, 0.79)

 b=abs(a)

 c=log(b)

 s=s+c
     b = abs(a)
     c = log(b)
     s = s + c

Then $\frac{-2}{1000}s$ give the approximation for the sum when $x = 0.79, n =1000, a=1$.0.79$, $n = 1000$, $a = 1$.

But for plotting, I think I need to define the function $h(a, x)$ which is a summation over composition of functions. I try tried to use sum sum and symbolic_sum symbolic_sum but fail.failed.

Any help how to achieve this please ?please?