Mathematica Guides
What's Mathematica even good for? Ever need to solve an integral but need to keep a variable in your final answer? Or need to fit your data to an obscure function? Download Mathematica and use our guide to get familiar with the most powerful symbolic computational tool available to Cornell engineers.
There is also a feedback section at the end of the page; we would greatly appreciate any criticism or places where we should improve. Thanks for reading!
Need-To-Know
-A list in the Wolfram Language is represented by braces { } and is a collection of items referred to as elements.
-Parentheses ( ) are used for grouping expressions and to determine the precedence of operations.
-Square brackets [ ] are used in the Wolfram Language to enclose the arguments of functions.
Statistics & Distributions
Using Matrices
There are multiple ways to construct a matrix:
1) Bracket notation
M = {{A, B, C}, {D, E, F}, {G, H, I}}
2) Table Function - use an expression (for full documentation please see below:)
Table[x, {i, imin, imax, istep}, j, jmin, jmax, jstep, . . .}]
To show in matrix form:
M // MatrixForm
Matrix Operations
Plotting
Common Errors
If you are having trouble running your code, Mathematica will sometimes give you suggestions or prompt you, however much of the time this is not enough.
Variables that are not yet defined will appear in BLUE. This can be useful if a function is spelled incorrectly or if you accidentally type in a different variable.
Make sure to check brackets. As a reminder, { } , [ ] , and ( ) are all different and are NOT interchangeable. Sometimes Mathematica will highlight the brackets in RED if there may be an error. For more specific information, please refer to the Need-to-Know section.
If you are missing an argument to a function, Mathematica will prompt you with a RED arrow. Mathematica will sometimes fill the empty space as "Null".
All built-in functions start with a capital letter and are in CamelCase for compound names.
When using exponential functions, the irrational number e = 2.71... is different than the character e. To write the number, you must press esc, then type the character e twice, and then press esc once more. Additionally, the natural logarithm function is not written as ln[], but as log[] (it is automatically set to base e).
For more detailed help navigate to the HELP tab and select "Wolfram Documentation".
Common Mathematica Errors and their Corresponding Outputs
Additional Resources
Our guide provides the most salient Mathematica functions that are useful across disciplines. Here you will find the full suite of resources available to Mathematica users who wish to work across disciplines: