SlideShare a Scribd company logo
1 of 4
Download to read offline
Using Mathematica® for computational learning
For the past five years at St John’s Anglican College we have used Mathematica with our senior
mathematics students. We have gradually expanded its use from an initial trial with Year 11
Mathematics B and C classes to the point where it is now used, to varying degrees, across all year
levels (7 – 12). Mathematica is a symbolic mathematical computation program, or computer algebra
program, developed by Wolfram Research and is available at
https://www.wolfram.com/mathematica/.
The advantages of using Mathematica on a computer over a graphics calculator include, being able
to use a keyboard and mouse for efficient interaction and connecting to a data projector to display
work. Using a computer screen you can see what you’re doing quite clearly and have access to
superior graphics quality. There is also the facility to cut and paste graphics and code straight into
another application, such as a word processor.
Mathematica also has a superior library of instructions to that of a graphics calculator and the scope
to allow students to develop complex solutions to computational problems. Mathematica enables
the development of your own resources within its Notebook environment, so both content and the
computations occur in the same screen; i.e. the Notebooks are interactive and not just readable
documents. Mathematica allows formatting and styling of text and images within the Notebook and
can have executable code ready to go, or functions can be added as users progress.
Students at St John’s use Mathematica across the full range of complexity, from solving basic
computations any calculator could do right through to writing their own programs that are capable
of modelling and solving more complex real-life situations.
The following task demonstrates a simple modelling application that can be done using
Mathematica to determine a line of best fit for a set of data; taken from a larger assignment that
examines the relationship between logistic and exponential functions.
Developing a logistic model in Mathematica
The table below shows the height of a sunflower changing with time. In this task we will model this
data using a logistic model:
Source: http://seattlecentral.edu/qelp/sets/009/009.html
Week 1 2 3 4 5 6 7 8 9 10 11 12
Height (cm) 17.93 36.36 67.76 98.10 131.00 169.50 205.50 228.30 247.10 250.50 253.80 254.50
Using Mathematica students are first able to enter the data into a variable, called data:
The text that follows the “In[#]:=” is what is entered by the user and the “Out[#]:=” is followed by
the output that Mathematica produces in response.
The data can then be modelled by any function, as specified by the function FindFit. This example
below generates values for the parameters 𝑐𝑐, 𝑑𝑑 and 𝑟𝑟 with the independent variable being 𝑡𝑡. The
natural number ‘e’ can be represented in Mathematica as either a capital ‘E’ or the ‘e’ used below
which is available from the palettes menu.
These values can then be substituted into the function and plotted, but one handy feature of
Mathematica is that it provides some likely next steps. In this case we can select plot fit from the
context menu that appears below the output line, as circled above.
This produces the relevant code to show the line of best fit and the data on the same graph:
Larger data sets can be imported
directly into Mathematica from a
delimited text file or csv.
Variables in Mathematica are very
easy to work with as they don’t need
to be declared or defined previously.
We can also use a different function called NonlinearModelFit if we’re interested in doing some
further analysis. In this example the model is stored to a variable simply called model:
We can present the function as either the equation or the parameters determined:
We can examine the accuracy of our model to the original data:
We can use these results to then work out other values, such as the percentage errors:
This takes the “FitResiduals” values of model and divides each by the original value from data, then
multiplies by 100. The instruction - data[[All, 2]] - tells Mathematica to get all the values from the
second column of data.
In this demonstration I’ve focused primarily on the calculation side of Mathematica, but as
mentioned in the beginning it also has graphical and presentation features that can be utilised to
produce a more visually pleasing product. The following code presents the data generated earlier in
a table format:
These are three examples of over
forty properties that can be
examined directly.
Over the past five years we have gradually increased the use of Mathematica within the College and
continue to see it as a fundamental element of our STEM program. As computational thinking and
coding become more and more significant aspects of the curriculum we believe that being proficient
users of Mathematica effectively positions our students for the challenges they will face in the
future.
Mathematica is a registered trademark of Wolfram Research, Inc.

More Related Content

What's hot

Evaluation of postfix expression using stack
Evaluation of postfix expression using stackEvaluation of postfix expression using stack
Evaluation of postfix expression using stackshubhajitCHATTERJEE2
 
Use of matrix in daily life
Use of matrix in daily lifeUse of matrix in daily life
Use of matrix in daily lifesadia Afrose
 
Parametric Equations with Mathcad Prime
Parametric Equations with Mathcad PrimeParametric Equations with Mathcad Prime
Parametric Equations with Mathcad PrimeCaroline de Villèle
 
Matematika terapan week 6
Matematika terapan week 6 Matematika terapan week 6
Matematika terapan week 6 nellylawar
 
Applications of Matrices in Engineering
Applications of Matrices in EngineeringApplications of Matrices in Engineering
Applications of Matrices in EngineeringAliHasan358
 
Application of matrices in Daily life
Application of matrices in Daily lifeApplication of matrices in Daily life
Application of matrices in Daily lifeshubham mishra
 
House price prediction
House price predictionHouse price prediction
House price predictionKaranseth30
 
Application of matrices in real life and matrix
Application of matrices in real life and matrixApplication of matrices in real life and matrix
Application of matrices in real life and matrixDarshDobariya
 
Applications of matrices in Real\Daily life
Applications of matrices in Real\Daily lifeApplications of matrices in Real\Daily life
Applications of matrices in Real\Daily lifeSami Ullah
 
Program to be written for C Output: program to compute e. The calculation of...
Program to be written for C  Output: program to compute e. The calculation of...Program to be written for C  Output: program to compute e. The calculation of...
Program to be written for C Output: program to compute e. The calculation of...hwbloom8
 
Anything but simple Mathematica
Anything but simple MathematicaAnything but simple Mathematica
Anything but simple MathematicaSergeiPronkevich
 
Me 443 3 basic calculations Erdi Karaçal Mechanical Engineer University of ...
Me 443   3 basic calculations Erdi Karaçal Mechanical Engineer University of ...Me 443   3 basic calculations Erdi Karaçal Mechanical Engineer University of ...
Me 443 3 basic calculations Erdi Karaçal Mechanical Engineer University of ...Erdi Karaçal
 
Application of Matrices in real life
Application of Matrices in real lifeApplication of Matrices in real life
Application of Matrices in real lifeShayshab Azad
 

What's hot (18)

Evaluation of postfix expression using stack
Evaluation of postfix expression using stackEvaluation of postfix expression using stack
Evaluation of postfix expression using stack
 
Use of matrix in daily life
Use of matrix in daily lifeUse of matrix in daily life
Use of matrix in daily life
 
Parametric Equations with Mathcad Prime
Parametric Equations with Mathcad PrimeParametric Equations with Mathcad Prime
Parametric Equations with Mathcad Prime
 
Matlab overview
Matlab overviewMatlab overview
Matlab overview
 
Matematika terapan week 6
Matematika terapan week 6 Matematika terapan week 6
Matematika terapan week 6
 
Array sheet
Array sheet Array sheet
Array sheet
 
Applications of Matrices in Engineering
Applications of Matrices in EngineeringApplications of Matrices in Engineering
Applications of Matrices in Engineering
 
Application of matrices in Daily life
Application of matrices in Daily lifeApplication of matrices in Daily life
Application of matrices in Daily life
 
Programming with Mathcad Prime
Programming with Mathcad PrimeProgramming with Mathcad Prime
Programming with Mathcad Prime
 
House price prediction
House price predictionHouse price prediction
House price prediction
 
Application of matrices in real life and matrix
Application of matrices in real life and matrixApplication of matrices in real life and matrix
Application of matrices in real life and matrix
 
Applications of matrices in Real\Daily life
Applications of matrices in Real\Daily lifeApplications of matrices in Real\Daily life
Applications of matrices in Real\Daily life
 
Applications of numerical methods
Applications of numerical methodsApplications of numerical methods
Applications of numerical methods
 
Algoritmos
AlgoritmosAlgoritmos
Algoritmos
 
Program to be written for C Output: program to compute e. The calculation of...
Program to be written for C  Output: program to compute e. The calculation of...Program to be written for C  Output: program to compute e. The calculation of...
Program to be written for C Output: program to compute e. The calculation of...
 
Anything but simple Mathematica
Anything but simple MathematicaAnything but simple Mathematica
Anything but simple Mathematica
 
Me 443 3 basic calculations Erdi Karaçal Mechanical Engineer University of ...
Me 443   3 basic calculations Erdi Karaçal Mechanical Engineer University of ...Me 443   3 basic calculations Erdi Karaçal Mechanical Engineer University of ...
Me 443 3 basic calculations Erdi Karaçal Mechanical Engineer University of ...
 
Application of Matrices in real life
Application of Matrices in real lifeApplication of Matrices in real life
Application of Matrices in real life
 

Similar to Using Mathematica for computational learning

Technology in maths and maths in technology
Technology  in maths and maths in technologyTechnology  in maths and maths in technology
Technology in maths and maths in technologyshajunisha
 
Final report mobile shop
Final report   mobile shopFinal report   mobile shop
Final report mobile shopViditsingh22
 
A definitive guide on math works matlab to the students
A definitive guide on math works matlab to the studentsA definitive guide on math works matlab to the students
A definitive guide on math works matlab to the studentsmatlabassignmenthelp1
 
Mml micro project Building a Basic statistic calculator using r programming ...
Mml micro project Building a Basic statistic calculator  using r programming ...Mml micro project Building a Basic statistic calculator  using r programming ...
Mml micro project Building a Basic statistic calculator using r programming ...SakshamDandnaik
 
THE IMPLICATION OF STATISTICAL ANALYSIS AND FEATURE ENGINEERING FOR MODEL BUI...
THE IMPLICATION OF STATISTICAL ANALYSIS AND FEATURE ENGINEERING FOR MODEL BUI...THE IMPLICATION OF STATISTICAL ANALYSIS AND FEATURE ENGINEERING FOR MODEL BUI...
THE IMPLICATION OF STATISTICAL ANALYSIS AND FEATURE ENGINEERING FOR MODEL BUI...IJCSES Journal
 
THE IMPLICATION OF STATISTICAL ANALYSIS AND FEATURE ENGINEERING FOR MODEL BUI...
THE IMPLICATION OF STATISTICAL ANALYSIS AND FEATURE ENGINEERING FOR MODEL BUI...THE IMPLICATION OF STATISTICAL ANALYSIS AND FEATURE ENGINEERING FOR MODEL BUI...
THE IMPLICATION OF STATISTICAL ANALYSIS AND FEATURE ENGINEERING FOR MODEL BUI...ijcseit
 
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010vchircu
 
Me 443 1 what is mathematica Erdi Karaçal Mechanical Engineer University of...
Me 443   1 what is mathematica Erdi Karaçal Mechanical Engineer University of...Me 443   1 what is mathematica Erdi Karaçal Mechanical Engineer University of...
Me 443 1 what is mathematica Erdi Karaçal Mechanical Engineer University of...Erdi Karaçal
 
House Price Estimation as a Function Fitting Problem with using ANN Approach
House Price Estimation as a Function Fitting Problem with using ANN ApproachHouse Price Estimation as a Function Fitting Problem with using ANN Approach
House Price Estimation as a Function Fitting Problem with using ANN ApproachYusuf Uzun
 
A case study in using ibm watson studio machine learning services ibm devel...
A case study in using ibm watson studio machine learning services   ibm devel...A case study in using ibm watson studio machine learning services   ibm devel...
A case study in using ibm watson studio machine learning services ibm devel...Einar Karlsen
 
interpolation-and-its-application-180107160107.pptx
interpolation-and-its-application-180107160107.pptxinterpolation-and-its-application-180107160107.pptx
interpolation-and-its-application-180107160107.pptxSomitSamanto1
 
Interpolation and-its-application
Interpolation and-its-applicationInterpolation and-its-application
Interpolation and-its-applicationApurbo Datta
 
Exploratory data analysis v1.0
Exploratory data analysis v1.0Exploratory data analysis v1.0
Exploratory data analysis v1.0Vishy Chandra
 
AIRLINE FARE PRICE PREDICTION
AIRLINE FARE PRICE PREDICTIONAIRLINE FARE PRICE PREDICTION
AIRLINE FARE PRICE PREDICTIONIRJET Journal
 
Scientific calculator project in c language
Scientific calculator project in c languageScientific calculator project in c language
Scientific calculator project in c languageAMIT KUMAR
 

Similar to Using Mathematica for computational learning (20)

Technology in maths and maths in technology
Technology  in maths and maths in technologyTechnology  in maths and maths in technology
Technology in maths and maths in technology
 
Final report mobile shop
Final report   mobile shopFinal report   mobile shop
Final report mobile shop
 
A definitive guide on math works matlab to the students
A definitive guide on math works matlab to the studentsA definitive guide on math works matlab to the students
A definitive guide on math works matlab to the students
 
Mml micro project Building a Basic statistic calculator using r programming ...
Mml micro project Building a Basic statistic calculator  using r programming ...Mml micro project Building a Basic statistic calculator  using r programming ...
Mml micro project Building a Basic statistic calculator using r programming ...
 
Data Science Machine
Data Science Machine Data Science Machine
Data Science Machine
 
THE IMPLICATION OF STATISTICAL ANALYSIS AND FEATURE ENGINEERING FOR MODEL BUI...
THE IMPLICATION OF STATISTICAL ANALYSIS AND FEATURE ENGINEERING FOR MODEL BUI...THE IMPLICATION OF STATISTICAL ANALYSIS AND FEATURE ENGINEERING FOR MODEL BUI...
THE IMPLICATION OF STATISTICAL ANALYSIS AND FEATURE ENGINEERING FOR MODEL BUI...
 
THE IMPLICATION OF STATISTICAL ANALYSIS AND FEATURE ENGINEERING FOR MODEL BUI...
THE IMPLICATION OF STATISTICAL ANALYSIS AND FEATURE ENGINEERING FOR MODEL BUI...THE IMPLICATION OF STATISTICAL ANALYSIS AND FEATURE ENGINEERING FOR MODEL BUI...
THE IMPLICATION OF STATISTICAL ANALYSIS AND FEATURE ENGINEERING FOR MODEL BUI...
 
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
 
Me 443 1 what is mathematica Erdi Karaçal Mechanical Engineer University of...
Me 443   1 what is mathematica Erdi Karaçal Mechanical Engineer University of...Me 443   1 what is mathematica Erdi Karaçal Mechanical Engineer University of...
Me 443 1 what is mathematica Erdi Karaçal Mechanical Engineer University of...
 
Lab03
Lab03Lab03
Lab03
 
House Price Estimation as a Function Fitting Problem with using ANN Approach
House Price Estimation as a Function Fitting Problem with using ANN ApproachHouse Price Estimation as a Function Fitting Problem with using ANN Approach
House Price Estimation as a Function Fitting Problem with using ANN Approach
 
A case study in using ibm watson studio machine learning services ibm devel...
A case study in using ibm watson studio machine learning services   ibm devel...A case study in using ibm watson studio machine learning services   ibm devel...
A case study in using ibm watson studio machine learning services ibm devel...
 
Mathcad
MathcadMathcad
Mathcad
 
50 MS Excel Tips and Tricks
50 MS Excel Tips and Tricks 50 MS Excel Tips and Tricks
50 MS Excel Tips and Tricks
 
interpolation-and-its-application-180107160107.pptx
interpolation-and-its-application-180107160107.pptxinterpolation-and-its-application-180107160107.pptx
interpolation-and-its-application-180107160107.pptx
 
Interpolation and-its-application
Interpolation and-its-applicationInterpolation and-its-application
Interpolation and-its-application
 
Exploratory data analysis v1.0
Exploratory data analysis v1.0Exploratory data analysis v1.0
Exploratory data analysis v1.0
 
AIRLINE FARE PRICE PREDICTION
AIRLINE FARE PRICE PREDICTIONAIRLINE FARE PRICE PREDICTION
AIRLINE FARE PRICE PREDICTION
 
Clementine tool
Clementine toolClementine tool
Clementine tool
 
Scientific calculator project in c language
Scientific calculator project in c languageScientific calculator project in c language
Scientific calculator project in c language
 

Using Mathematica for computational learning

  • 1. Using Mathematica® for computational learning For the past five years at St John’s Anglican College we have used Mathematica with our senior mathematics students. We have gradually expanded its use from an initial trial with Year 11 Mathematics B and C classes to the point where it is now used, to varying degrees, across all year levels (7 – 12). Mathematica is a symbolic mathematical computation program, or computer algebra program, developed by Wolfram Research and is available at https://www.wolfram.com/mathematica/. The advantages of using Mathematica on a computer over a graphics calculator include, being able to use a keyboard and mouse for efficient interaction and connecting to a data projector to display work. Using a computer screen you can see what you’re doing quite clearly and have access to superior graphics quality. There is also the facility to cut and paste graphics and code straight into another application, such as a word processor. Mathematica also has a superior library of instructions to that of a graphics calculator and the scope to allow students to develop complex solutions to computational problems. Mathematica enables the development of your own resources within its Notebook environment, so both content and the computations occur in the same screen; i.e. the Notebooks are interactive and not just readable documents. Mathematica allows formatting and styling of text and images within the Notebook and can have executable code ready to go, or functions can be added as users progress. Students at St John’s use Mathematica across the full range of complexity, from solving basic computations any calculator could do right through to writing their own programs that are capable of modelling and solving more complex real-life situations. The following task demonstrates a simple modelling application that can be done using Mathematica to determine a line of best fit for a set of data; taken from a larger assignment that examines the relationship between logistic and exponential functions. Developing a logistic model in Mathematica The table below shows the height of a sunflower changing with time. In this task we will model this data using a logistic model: Source: http://seattlecentral.edu/qelp/sets/009/009.html Week 1 2 3 4 5 6 7 8 9 10 11 12 Height (cm) 17.93 36.36 67.76 98.10 131.00 169.50 205.50 228.30 247.10 250.50 253.80 254.50
  • 2. Using Mathematica students are first able to enter the data into a variable, called data: The text that follows the “In[#]:=” is what is entered by the user and the “Out[#]:=” is followed by the output that Mathematica produces in response. The data can then be modelled by any function, as specified by the function FindFit. This example below generates values for the parameters 𝑐𝑐, 𝑑𝑑 and 𝑟𝑟 with the independent variable being 𝑡𝑡. The natural number ‘e’ can be represented in Mathematica as either a capital ‘E’ or the ‘e’ used below which is available from the palettes menu. These values can then be substituted into the function and plotted, but one handy feature of Mathematica is that it provides some likely next steps. In this case we can select plot fit from the context menu that appears below the output line, as circled above. This produces the relevant code to show the line of best fit and the data on the same graph: Larger data sets can be imported directly into Mathematica from a delimited text file or csv. Variables in Mathematica are very easy to work with as they don’t need to be declared or defined previously.
  • 3. We can also use a different function called NonlinearModelFit if we’re interested in doing some further analysis. In this example the model is stored to a variable simply called model: We can present the function as either the equation or the parameters determined: We can examine the accuracy of our model to the original data: We can use these results to then work out other values, such as the percentage errors: This takes the “FitResiduals” values of model and divides each by the original value from data, then multiplies by 100. The instruction - data[[All, 2]] - tells Mathematica to get all the values from the second column of data. In this demonstration I’ve focused primarily on the calculation side of Mathematica, but as mentioned in the beginning it also has graphical and presentation features that can be utilised to produce a more visually pleasing product. The following code presents the data generated earlier in a table format: These are three examples of over forty properties that can be examined directly.
  • 4. Over the past five years we have gradually increased the use of Mathematica within the College and continue to see it as a fundamental element of our STEM program. As computational thinking and coding become more and more significant aspects of the curriculum we believe that being proficient users of Mathematica effectively positions our students for the challenges they will face in the future. Mathematica is a registered trademark of Wolfram Research, Inc.