Solution: Interesting Function: Solving the Mystery of (-2)x

AI Thread Summary
The discussion centers around the function f(x) = (-2)^x, which poses challenges in graphing due to its complex nature. Participants explore the function's behavior, noting that it produces non-real numbers for certain inputs, particularly for fractions. The relationship with Euler's formula is highlighted, explaining how to interpret the function in terms of real and imaginary components. The consensus is that the function is not real-valued and is best understood within the context of complex numbers, which allows for a more comprehensive analysis. Ultimately, the conclusion is that graphing this function requires acknowledging its complex values, as it cannot be accurately represented using only real numbers.
Dougggggg
Messages
152
Reaction score
0
So I was trying to sleep last night but I had a random thought of a function that would be very very painful to graph. I am currently out of town and don't have access to a graphing calculator. Plus I kinda wanted a logical answer before seeing the graph to it. Perhaps some of you have seen it and it will be an easy answer.

f(x)=(-2)x

I tried a few random points in my head and I had no idea what it would look like.

x=1/2, f(x)=non-real number
x=2, f(x)=4
x=3, f(x)=(-8)
x=4, f(x)=16

I could find no pattern to the graph.
 
Mathematics news on Phys.org
Dougggggg said:
So I was trying to sleep last night but I had a random thought of a function that would be very very painful to graph. I am currently out of town and don't have access to a graphing calculator. Plus I kinda wanted a logical answer before seeing the graph to it. Perhaps some of you have seen it and it will be an easy answer.

f(x)=(-2)x

I tried a few random points in my head and I had no idea what it would look like.

x=1/2, f(x)=non-real number
x=2, f(x)=4
x=3, f(x)=(-8)
x=4, f(x)=16

I could find no pattern to the graph.

This function can be graphed by using the relationship with Euler's formula.

Consider the function f(x) = (-1)^x.

This function is simply Real(f(x)) = cos(pi * x) and Im(f(x)) = sin(pi * x) which comes from the identity e^(i * theta) = cos(theta) + i * sin(theta)

The function (-2)^x is simply g(x) = (2)^x * (-1)^x which has the definition

Real(g(x)) = 2^(x) * cos(pi*x)
Im(g(x)) = 2^(x) * sin(pi*x)

So basically if you have a function (-a)^x where a > 0 you can simply modulate the function e^(i * theta) by (a^x) for both real and imaginary parts.
 
I believe it is conventional that e.g. (-1)^{\frac{1}{3}} = -1 outside the context of complex numbers. The function f(x) = x^{\frac{1}{3}} is without explicit mention of complex numbers (or any other domain and range) usually considered a function from the reals to the reals. I would consider (-1)^x in the real number range as defined only for x on the form n/(2k+1), n,k integers, with the sign depending on the parity of n. Of course you could also interpret it in terms of complex numbers by choosing the principial branch as chiro did. Note that for x on the form n/(2k+1) you will have a real solution to z^{\frac{1}{x}} = -1 in the complex domain, and these are the only such values.

Thus if you choose the real range your function is only defined at a countable dense set in the positive real domain, and has no continuous analytical extension, hence difficult to graph.
 
Last edited:
So I was trying to sleep last night . . .
No need to dream . . .
 

Attachments

  • -2^x.jpg
    -2^x.jpg
    27.4 KB · Views: 489
JJacquelin said:
No need to dream . . .

That is not right... So many discontinuities are missing. I got that on one of the online graphing calculators I tried.


Jarle: Good description! I saw one graph that kinda made sense. It basically followed the outlining of 2x on both sides of the x-axis. However, it continued to switch back and forth between positive, negative, and non-real numbers.

chiro: I was kinda trying to figure it out outside of complex numbers. Though I didn't specify so I appreciate the input.
 
Dougggggg said:
That is not right... So many discontinuities are missing. I got that on one of the online graphing calculators I tried.


Jarle: Good description! I saw one graph that kinda made sense. It basically followed the outlining of 2x on both sides of the x-axis. However, it continued to switch back and forth between positive, negative, and non-real numbers.

chiro: I was kinda trying to figure it out outside of complex numbers. Though I didn't specify so I appreciate the input.

If you want to have a solution without complex numbers for negative numbers as your base then you can only consider cases where your complex component is zero.

Basically Eulers relationship describes how you can literally interpolate between the real and the complex numbers, and the way to do that is to use a pair of real numbers.

If you want to consider only purely real solutions then you're domain is going to be discontinuous in which you are restricted to the integers. The complex numbers allow you to generalize expressions on continuous domains instead of the integers.

So i guess if you want to look at situations with a zero imaginary part then yeah you have to restrict your domain.
 
That is not right... So many discontinuities are missing.
No. There are no missing discontinuities as far as we consider the complexe values.
If you want to select the real values only, it is easy to see them on the graphs : The points where Im[(-2)^x] is nul corresponds to the real values Re[(-2)^x]=(-2)^x. And then, there are a lot of discontinuities, of course.
 
Mind the trap !
f = (-2)^x
Let x=2t
f = (-2)^(2t)
f = ( (-2)^2 )^t
(-2)^2 = 4
f = 4^t
f = 4^(x/2)
(-2)^x = 4^(x/2)
No minus, no problem... 4^(x/2) is always real, any real x.
So, (-2)^x is always real, any real x . . . The hitch is obvious !
Nevertheless, too simple pocket computers may fall into the trap for some numerical values of x, depending on the internal computation algorithm.
For example :
(-2)^(2/3) = -0.793701+1.37473*i
is one of the correct approximate complexe values.
Some too simple pocket computers are likely to display = 1.587401 which is incorrect.
 
Last edited:
JJacquelin said:
Mind the trap !
f = (-2)^x
Let x=2t
f = (-2)^(2t)
f = ( (-2)^2 )^t
(-2)^2 = 4
f = 4^t
f = 4^(x/2)
(-2)^x = 4^(x/2)
No minus, no problem... 4^(x/2) is always real, any real x.

(-1)^1= (-1)^{\frac{2}{2}} = ((-1)^2)^{\frac{1}{2}}=1^{\frac{1}{2}} = 1

where is the mistake?

The point is that a^{bc} = (a^b)^c is only valid for non-negative reals a. (-2)^x is not equal to 4^{\frac{x}{2}}.
 
  • #10
Dougggggg said:
Jarle: Good description! I saw one graph that kinda made sense. It basically followed the outlining of 2x on both sides of the x-axis. However, it continued to switch back and forth between positive, negative, and non-real numbers.

One could surely get the idea, but the fact that the set of discontinuities is dense makes it impossible to make a representative graph.
 
  • #11
I just got an email from one of my professors (I have him next semester for Calc II) stating the following.

"Doug,
I am also currently out of town, so will respond more completely later.
For now note that it is not a real valued function so your calculator will not know what to do with it.
It is a complex valued function, so when you evaluate this function the results are complex numbers, most of which are not real.
This is why your calculator doesn't know what to do with it. The graph is actually in the complex plane. We can talk more about it next semester.
Now I hope you can sleep!
See you in a couple of weeks."

So you guys indeed hit it right on the head, complex planes are the way to do it. I guess I have to remember about how to use complex numbers again, I haven't seen them since high school to be honest. Thanks for the help though guys. I wanted to fight the idea of using complex numbers at all costs but alas, I see this is just not made for graphs of real numbers.
 

Similar threads

Back
Top