# Computational Thinking : Introduction To Mathematica

Hello fellow Steemians, and budding scientists!!

Have you ever thought how simple the world would be if a program could plot complex curves in a jiffy!! ...and solve all your math problems in seconds?

It will definitely help us in understanding things better if not copying ready-made answers!

Well, welcome to the world of Wolfram Mathematica!!

**Mathematica Logo**

[**Source** : https://www.wolframalpha.com/media/, **License** : Public Domain]

**Mathematica 8.0.0 Linux frontend**

###### [Source : [WikiMedia Commons](), Author : By HolyCookie - Own work, CC0, https://commons.wikimedia.org/w/index.php?curid=15202544]

### The thing that got me started on the science that I've been building now for about 20 years or so was the question of okay, if mathematical equations can't make progress in understanding complex phenomena in the natural world, how might we make progress?

*---Stephen Wolfram---*

### INTRODUCTION

In the words of Wikipedia : *Wolfram Mathematica is a program which is basically a modern technical computing system spanning most areas of technical computing — including neural networks, machine learning, image processing, geometry, data science, visualizations,
and others. The system is used in many technical, scientific,
engineering, mathematical, and computing fields. It was conceived by Stephen Wolfram and is developed by Wolfram Research of Champaign, Illinois. The Wolfram Language is the programming language used in Mathematica.*

**History :**Wolfram Mathematica built on the ideas in Cole and Wolfram's earlier Symbolic Manipulation Program (SMP).^{ }The name of the program "Mathematica" was suggested to Stephen Wolfram by Apple co-founder Steve Jobs although Wolfram had thought about it earlier and rejected it.**Uses (https://www.wolfram.com/language/) :**

The Wolfram Language allows programmers to operate at a significantly higher level than ever before, by leveraging built-in computational intelligence that relies on a vast depth of algorithms and real-world knowledge carefully integrated over three decades. Scaleable for programs from tiny to huge, with immediate deployment locally and in the cloud, the Wolfram Language builds on clear principles—and an elegant unified symbolic structure—to create what is emerging as the world's most productive programming language and the first true computational communication language for humans and AIs.

**Step-1) Accessing the Software**

The software is available as a desktop stand-alone, but can be quite costly.

Here are some of the things you can try :

- Buy the original complete version of the software :
- Try a 15-day free trial b registering here : https://www.wolfram.com/mathematica/trial/
- Create an account and use the free web version which has all the critical features. Here : https://www.wolfram.com/programming-lab/
- Start directly online (work will not be saved) : https://lab.open.wolframcloud.com/app/

**Step-2) Getting Started**

- Run Wolfram Mathematica, open a new notebook by using the shortcut keys
*Ctrl + N*. - In the front-end kernel that appears enter "2+2" (without the quotes) and press
*Shift + Enter*to run the cell (contains the input : 2+2) you just created. - Trying simple calculations like `2+2, 2*2, 3*(4+3)/2` : ![]()
- Using built-in functions `Sin[x], Cos[x],...` ![]()
- The
**Plot[] function**Plotting curves :`Sin[x], x^2` ![]()**, the syntax is :**

`Plot[{curve-1,curve-2,..},{var-1,min_var-1,max_var-1},{var-2,min_var-2,max_var-2},...]`

- Basic Plotting : Let's plot Sin[x] from the range [-2Pi,2Pi]once again ![]()
- Using the Frame attribute ![]()
- Using Gridlines ![]() Adding custom gridlines on x-axis at x=1,3,3.5,7 ![]() Adding custom gridlines on x-axis at y=0.2,0.5,0.7 ![]() Adding gridlines on both x and y-axis at equal intervals of 0.5 ![]()
- Plotting multiple curves on a single plot : Let's plot Sin[x] and x*Sin[2*x] ![]() Formatting the graph... ![]()
- NOTE : It's very important to tinker with the code on your own, you learn the most by trying the things hands-on!! So, go on!
- Syntax : (the syntax for this function is quite similar to the `Plot` function) `Plot3D[{curve-1,curve-2,...},{var-1,min_var-1,max_var-1},{var-2,min_var-2,max_var-2}]`
- Let's plot `Sin[x]*Cos[x]` in the range x=[-Pi,Pi], y=[-Pi,Pi] ![]() Now let's increase our range to x=[-4Pi,4Pi], y=[-4Pi,4Pi] and see what happens! ![]()
- Now, let us plot Sin[xy] in the range x=[-Pi,Pi], y=[-Pi,Pi]... ![]()
- Now let's combine the two 3D curves we plotted into a single plot... ![]()
- Let's say you are writing a scientific article and need a neat accurate plot/diagram for the article, simply plot the graph on Mathematica, export it and use it!

![b.gif]() - Let's say, you are running short of egg-crates for your home, what to do?

###### [

**Source**: [Pixabay](https://pixabay.com/photos/eggs-market-crate-chicken-protein-3564193/),**Author**: Image by Kojooooooo on Pixabay,**License**: [Pixabay License](https://pixabay.com/service/license/)]

Model the egg-crate using Mathematica, and print it using your 3-D printer...!!

![]()

There you go!!!### Isn't that interesting!!?

### Step-3) Plot Function

### Step-4) Making 3-D plots!! : Plot3D Function

### Isn't that a very beautiful curve!!

### Now, one may ask what's the use of learning all this!!

Let us list two uses....That's all for the Introduction, more to come...in the next posts we will learn to do more with Mathematica, and the complexity of the codes will also increase significantly... <br>Don't worry.

Keep practicing and tinkering!

### Extra Help

For any extra help with the code, you can check this site :

https://www.wolfram.com/language/

**References**

- Wolfram Mathematica : https://en.wikipedia.org/wiki/Wolfram_Mathematica
- Wolfram Mathematica Language : https://www.wolfram.com/language/

### Copyright Declarations

**All the photographs, diagrams and images which have not been attributed have been generated by @medro-martin. The copyright belongs to @medro-martin.**

Thanks for your time.

Keep Learning

M.Medro

lemouth (72)4 years agoAaaah mathematica... I use it a lot. Every single working day. It is a shame it is so expensive, but it is so useful and so powerful!

medro-martin (57)4 years agoYes...that's true.

: )

lemouth (72)4 years agoCheck this if you want to see what I did with mathematica ;)

medro-martin (57)4 years agoThat's very complicated @lemouth!

And what do we say when something doesn't get into our head?? --> "Great Job!"

So, Great Job @lemouth - The Particle Physicist!!

Thanks for sharing...

Best

M.Medro

lemouth (72)4 years agoAhaha! Then I can say a generic "Thanks for your nice message" as well ^^

medro-martin (57)4 years ago (edited)Ha-ha!!

You are welcome...

steemitboard (66)4 years agoCongratulations @medro-martin! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

_{Click here to view your Board}_{If you no longer want to receive notifications, reply to this comment with the word STOP}To support your work, I also upvoted your post!

Do not miss the last post from @steemitboard:steemstem (73)4 years agoThis post has been voted on by the

SteemSTEMcuration team and voting trail in collaboration with@curie.If you appreciate the work we are doing then consider voting both projects for witness by selecting

stem.witnessandcurie!For additional information please join us on the

SteemSTEM discordand to get to know the rest of the community!