bledoux1
(Ben LeDoux)
April 22, 2014, 2:19pm
1
Hello,
I am trudging my way through my first Mathematica assignment for Calculus 1 and am loving the software, the things it can do is amazing. However, I am not running into an issue when I am trying to input this function into a graph using the Plot tool. I do not see where I am going wrong. Any help?
Plot[x^2 - e^-x^2 == 0, {x, -10, 10}]Plot[x^2 - e^-x^2 == 0, {x, -10, 10}]
Assuming you meant “e” to be the euler-number, the correct syntax is,
(* One way of doing this. *)
Plot[x^2 - Exp[-x^2] == 0, {x, -10, 10} ]
(* Or...*)
Plot[x^2 - E^(-x^2) == 0, {x, -10, 10} ]
sukrause
(Udo Krause)
April 22, 2014, 2:44pm
3
Syntax counts a bit, the Euler number is E in Mathematica or use function Exp[] as usual
Plot[x^2 - Exp[-x^2] == 0, {x, -10, 10}]
but what do you intend with it? Solving that equation symbolically would be
In[5]:= Reduce[x^2 - Exp[-x^2] == 0, x]
Out[5]= C[1] \[Element]
Integers && (x == -Sqrt[ProductLog[C[1], 1]] || x == Sqrt[ProductLog[C[1], 1]])
finding a root (there are 2) would be
In[6]:= FindRoot[x^2 - Exp[-x^2] == 0, {x, -1}]
Out[6]= {x -> -0.753089}
solving it graphically means to type
Plot[{x^2, Exp[-x^2]}, {x, -1, 0},
Epilog -> {PointSize[Large], Red,
Point[{-0.7530891649796748, (-0.7530891649796748)^2}]}]
bledoux1
(Ben LeDoux)
April 22, 2014, 2:46pm
4
It is always the smallest things, isn’t it? It ended up being the mix-up between e and E, thanks so much for your help guys!