How to plot $(1+a)\left(1-\frac{a}{\sqrt{e}}\int_{0}^{1}x^{a-1}\exp\left\{-\frac{x\ln x}{2(1-x)}\right\}\,{\rm d}x\right)$?

138 Views Asked by At

I tried to plot following function using the Maple. But I can not observe the result. Can you help me? $$f(a)=(1+a)\left(1-\frac{a}{\sqrt{e}}\int_{0}^{1}x^{a-1}\exp\left\{-\frac{x\ln x}{2(1-x)}\right\}\,{\rm d}x\right),~~a>0.$$

1

There are 1 best solutions below

0
On BEST ANSWER

For the purpose of plotting a modest accuracy tolerance (option epsilon) should suffice.

restart;

f := proc( a, {dig::posint:=15}, {eps::realcons:=1e-4} )
       Digits:=dig:
       (1+a)*(1-a/sqrt(exp(1))
                *Int(unapply(x^(a-1)*exp(-x*ln(x)/(2*(1-x))),x),
                     0..1, digits=dig, epsilon=eps));
end proc:

evalf(f(1));

                             0.311872506

evalf(f(0));

                                 1.

evalf(f(0.0001)); # numeric integration does not succeed

                              /  /         /  x ln(x)\          \
                              | |       exp|- -------|          |
                              | |          \  2 - 2 x/          |
    1.0001 - 0.00006065913127 | |  x -> -------------- d0. .. 1.|
                              | |           0.9999              |
                              \/           x                    /

plot(f, 0.001 .. 30);

enter image description here

# With a change of variables we can do better for small values of the parameter.
g := proc( a )
       Digits:=15;
       (1+a)*(1-a/sqrt(exp(1))
                *Int(x^(a-1)*exp(-x*ln(x)/(2*(1-x))),
                     x=0..1, digits=15, epsilon=1e-4, method=_d01amc));
end proc:

G := student[changevar](t=ln(x), g(u), t);

             /      1    /  /   /        (u - 1)    /  exp(t) t   \         
G := (1 + u) |1 - ------ |u |Int|(exp(t))        exp|-------------| exp(t), 
             |       /1\ \  \   \                   \-2 + 2 exp(t)/         
             |    exp|-|                                                    
             \       \2/                                                    

                                                                     \\\\
  t = -infinity .. 0, digits = 15, epsilon = 0.0001, method = _d01amc||||
                                                                     ///|
                                                                        |
                                                                        /

evalf( eval(G,u=0.0000001) );

                            0.9999548492

PG1 := plot(G, u=0.01 .. 30):
PG1;

enter image description here

PG2 := plot(G, u=0.0000001 .. 0.01, adaptive=false, numpoints=20):
PG2;

enter image description here

plots:-display( PG1, PG2 );

enter image description here