{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

demo1

# demo1 - demo1.nb 1 Mathematica Demo#1 Arithmetic...

This preview shows pages 1–5. Sign up to view the full content.

Mathematica Demo #1 ° Arithmetic Shift-Enter --> Calculate (inputs any calculation you would like performed) "+" --> Addition "-" --> Subraction "*" or " " --> Multiplication "/" --> Division "^" --> Exponent Examples: 2.3 + 5.63 7.93 2.4 °°°°°°°°°°°°°°°°°°° 8.9^2 0.0302992 234 24 H 3 + 4 L ^2 - 2 H 3 + 1 L 41 Order of execution is always by standard convention. Exponents first, followed by multiplication and division, then lastly addition and subtraction. If two operations are of the same priority, parenthetical operations are performed first if applicable, or the operation that comes first sequentially. ° Scientific Notation One enters a number in scientific notation in the following way: 2.3 * 10^70 2.3 · 10 70 demo1.nb 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
° Exact and Approximate Results Mathematica will generally default to an exact answer; however, this is not always the most desirable format. The "//N" or "N[ expr ]" switch allows the program to approximate the solution to a fixed number of decimal places. It is specifically defined in the following way: ?N N @ expr D gives the numerical value of expr. N @ expr, n D attempts to give a result with n - digit precision. Note that ? Function gives the help description of any function or command. Examples: 2^100 1267650600228229401496703205376 N @ 2^100 D 1.26765 · 10 30 2^100 N 1.26765 · 10 30 N @ 2^100,15 D 1.26765060022823 · 10 30 Similarly, this switch will transform rational fractions to decimal form, or a square root from its exact symbolic form to a decimal form. 1 °°°°° 3 + 2 °°°°° 7 13 21 N A 1 °°°°° 3 + 2 °°°°° 7 E 0.6190476190476191 Lastly, note the differences in output depending on how the input is entered. In particular, note the effect of adding a decimal point to change the argument from an integer to a real number. demo1.nb 2
Sqrt @ 2 D ++++ 2 N @ Sqrt @ 2 DD 1.41421 Sqrt @ 2. D 1.41421 ° Common Mathematical Functions Sqrt[x] --> square root Exp[x] --> exponential Log[x] --> natural logarithm Log[b,x] --> logarithm to base b Sin[x], Cos[x], Tan[x], Csc[x], Sec[x], Cot[x] --> trigonometric functions (x in radians) ArcSin[x], ArcCos[x], ArcTan[x], ArcCsc[x], ArcSec[x], ArcCot[x] --> inverse trigonometric functions (results in radians) Sinh[x], Cosh[x], Tanh[x], Csch[x], Sech[x], Coth[x] --> hyperbolic functions ArcSinh[x], ArcCosh[x], ArcTanh[x], ArcCsch[x], ArcSech[x], ArcCoth[x] --> inverse hyperbolic functions n! --> factorial Abs[x] --> absolute value Round[x] --> closest integer to x FactorInteger[x] --> prime factors of n Examples: Sqrt @ 65 D ++++++ 65 Sqrt @ 65. D 8.06226 Log @ 56. D 4.02535 Log @ 10,1353. D 3.1313 demo1.nb 3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Sin A Pi °°°°°°°° 2 E 1 6 ! 720 FactorInteger @ 63 D 88 3,2 < , 8 7,1 << Note that all Mathematica functions begin with capital letters , and that their arguments are enclosed in square brackets . ° Mathematical Constants Pi --> pi (3.14159 .... ) E --> e (2.71828 .... ) Degree --> Pi / 180 (converts degrees to radians) I --> Sqrt[-1] (imaginary number) Infinity --> infinity EulerGamma --> Euler's constant (0.577216 .... ) Examples: Pi p N @ Pi D 3.14159 N @ Pi, 40 D 3.141592653589793238462643383279502884197 ° Complex Numbers As mentioned in the previous section, complex numbers may be denoted by adding the constant I .
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 24

demo1 - demo1.nb 1 Mathematica Demo#1 Arithmetic...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online