```python
from sympy import *
from sympy import init_printing; init_printing(use_latex="mathjax")
import numpy as np
import matplotlib.pyplot as plt
# comando para que las gráficas salgan en la misma ventana
%matplotlib inline
```


```python
x,y,z = symbols("x y z")
```


```python
exp(x)/factorial(y)**z**2
```




$$e^{x} y!^{- z^{2}}$$




```python
symbols("a:d, I:K")
```




$$\left ( a, \quad b, \quad c, \quad d, \quad I, \quad J, \quad K\right )$$




```python
symbols("X:6")
```




$$\left ( X_{0}, \quad X_{1}, \quad X_{2}, \quad X_{3}, \quad X_{4}, \quad X_{5}\right )$$




```python
x+2*y+x-3*y
```




$$2 x - y$$




```python
z**6+5*y-x-x**2*y+z
```




$$- x^{2} y - x + 5 y + z^{6} + z$$




```python
sin(2)
```




$$\sin{\left (2 \right )}$$




```python
sin(2).evalf()
```




$$0.909297426825682$$



### Expresiones a ecuaciones


```python
ex="x**2+3"
type(ex)
```




    str




```python
sim_ex = simplify(ex)
sim_ex
```




$$x^{2} + 3$$




```python
sim_ex.subs(x,7)
```




$$52$$




```python
str_fun = lambdify([x],sim_ex,"numpy")
x_vec = np.linspace(0,10,100)
plt.plot(x_vec,str_fun(x_vec));
```


```python
import pandas as pd
d = {"x":x_vec, "y":str_fun(x_vec)}
df = pd.DataFrame(data=d)
df[:5]
```




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>x</th>
      <th>y</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>0.00000</td>
      <td>3.000000</td>
    </tr>
    <tr>
      <th>1</th>
      <td>0.10101</td>
      <td>3.010203</td>
    </tr>
    <tr>
      <th>2</th>
      <td>0.20202</td>
      <td>3.040812</td>
    </tr>
    <tr>
      <th>3</th>
      <td>0.30303</td>
      <td>3.091827</td>
    </tr>
    <tr>
      <th>4</th>
      <td>0.40404</td>
      <td>3.163249</td>
    </tr>
  </tbody>
</table>
</div>



## Limites


```python
limit(exp(-y),y,oo)
```




$$0$$




```python
Limit(exp(-y),y,oo)
```




$$\lim_{y \to \infty} e^{- y}$$




```python
express = Limit((cos(y)-1)/y,y,0)
express
```




$$\lim_{y \to 0^+}\left(\frac{1}{y} \left(\cos{\left (y \right )} - 1\right)\right)$$




```python
express.doit()
```




$$0$$




```python
n=Symbol("n")
suma1 = Sum(1/n**2,(n,1,oo))
suma1
```




$$\sum_{n=1}^{\infty} \frac{1}{n^{2}}$$




```python
suma1.doit()
```




$$\frac{\pi^{2}}{6}$$




```python
Product(n,(n,4,10))
```




$$\prod_{n=4}^{10} n$$



# Integrales


```python
I=Integral(exp(-y**2-z**2),(y,-oo,-oo),(z,-oo,oo))
I
```




$$\int_{-\infty}^{\infty}\int_{-\infty}^{-\infty} e^{- y^{2} - z^{2}}\, dy\, dz$$




```python
I.doit()
```




$$0$$




```python

```

1d37d3ca6aa2cd9b43628e9180f29ba8d88f347e
ipynb
Jupyter Notebook
Modulo1/SympyClase4_Douglas.ipynb
douglasparism/SimulacionM2018
85953efb86c7ebf2f398474608dfda18cb4cf5b8
MIT
Modulo1/SympyClase4_Douglas.ipynb
douglasparism/SimulacionM2018
85953efb86c7ebf2f398474608dfda18cb4cf5b8
MIT
Modulo1/SympyClase4_Douglas.ipynb
douglasparism/SimulacionM2018
85953efb86c7ebf2f398474608dfda18cb4cf5b8
MIT
Qwen/Qwen-72B
1. YES
2. YES