Plotting fractional powers with maple

150 Views Asked by At

I am trying to plot the function $(-2(\alpha-1)/\alpha)^{(-2(\alpha+2)/\alpha)}$ in maple, but I got the following warning

plot( (-2*(alpha-1)/alpha)^(-2*(alpha+2)/alpha) ,alpha=5..10);

Warning, unable to evaluate the function to numeric values in the region; complex values were detected.

Actually the function have real values as roots but maple does not plot the values.

How do I plot it?

2

There are 2 best solutions below

2
On

You claim that the expression has real values as roots. However, $$ \frac {-2(a-1)}a = \frac{2(1-a)}a < 0 $$ for $a > 1$ and thus especially for $a \in [5,10]$. I am quite unconvinced that your expression is real for all values of $a\in [5,10]$ and a simple check agrees with this suspicion;

seq((-2*(a-1)/a)^(-2*(a+2)/a),a = 5..10, 1):
evalf(%,2);

$- 0.21- 0.16\,i,- 0.13- 0.23\,i,- 0.056- 0.24\,i,- 0.24\,i, 0.044- 0.24\,i, 0.078- 0.23\,i$

Instead, try the complexplot command in the plots package, which hints that your expression may be complex for all values of $a\in[5,10]$.

plots:-complexplot((-2*(a-1)/a)^(-2*(a+2)/a),a = 5..10);

Complexplot of expression

1
On

Extending @Therkel response.

If you want to plot only the real part then you can do it like this,

restart:with(plots):
plot( Re((-2*(alpha-1)/alpha)^(-2*(alpha+2)/alpha)),alpha=5..50,axes=boxed,color=red);

enter image description here