SCCC Mathematica Tutorial, © 2007-2020, Seattle Central Community College Math Dept., contact: Greg.Langkamp@seattlecolleges.edu
Version 1.9/ March 2020
Important! ​​Click "Make Your Own Copy" in the black ribbon above to make this document interactive. You will also need to be logged into Wolfram Cloud​​​​

Lesson 2 Standard Mathematical Functions

2.1 Introduction

Mathematica has thousands of built-in mathematical functions. In this lesson we will focus on the functions that you are already familiar with from Precalculus; namely trigonometric, exponential and logarithmic functions.
There are two important rules that you need to remember when using Mathematica's built-in functions. 1. All functions start with a capital letter.2. All functions use square brackets (not parentheses) to enclose their input value.
The Absolute Value and Square Root Functions​A simple example of the application of these rules is the absolute value function. On most calculators the absolute value function
x
is represented by the function
abs(x)
. The corresponding function in Mathematica is Abs[x] . Note that we start with a capital letter and use square brackets.
Abs[-6]
Earlier, we introduced the keyboard shortcut 2 to enter a square root. So to enter the square root function we would enter the keystrokes 2
x
.
x
The square root function
x
is also represented in Mathematica by the built-in function Sqrt[x] (note that this function starts with a capital letter S). So the two expressions below are equivalent. You can use either, although in this tutorial we will continue to use the keyboard shortcut.
36
Sqrt[36]

2.2 Trigonometric functions

◼
  • Use Mathematica to evaluate
    sin
    π
    3
    . Recall that the keyboard shortcut for π is  p . We use Sin for the function name and enclose the input in square brackets.
  • Sin[π/3]
    Unlike a calculator, Mathematica gives an exact value.
    The table below shows the syntax for the other trigonometric functions. Note that each function on the right starts with a capital letter and uses square brackets to enclose the function input.
    togetthis,
    weenterthis:
    sin(x)
    Sin[x]
    cos(x)
    Cos[x]
    tan(x)
    Tan[x]
    csc(x)
    Csc[x]
    sec(x)
    Sec[x]
    cot(x)
    Cot[x]
    -1
    sin
    (x)
    ArcSin[x]
    -1
    cos
    (x)
    ArcCos[x]
    -1
    tan
    (x)
    ArcTan[x]
     Caution: Note that for the inverse functions two letters are capitalized; e.g., both A and T are capitalized in ArcTan.
    Use the table above and the keyboard shortcut for π to enter and evaluate each of the following expressions.
    ◼
  • Evaluate
    cos
    π
    4
  • ​
    value =
    1
    2
    ◼
  • Evaluate
    sec
    π
    4
  • ​
    value =
    2
    ◼
  • Evaluate
    tan
    π
    4
  • ​
    value =
    1
    ◼
  • Evaluate
    -1
    tan
    (1)
  • ​
    value =
    π
    4
    ​
    Raising a trigonometric function to a power​Suppose you want to enter a power of trigonometric function such as
    2
    sin
    π
    3
    . The correct Mathematica syntax in this case is:
    2
    Sin[π/3]
    . Note in particular that you must place the exponent after the argument,
    [π/3]
    , and not directly after the Sin. So the keystrokes for entering
    2
    sin
    π
    3
    are: Sin[ π/3] ^ 2 . Try this below.
    ​
    ◼
  • Evaluate
    3
    cos
    π
    4
    . If you enter this correctly you should get
    1
    2
    2
    as an output.
  • ​
    ​
    Radians vs. Degrees​All trigonometric functions in Mathematica are based on radians. However there is an easy way to enter angles in degrees using the keyboard shortcut  deg  for the degree symbol ° . So to calculate cos(60°) enter Cos[60  deg ].
    ◼
  • Evaluate
    cos(60°)
    . If you enter this correctly you should get
    1
    2
    as an output.
  • ​
    Exercise 2.2 A
    Calculate
    cos
    π
    3
    +sin
    3π
    2
    ​
    Answer to Exercise 2.2A
    Cos[π/3]+Sin[3π/2]
    Exercise 2.2 B
    Calculate sin(15°)
    ​
    Answer to Exercise 2.2B
    Sin[15°]
    Exercise 2.2 C
    Calculate
    -1
    sin
    -
    1
    2
    ​
    Answer to Exercise 2.2C
    ArcSin[-1/2]
    Exercise 2.2 D
    Have Mathematica calculate
    4
    sin
    π
    3
    +
    4
    cos
    π
    3
    .
    Answer to Exercise 2.2D
    value = 4
    value = -3
    value = 3
    value = 0.693147
    value = 1
    value = 5
    Exercise 2.3 A
    Answer to Exercise 2.3 A
    Exercise 2.3 B
    Answer to Exercise 2.3 B
    Exercise 2.3 C
    Answer to Exercise 2.3 C