# SciPy / Havana

In case I get to go to [SciPy / Havana](http://conf.scipyla.org/), I'm boning up on SymPy, an important component within the SciPy Ecosystem.

Here's the kind of thing one might do with SymPy, a computer algebra system:


```python
import sympy as sym
```


```python
x = sym.symbols('x')
sym.init_printing()
```


```python
sym.Integral(sym.sin(x), (x, 0, sym.pi))
```


```python
sym.Integral(sym.sin(x), (x, 0, sym.pi)).doit()
```

In addition, we have numpy, with its multi-dimensional array object.  Numpy comes with a host of numeric recipes, already built in...


```python
import numpy as np
```

[What are the ethics](http://ucsmp.uchicago.edu/resources/conferences/2012-03-01/) of using CAS in a poorly developing country, such as the United States, known for high infant mortality and poverty rates?  

Not everyone can easily afford a TI N-spire, and schools tend to not provide adequate computer infrastructure, even for accessing free and open source tools.

Fortunately, even without a TI, we have CAS in the form of the SciPy ecosystem.  Adapting a solution from a CAS blog post, [Quadratics and CAS](https://casmusings.wordpress.com/2017/06/30/quadratics-and-cas/), I was able to derive the same solution for the coefficients a, b and c. 


```python
np.polyfit(x=[10,5,-2],y=[210, 40, -30], deg=2)
```




    array([  2.,   4., -30.])



But don't we want algebra students to be able to derive the solution manually?  Yes, we do. However, once this step becomes a means to an end, rather than an end in itself, a CAS will save time and facilitate deeper explorations.

For further reading:
* [Learning Math with Python: Youtube Lectures by Juan Klopper](https://youtu.be/P8DIM41B-mM?list=PLsu0TcgLDUiIqN76ZuRkhDUCd-c_EjIkN)
* [Tutorial de SymPy: introducción y comandos básicos ... ](https://youtu.be/OGQRcYVys1Q)

958a48933b124b0a9a645b2b91d6fb469228b161
ipynb
Jupyter Notebook
Using SymPy.ipynb
4dsolutions/Python5
8d80753e823441a571b827d24d21577446409b52
MIT
2016-08-17T00:15:26.000Z
2020-07-17T21:31:10.000Z
Using SymPy.ipynb
4dsolutions/Python5
8d80753e823441a571b827d24d21577446409b52
MIT
Using SymPy.ipynb
4dsolutions/Python5
8d80753e823441a571b827d24d21577446409b52
MIT
2017-02-22T05:15:52.000Z
2019-11-08T06:17:34.000Z
Qwen/Qwen-72B
1. YES
2. YES