```python
# Symbolic computation is the task of computation of mathematical objects symbolically, 
# meaning that the objects are represented exactly, not approximately.

import math
math.sqrt(100)
```




    10.0




```python
import sympy
sympy.sqrt(100)
```




    10




```python
math.sqrt(3)
```




    1.7320508075688772




```python
sympy.sqrt(3)
```




    sqrt(3)




```python
math.sqrt(8)
```




    2.8284271247461903




```python
sympy.sqrt(8)
```




    2*sqrt(2)




```python
type(math.sqrt(8))
```




    float




```python
type(sympy.sqrt(8))
```




    sympy.core.mul.Mul




```python
# sqrt(3) is an irrational number
# 1.7320508075688772 an only approximation for sqrt(3).
# sqrt(3) will be slightly different if we change the data type, for example, double or long double.
#
# This is how symbolic computation is different from the "normal/standard" 
# numerical computation most of us are familiar with
# 
# Symbolic computation is also known as computer algebra
```


```python
# Advantages
# * work with equations in their natural mathematical form
# * working with mathematical objects and equations at the fundamental level, without approximations
# * compute derivatives/integrals of an expression
# * useful in prototyping of new (mathematical) models and gain insights
# Disadvantages
# * symbolic computations are significantly slow when compared to numerical computations
# * limited to simple problems, for example, solutions of PDEs.
```


```python
# Why SymPy?
# Why might you want to learn SymPy?

# There are many software for symbolic computations, with Mathematica and Maple being the players.
# Matlab/Octave also supports symbolic computations.
# Others: SageMath, Cadabra

# * Mathematica, Maple and Matlab are not open source
# * Mathematica's syntax and formatting is ugly (my personal opinion)
# * Matlab and Sage are heavy (requires a lot of disk space)
#
# * SymPy is open source; easy to modify and extend/customise
# * SymPy is lightweight.
# * SymPy uses Python; enhance your Python skills (for avid users)
# * Useful for interactive online teaching of courses on basic maths using Jupyter notebooks

```

09cd42c78f607c5bd4e6db94aff0aaf669be4dfe
ipynb
Jupyter Notebook
1-Intro.ipynb
chennachaos/SA2CTechChatSymPy
9f1dbb48655ff5f8bdd6b4ced48b58aed0ba5bf4
MIT
1-Intro.ipynb
chennachaos/SA2CTechChatSymPy
9f1dbb48655ff5f8bdd6b4ced48b58aed0ba5bf4
MIT
1-Intro.ipynb
chennachaos/SA2CTechChatSymPy
9f1dbb48655ff5f8bdd6b4ced48b58aed0ba5bf4
MIT
Qwen/Qwen-72B
1. YES
2. YES