Mathematica Mathematica Plots Wrong: How is it Possible?

  • Thread starter Thread starter nikolafmf
  • Start date Start date
  • Tags Tags
    Mathematica Plots
AI Thread Summary
Mathematica's ability to plot the function defined by the equation Exp[-Sqrt[-x]] + Exp[Sqrt[-x]] - 2 == 0 for both negative and positive values of x raises questions about the function's domain. The presence of the square root of -x suggests that the function should only be defined for x ≤ 0. However, for x > 0, the expression simplifies to Exp[-iSqrt[x]] + Exp[iSqrt[x]], which equals 2Cos[Sqrt[x]] due to Euler's formula. This indicates that the function can yield real values for all real x, despite the initial assumption about its domain. The discussion highlights the implications of complex numbers in mathematical functions and their graphical representations.
nikolafmf
Messages
112
Reaction score
0
I said to Mathematica to plot a graph as this:

Plot[Exp[-Sqrt[-x]] + Exp[Sqrt[-x]] - 2 == 0, {x, -10, 40}].

You can see that there is square root of -x, which should mean that the function is defined only for x<=0. But no, Mathematica would plot a curve also for positive values of x. How is this possible at all?
 
Physics news on Phys.org
Note that when x > 0, we have Exp[-Sqrt[-x]] + Exp[Sqrt[-x]] = Exp[-iSqrt[x]] + Exp[iSqrt[x]] = 2Cos[Sqrt[x]], which is defined and a real number for all real values of x > 0. The latter equality is a result of Euler's formula.
 
  • Like
Likes 1 person

Similar threads

Replies
5
Views
2K
Replies
1
Views
2K
Replies
5
Views
3K
Replies
4
Views
2K
Replies
1
Views
2K
Replies
2
Views
1K
Back
Top