# 수학 기초

## Day 2 미분


```python
import sympy as sp
```


```python
x, a, c, h, n = sp.symbols('x a c h n')
```


```python
fx = (x**2 - x - 6) / (x - 3)
```


```python
sp.limit(fx, x, 3)
```




$\displaystyle 5$




```python
sp.limit(fx, x, 3, '+')
```




$\displaystyle 5$




```python
sp.limit(fx, x, 3, '-')
```




$\displaystyle 5$




```python
from sympy import Derivative
```


```python
fx = x**2
```


```python
Derivative(fx, x)
```




$\displaystyle \frac{d}{d x} x^{2}$




```python
Derivative(fx, x).doit()
```




$\displaystyle 2 x$




```python
Derivative(fx, x).doit().subs({x: 2})
```




$\displaystyle 4$




```python
fxr = -x + 2
fxl = x**2 - x + 2
```


```python
fx0 = fxl.subs({x: 0})
```


```python
fx0
```




$\displaystyle 2$




```python
sp.limit(fxr, x, 0, '+')
```




$\displaystyle 2$




```python
sp.limit(fxl, x, 0, '-')
```




$\displaystyle 2$




```python
sp.limit( (fxr - fx0) / (x-0), x, 0, '+')
```




$\displaystyle -1$




```python
sp.limit( (fxr - fx0) / (x-0), x, 0, '-')
```




$\displaystyle -1$




```python
fx = c
fxh = fx.subs({x: x+h})
sp.limit( (fxh - fx) / h, h, 0)
```




$\displaystyle 0$




```python
Derivative(fx, x).doit()
```




$\displaystyle 0$




```python
fx = x**3
fxh = fx.subs({x: x+h})
sp.limit( (fxh - fx) / h, h, 0)
```




$\displaystyle 3 x^{2}$




```python
Derivative(fx, x).doit()
```




$\displaystyle 3 x^{2}$




```python
fx = sp.log(x)
fxh = fx.subs({x: x+h})
sp.limit( (fxh - fx) / h, h, 0)
```




$\displaystyle \frac{1}{x}$




```python
Derivative(fx, x).doit()
```




$\displaystyle \frac{1}{x}$




```python
fx = sp.log(x, 10)
fxh = fx.subs({x: x+h})
sp.limit( (fxh - fx) / h, h, 0)
```




$\displaystyle \frac{1}{x \log{\left(10 \right)}}$




```python
Derivative(fx, x).doit()
```




$\displaystyle \frac{1}{x \log{\left(10 \right)}}$




```python
fx = sp.exp(x)
fxh = fx.subs({x: x+h})
sp.limit( (fxh - fx) / h, h, 0)
```




$\displaystyle e^{x}$




```python
Derivative(fx, x).doit()
```




$\displaystyle e^{x}$




```python
fx = a**x
fxh = fx.subs({x: x+h})
sp.limit( (fxh - fx) / h, h, 0)
```




$\displaystyle a^{x} \log{\left(a \right)}$




```python
Derivative(fx, x).doit()
```




$\displaystyle a^{x} \log{\left(a \right)}$




```python

```


```python

```


```python

```


```python

```


```python

```

3da5fbd9b9a8999981f74272c131f46e7cc3e320
ipynb
Jupyter Notebook
python/sem0/Math Python Day2.ipynb
dreandes/Code
923edb78de912a49def61e5f4867564c526899a1
MIT
python/sem0/Math Python Day2.ipynb
dreandes/Code
923edb78de912a49def61e5f4867564c526899a1
MIT
python/sem0/Math Python Day2.ipynb
dreandes/Code
923edb78de912a49def61e5f4867564c526899a1
MIT
Qwen/Qwen-72B
1. YES
2. YES