Currently Empty: 0,00 EGP
Computer Science
1 Introduction to Wolfram Mathematica
1-1 Basic Arithmetic
This lesson introduces the fundamental arithmetic operations in Wolfram Language, focusing on addition, subtraction, multiplication, division, and exponentiation. You’ll learn to perform these calculations using both operators (e.g., +, –, *) and corresponding functions like Plus, Subtract, Times, Divide, and Power. Through practical examples, you’ll explore the seamless combination of functions and operators, invalid argument handling, and special cases like division by zero. By the end of this lesson, you’ll have a solid understanding of how to use Wolfram Language for basic arithmetic operations with precision and flexibility.
Subtraction
Perform subtraction using the – operator or the Subtract function:
In[3]:=
4 - 100 - 1
Out[3]= -97
In[4]:=
Subtract[17,11]
Out[4]= 6
Demonstrate invalid usage of the Subtract function with more than two arguments:
In[5]:= Subtract[2,1,1]
Subtract: Subtract called with 3 arguments; 2 arguments are expected.
Out[5]= Subtract[2,1,1]
Division
Perform division using the / operator or the Divide function:
In[9]:=
100/2
Out[9]= 50
In[10]:=
Divide[45,5]
Out[10]= 9
You can also perform division by typing a fraction in display math mode using Ctrl + /:
In[11]:= \(\frac{60}{3}\)
Out[11]= 20
Type “Esc” followed by “div” and “Esc” again to enter the division notation ÷:
In[12]:=
77÷11
Out[12]= 7
Demonstrate invalid usage of the Divide function with more than two arguments:
In[13]:= Divide[1000,100,20]
Divide: Divide called with 3 arguments; 2 arguments are expected.
Out[13]= Divide[1000,100,20]
When dividing by zero in Mathematica, the result is a symbolic representation of infinity:
In[14]:=
11/0
Power: Infinite expression \(\dfrac{1}{0}\) encountered.
Out[14]= ComplexInfinity
1-2 Tests, Comparisons, and Checks
This lesson delves into evaluating and analyzing numerical values and expressions in Wolfram Language. You’ll learn to identify the types of numbers (e.g., Integer, Rational, Real, and Complex) using the Head function, check numerical properties (such as evenness, primality, or integrality), and perform equality and inequality tests. Additionally, you’ll explore the nuances of numerical and exact equality, the role of Head in distinguishing data types, and the precedence of operations. Practical examples demonstrate both operator-based and functional approaches, offering insights into how comparisons and checks can streamline decision-making in computational workflows.
Representations of Numbers
1-3 Numerical Values and Constants
This lesson introduces the fundamental arithmetic operations in Wolfram Language, focusing on addition, subtraction, multiplication, division, and exponentiation. You’ll learn to perform these calculations using both operators (e.g., +, –, *) and corresponding functions like Plus, Subtract, Times, Divide, and Power. Through practical examples, you’ll explore the seamless combination of functions and operators, invalid argument handling, and special cases like division by zero. By the end of this lesson, you’ll have a solid understanding of how to use Wolfram Language for basic arithmetic operations with precision and flexibility.
1-4 Built-In Functions
This lesson introduces the fundamental arithmetic operations in Wolfram Language, focusing on addition, subtraction, multiplication, division, and exponentiation. You’ll learn to perform these calculations using both operators (e.g., +, –, *) and corresponding functions like Plus, Subtract, Times, Divide, and Power. Through practical examples, you’ll explore the seamless combination of functions and operators, invalid argument handling, and special cases like division by zero. By the end of this lesson, you’ll have a solid understanding of how to use Wolfram Language for basic arithmetic operations with precision and flexibility.
References
[1] Documentation Center: Wolfram Language & System.
[2] Book: An Elementary Introduction to the Wolfram Language.
[3] Interactive Course: An Elementary Introduction to the Wolfram Language.
[4] Instructor Led Course: Quick Start to Wolfram Tech.
[5] Instructor Led Course Sequence: Wolfram Language Programming Proficiency.
[6] Special Event Course: Hands-on Start to Wolfram Mathematica Training Tutorials.