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

In summary, the conversation discusses the difficulty of graphing the function f(x)=(-2)^x without using complex numbers. While there may be a pattern to the graph, it is difficult to find without a graphing calculator. One possible solution is to use Euler's formula to interpolate between real and complex numbers. However, if only real solutions are considered, the domain becomes discontinuous and limited to integers. Additionally, there is a risk of falling into numerical traps when using simple pocket calculators.
  • #1
Dougggggg
155
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
  • #2
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.
 
  • #3
I believe it is conventional that e.g. [tex](-1)^{\frac{1}{3}} = -1[/tex] outside the context of complex numbers. The function [tex]f(x) = x^{\frac{1}{3}}[/tex] 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 [tex]z^{\frac{1}{x}} = -1[/tex] 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:
  • #4
So I was trying to sleep last night . . .
No need to dream . . .
 

Attachments

  • -2^x.jpg
    -2^x.jpg
    27.4 KB · Views: 470
  • #5
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.
 
  • #6
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.
 
  • #7
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.
 
  • #8
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:
  • #9
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.

[tex](-1)^1= (-1)^{\frac{2}{2}} = ((-1)^2)^{\frac{1}{2}}=1^{\frac{1}{2}} = 1[/tex]

where is the mistake?

The point is that [tex]a^{bc} = (a^b)^c[/tex] is only valid for non-negative reals a. [tex](-2)^x[/tex] is not equal to [tex]4^{\frac{x}{2}}[/tex].
 
  • #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.
 

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

What is the function "Solution: Interesting Function: Solving the Mystery of (-2)x"?

The function "Solution: Interesting Function: Solving the Mystery of (-2)x" is a mathematical function that involves multiplying a number by -2. It is often referred to as the mystery function because it has some unique properties and can produce unexpected results.

How do you solve the mystery of (-2)x?

To solve the mystery of (-2)x, you need to understand the basic principles of multiplication and how it applies to negative numbers. You can also use algebraic equations and graphs to help visualize and understand the function.

What are some examples of the outputs of the function (-2)x?

The outputs of the function (-2)x can vary depending on the input value. For example, if the input is 2, the output would be -4. If the input is -3, the output would be 6. Some other examples include 0 as the input, which would result in 0 as the output, and -1 as the input, which would result in 2 as the output.

How is the function (-2)x useful in real-life situations?

The function (-2)x can be useful in real-life situations where there is a need to multiply a number by -2. For example, it can be used in calculating temperature conversions from Celsius to Fahrenheit, or in financial calculations involving negative numbers.

What are some other interesting properties of the function (-2)x?

The function (-2)x has some unique properties, such as being an odd function, which means the graph of the function is symmetric about the origin. It also has a horizontal asymptote at y=0, meaning the function approaches but never reaches the x-axis. Additionally, the function is not one-to-one, meaning there are multiple inputs that can produce the same output.

Similar threads

Replies
7
Views
1K
Replies
2
Views
1K
Replies
2
Views
1K
Replies
9
Views
3K
Replies
2
Views
962
Replies
2
Views
1K
Back
Top