# Papoulis

    TODO


```python
import sympy
import sympy.functions.elementary.exponential as symExp
from sympy.plotting import plot
import numpy as np
import matplotlib.pyplot as plt
from visuals import *
```


```python
c, t, U = sympy.symbols('c, t, U')
```


```python
f = c*symExp.exp(-c*t)
f
```




    c*exp(-c*t)




```python
int_f = sympy.integrate(f, (t, 0, t))
int_f
sympy.oo
```




    oo




```python
q = sympy.integrate(f, t)
q
```




    -exp(-c*t)



sympy.limit(q, t, sympy.oo)

$\infty$


```python
temp = int_f.subs({c:1, U:1})
temp
```




    1 - exp(-t)




```python
p = plot(temp, (t, -2, 5), show=False)
p.show()
```


```python
from sympy.utilities.lambdify import lambdify
func = lambdify(t, temp, 'numpy') # returns a numpy-ready function1
```


```python

interval = np.linspace(-1, 5, num=1000)
values = func(interval)
```

def pdfInfo(interval, values, rng, xlim=None):
    fig, ax = plt.subplots()
    ax.plot(interval, values, 'k')
    
    if not np.isscalar(rng) and len(rng)==1:
        rng = rng[0]
    
    if not np.isscalar(rng):
        x_1 = np.argmax(interval>rng[0])
        x_2 = np.argmax(interval>rng[1])
        ax.fill_between(np.linspace(rng[0], rng[1], num=len(values[x_1:x_2])), values[x_1:x_2], color='k')
    else:
        x = np.argmax(interval>rng)
        x_0 = interval[0]
        ax.fill_between(np.linspace(x_0, rng, num=len(values[0:x])), values[0:x], color='k')
        
    ax.axhline(0, c='k', alpha=.5)
    ax.axvline(0, c='k', alpha=.5)
         
    ax.yaxis.grid(b=True, which='minor', color='k', linestyle='--', alpha=.2, zorder=0) 
    ax.yaxis.grid(b=True, which='major', color='k', linestyle='--', alpha=.5, zorder=0) 

    ax.set_facecolor('xkcd:white')
    ax.spines["top"].set_visible(False)
    ax.spines["right"].set_visible(False)
    ax.spines["left"].set_visible(False)
    ax.spines["bottom"].set_visible(False)
    
    if xlim != None:
         ax.set_xlim(xlim)


```python
pdfInfo(interval, values, [2, 3], xlim=[-2, 7])
```


```python

```


```python

```


```python

```

e93a12c83d969dfc7f59e2ee6c6712487ffb3f29
ipynb
Jupyter Notebook
Probability/Inicial.ipynb
carlos-faria/Stochastic-Processes
2ee57a1029566b606af781ec5d307eb33434fb79
MIT
Probability/Inicial.ipynb
carlos-faria/Stochastic-Processes
2ee57a1029566b606af781ec5d307eb33434fb79
MIT
Probability/Inicial.ipynb
carlos-faria/Stochastic-Processes
2ee57a1029566b606af781ec5d307eb33434fb79
MIT
Qwen/Qwen-72B
1. YES
2. YES