```python
%matplotlib notebook
import matplotlib.pyplot as plt

from sympy import *
init_printing()
```


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


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


    <IPython.core.display.Javascript object>









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




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


```python
intf=f.integrate()
intf
```


```python
df2=f.diff(x,2)
df2
```


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


```python
ddf=df.diff()
ddf.subs(x,pc[0]),ddf.subs(x,pc[1])
```

ejercicio:
se desea que combinaciones de medidas da el area maxima


```python
P=Eq(x+2*y,2400)
A=x*y
(P,A)
```


```python
y2=-x*(0.5)+1200
y2
```


```python
f_=A.subs(y,y2[0])
f_
```


```python
df_=f_.diff()
df_
```


```python
pc=solve(df_)
pc
```


```python
Sol=y2.subs(x,1200)
Sol
```


```python
x
```


```python
type(y2)
```




    sympy.core.add.Add



$Optimizacion-Con-Dos-Variables$ 


```python
f= x**2+y**2
f
```


```python
dfx=f.diff(x)
dfy=f.diff(y)

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


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

D=dfxx*dfyy-dfxy
D.subs(pc),dfxx.subs(pc)
```


```python

```

6ab923ef812e8e5978a4e1a899a6face19044917
ipynb
Jupyter Notebook
optimizacion.ipynb
jdesandi/Apuntes
4fb144c1fd262c183055902cbcdcc1b3dda95ac9
MIT
optimizacion.ipynb
jdesandi/Apuntes
4fb144c1fd262c183055902cbcdcc1b3dda95ac9
MIT
optimizacion.ipynb
jdesandi/Apuntes
4fb144c1fd262c183055902cbcdcc1b3dda95ac9
MIT
Qwen/Qwen-72B
1. YES
2. YES