Message Boards Message Boards

0
|
7398 Views
|
8 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Problem Using the Power (^) Operation in Mathematica

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
Yes. Sorry. The "Ctrl" is a typo and should be "Shift". Sorry about that.
POSTED BY: Sean Clarke
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 BY: Ilian Gachevski
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 BY: Sean Clarke
Posted 12 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 BY: Ed Frank
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 12 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 BY: Ed Frank
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 enter

This will give
In:= 4^6
Out:= 4096
Other times I will write

6^4 then enter

This 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.
"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^3
3.14^10

etc.

If you have not read the virtual book, this may help you become more famailiar with how to get started with Mathematica.
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract