```python
%matplotlib notebook
import matplotlib.pyplot as plt
from sympy import *
init_printing()
```


```python
x, y = var("x y")
```


```python
f = x**3 - 3 * x**2 -24 * x + +32
f
```


```python
plot(f)
```


    <IPython.core.display.Javascript object>









    <sympy.plotting.plot.Plot at 0x1635e543550>




```python
df=f.diff()
dff = df.diff()
df, dff
```


```python
pc = solve(df)
pc
```


```python
dff.subs(x,pc[0]), dff.subs(x,pc[1])
```

A(x,y) = x*y

P(x,y) = 2x + y =2400



```python
A=x*y
eq1=Eq(2*x+y,2400)
y_=solve(eq1,y)
y_
```


```python
f=A.subs(y,y_[0])
f
```


```python
df = f.diff()
ddf= df.diff()
pc = solve(df)
pc
```


```python
eq1.subs(x,600)
```


```python
solve(eq1.subs(x,600),y)
```


```python
plot(f)
```


    <IPython.core.display.Javascript object>









    <sympy.plotting.plot.Plot at 0x1635de17518>




```python
x=600
y=1200

print(x*y)

```

    720000


lata de un litro optimizar material


```python
r, h = var("r h", real="True")
A=2*pi*r**2 + 2*pi*r*h
eq1=Eq(pi*r**2*h,1000)
h_=solve(eq1,h)
h_

```


```python
f1=A.subs(h,h_[0])
f1
```


```python
df1 = f1.diff()
ddf1= df1.diff()

df1, ddf1
```


```python
pc1= solve(df1)
pc1
```


```python
N(pc1[0])
```


```python
ddf1.subs(r,pc1[0])
```


```python
eq1.subs(r,pc1[0])
      
```


```python
solve(eq1.subs(r,pc1[0]),h)[0]
```


```python
N(solve(eq1.subs(r,pc1[0]),h)[0])
```

f(x,y)= (x^2) + (y^2)


```python
x, y = var("x y")
f=(x**2) + (y**2)
dfx=f.diff(x)
dfy=f.diff(y)

print(dfx, dfy)
```

    2*x 2*y



```python
pc_xy=solve([dfx, dfy],[x,y])
dfx, dfy, pc_xy
```


```python
dfxx=dfx.diff(x)
dfxy=dfx.diff(y)
dfyx=dfy.diff(x)
dfyy=dfy.diff(y)


dfxx, dfxy, dfyx, dfyy
```


```python
D=dfxx*dfyy- dfxy**2
D
```


```python
dfxx.subs(pc_xy)
```


```python
nablaf=[f.diff(var) for var in [x,y]]
nablaf
```


```python
solve(nablaf)
```


```python
[[f.diff(varx).diff(vary) for varx in [x,y] for vary in [x,y]]]
```


```python
H = hessian(f,[x,y])
H
```




$$\left[\begin{matrix}2 & 0\\0 & 2\end{matrix}\right]$$




```python
H.eigenvals()
```



f2f18b09297822bde450b2068ce59e709723ff7a
ipynb
Jupyter Notebook
Algebra.ipynb
fetu1107/Primer_Parcial_Robotica_2019
c2f45bdecb4daae7cdafa1357e1684c178de3f6a
MIT
Algebra.ipynb
fetu1107/Primer_Parcial_Robotica_2019
c2f45bdecb4daae7cdafa1357e1684c178de3f6a
MIT
Algebra.ipynb
fetu1107/Primer_Parcial_Robotica_2019
c2f45bdecb4daae7cdafa1357e1684c178de3f6a
MIT
Qwen/Qwen-72B
1. YES
2. YES