0
|
5731 Views
|
8 Replies
|
4 Total Likes
View groups...
Share
GROUPS:

# Problem Using the Power (^) Operation in Mathematica

Posted 11 years ago
 In am new to Mathematica and just learning how to use it.I have encountered a rather unusual problem, most operations, such as + - / * work fine, at least when I used the numpad to type them in.  However, I cannot get the power operation to work consistently.  Somtimes mathematica will resolve and expression such as 2^2, other times it will not.  The problem also occurs with the alternatives, such as ctrl + ^ and power[2, 2].  I do not understand why it is working so inconsistently.  Can you please provide me with help regarding this function?
8 Replies
Sort By:
Posted 11 years ago
 "power[2,2]" will not work because the word power must be capitalized. All built-in Mathematica expressions are capitalized. Can you give us an example of where the carrot operator "^" is not working for you? What happens when you try to use it?In general it should always work when given two numbers like:2^33.14^10etc.If you have not read the virtual book, this may help you become more famailiar with how to get started with Mathematica.
Posted 11 years ago
 Actually I was capitalizing Power in the program, I just wrote it down wrong in the thread.More explicitly though, here is what happens.Sometimes a write:6^4 then enterThis will giveIn:= 4^6Out:= 4096Other times I will write6^4 then enterThis will then give absolutely nothing, it will just advance to the next line waiting for a text prompt.I hope that provides a better idea of what is going on.
Posted 11 years ago
 Did you mean: " ... then Shift + Enter ... " each time when you wrote " ... then enter ... "Like you, I am only beginning to use Mathematica, but usually it requires Shift + Enter to evaluate an expression.But you probably already know this.Good Luck.
Posted 11 years ago
 Actually I did not realize that, because I only had to press enter for Mathematica to evaluate most of the expressions I was using.  But your right, by pressing shift + enter, it is now consistently evaluating these expressions.Thanks for the help.
Posted 11 years ago
 Please see the virtual book for an overview of how to use Mathematica. You are using Wolfram|Alpha in Mathematica instead of using Mathematica directly. When you use Wolfram|Alpha in Mathematica, you will notice big orange equal signs to the left of your code. This means you aren't using Mathemtica directly, but using Woflram|Alpha. When you use Mathematica directly Ctrl+Enter is always needed to evaluate an expression.
Posted 11 years ago
 Sean - thanks for the useful insights about the relationships between Mathematica and Wolfram|Alpha.Can you elaborate - for Mr Barbieri and me - on the difference between Shift+Enter and Ctrl+Enter?Shift+Enter seems to evaluate an expression, whereas Ctrl+Enter seems only to rewrite and return the expression in an alternate format.Thanks, Ed
Posted 11 years ago
 Sean Clarke wrote:When you use Mathematica directly Ctrl+Enter is always needed to evaluate an expression.That has to be a typo -- Shift+Enter evaluates, while Ctrl+Enter does something else (inserts a new row when entering a table or a matrix). By the way, this is a more exhaustive listing of the various Keyboard Shortcuts.
Posted 11 years ago
 Yes. Sorry. The "Ctrl" is a typo and should be "Shift". Sorry about that.