```python
from IPython.display import Image
from IPython.core.display import HTML 
from sympy import *; x,h,y,t,w = symbols("x h y t w"); A = Function("A")
Image(url= "https://i.imgur.com/auyZwus.png")
```









```python
L  = Function("L")
f = Function("f")
x,a = symbols('x a')
L(x)
```




$\displaystyle L{\left(x \right)}$




```python
Eq(L(x) , f(a) + diff(f(a),a)*(x-a))
```




$\displaystyle L{\left(x \right)} = \left(- a + x\right) \frac{d}{d a} f{\left(a \right)} + f{\left(a \right)}$




```python
expr = x**4 - x**2 +2
Eq(f(x), expr)
```




$\displaystyle f{\left(x \right)} = x^{4} - x^{2} + 2$




```python
x1 = 1
Eq(f(x), expr).subs(x,x1)
```




$\displaystyle f{\left(1 \right)} = 2$




```python
fa = 2        # f(a) 
f = lambdify(x, expr, "math")
df = diff(f(x),x)
```


```python
Eq(Derivative(f(x)),df).subs(x,x1)
```




$\displaystyle \left. \frac{d}{d x} \left(x^{4} - x^{2} + 2\right) \right|_{\substack{ x=1 }} = 2$




```python
dfa= df.subs(x,x1)
Eq(L(x) , fa+ dfa*(x-x1))
```




$\displaystyle L{\left(x \right)} = 2 x$




```python
Image(url= "https://i.imgur.com/dYuwIib.png")
```








ipynb
e268e60f2d4440d50a9a3d579861f8bacbaad58b
Jupyter Notebook
8f8160fbf0aa4fd514d4a5046668a194997aade6
MIT
NSC9/Sample_of_Work
Calculus_Homework/WWB15.2.ipynb
8f8160fbf0aa4fd514d4a5046668a194997aade6
MIT
NSC9/Sample_of_Work
Calculus_Homework/WWB15.2.ipynb
8f8160fbf0aa4fd514d4a5046668a194997aade6
MIT
NSC9/Sample_of_Work
Calculus_Homework/WWB15.2.ipynb