Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
������������ ��� �� ����������� ��
������������������
������������� ����������������� ������ ���� �
�������������������������� !�"���#�����$ ��
%�����!$���
�����������������������������������������
��������������������������������������������� ��������&��
����������������������'� ����������������������(����������� ������������'����������(��)�
� * +�� �,��� �
→ → → → � -
− − − − * +� + + + + � � * +� �
��������.����/��������
�
����� ����������������� �� ���������������������������������������������������������� ���������� �����
��������������������������������������� ������� ������������������������������ �������������� � ������
���������������� � �� � �� �� �� ���� �!��������������������"������ ���( �������������������������
����� �������)
�����������������������������������������������
��������������������������������������������������������������� * +�
'�-�-�,��� �
→ → → → � -
− − − − * +� + + + + � � * +� �
�
����������������������������������������������������������������������������������
����������������������������������������������������������������������(,*� '�- �-�+����/����� = = = = * +'0 &
#��������������������������� ��'������������������������������������������������ ��������
$ %�� ���� θ � ���� θ ��&�'�� ����������� ��������������������� ����� ����������������������������� �
��!� ��� #�!��
�����������������(� + � � ���� θ � � ���� θ ���&�θ�������������� ���!� ��"���������� ������������ ��������
����������� ��)��������������
����*�'�+�������������������������� ���/����,�1 2'* +��� θθθθ * +�� θθθθ ����������������'� ��
���������������� ������������'������ �(����� = = = = 1 2'�- �- '������)�
�* +'�- �- �,��� �
→ → → → � -
− − − − * +� ' + + + + �- � * +��� θθθθ + + + + �- � * +�� θθθθ * +� '�- �-
�'�����3�� �����.����/���������
!�����
**��+�&�"������� ����"��� ������������������� �������������������� �������� ������������� ��,��
������������������� ���������������� �-��&��-� ������������������
= � ��� � � ���� � �����&����� = � ��� � � ���� � ���
**��������� ��"���������� ����������������� �������������!�����������������&�"���������������������
�����(�������4���������
��� ������������������ ��������� �������!���������������������������������������� �������������
���������� ����������'����������������������������� �� �������!�����&� �����������������������������
���� ���������
����������������������������
#�!��.
� ������������ * +�
'�- �- ���������� ��(����������� �����������4������� ����(������(�����,�*� '�- �-�
+�'���� ����������� ����������������� = = = = 1 2'* +��� θθθθ * +�� θθθθ �/���(��������� �����������5�����
��������������������� ����������� ����������� ���������
#�!��/
#���������������������������� �� �������!������"������ * +�� ��, * +��� θθθθ * +�
�� ��6�� * +�� θθθθ * +�
�� ����
�.(�����7������������(���������� �(������������ ������ ������������*� '����+�/�* '* +��� θθθθ * +�� θθθθ
+'�������� ������������� ������������� ��������������������������"����'�� ����������� �����������
������������������4��������
�8��( ��0�
�� �� ��� ������������� * +� '� � ,� − − − − + + + + 0 �&& �
&���� �(����� �,�*0'�0+������ ����������,*��'�+�
0������������������������������������������� �������������������(1���(�� �/
2
3
2���
��� � �� − �(��� �� → � -
− �
���
�
���� � +
� /
2− +
� 3
2� �� � −
�
(�� �� → � -
− + − �
���
�
��� +
� /
2
.
.�
���
�
���− +
� 3
2
.
.
���(� ��
→ � -
− + .. �
2
./ �.
.2
���(��−
..
2�
4������� �!���������
������������(�*.����&���(�3�����������"��������"������
������� ��� ���(��*.�*3������ ��"����
� ��� � ��(��� �/
2
3
2���*.�*3���(��− −
5
2
5
2��(���*��
..
2��
6��������������������� ��'���� ��&��"��� ������������������������������ ����������� �������!������
������ "�������������������������&����� �����������#�
�8��( ��&�
�� �� ��� ������������� * +� '� � ,� − − − − − − − − � �&�&���� �(����� �,�1�
�
�'��
�'������
������������
����
������������� '
�
�
�
��2������ ����������
�,*�0
&'0
&+�
> restart:f:=(x,y)->4-x^2-y^2;
��(�� → � ��� � − − 3 �.
�.
> with(linalg):with(plottools):with(plots):Warning, new definition for normWarning, new definition for trace
> f:=(x,y)->4-x^2-y^2; v:=[cos(Pi/4),sin(Pi/4)]; p:=[3/4,3/4];P:=[3/4,3/4,f(3/4,3/4)]; print("_________________POR LA DEFINICION__________________________"); Limit((f(3/4+h*cos(Pi/4),3/4+h*sin(Pi/4))-f(3/4,3/4))/h,h = 0); Deriv_Direc_V:=limit((f(3/4+h*cos(Pi/4),3/4+h*sin(Pi/4))-f(3/4,3
#�!��3
/4))/h,h = 0); print("__________________POR EL GRADIENTE_____________________________"); Gradiente:=grad(f(x,y),[x,y]); Grad_en_V:=subs(x=3/4,y=3/4,%); vector=v; Deriv_Direc_V:=dotprod(Grad_en_V,v);
��(�� → � ��� � − − 3 �.
�.
��(���
�
����
..
..
��(���
�
����
/
3
/
3
��(���
�
���� �
/
3
/
3
./
7
899999999999999999#:;�<�=�>�?�0�:?999999999999999999999999998
�� → � -
− @
7.�
���
�
��� +
/
3
.� .
.
�
��(�������������� −/
..
8999999999999999999#:;��<�A;=��?��999999999999999999999999999998
��(���������� $ %�−. � −. �
��(�����������
�
����
*/
.
*/
.
= �������
�
����
..
..
��(�������������� −/
..
A������������
> superficie:=plot3d([x,y,f(x,y)],x=0..2,y=0..sqrt(4-x^2), grid=[40,40],axes=normal,shading=zhue,style=patchnogrid, color=aquamarine,linestyle=1,orientation=[6,76]): plano:=plot3d([x,x,z],x=0..2.1,z=0..4.6, style=wireframe,color=coral,linestyle=1): curva:=spacecurve([x,x,f(x,x)],x=0..1.4,color=blue,thickness=3): suelo:=spacecurve([x,x,0],x=0..2.4,color=tan,thickness=3): recta_tang:=[3/4,3/4,f(3/4,3/4)]+t*[1,1,-3/sqrt(2)]: R_tangente:=spacecurve(evalm(recta_tang),t=-1..1.4,color=red,thi
#�!��2
ckness=3):P_tangente:=plot3d([x,y,41/8-3/2*(x+y)],x=0..1.2,y=0..1.2, style=wireframe,color=blue,linestyle=1): rotulo:=textplot3d([0.73,0.73,3.1,`P `],color=black): display([superficie,plano,curva,suelo,R_tangente,P_tangente,rotulo]);
0������������ ����������������� �����������������"������������������ �������������������
�=���B� ��� �� �������!������� �����������������#��"�������������� ������������� �����)���
=����)��� �����������!������� �����������������#�&���� ���������������C,���������� �����������!������� ��
����������B� ��
<������������B� ��"������ ������������������ ����������������� �� ����������)����"����������������#�
������������������������������C�&��-�-� �(������������� ��)��:D�
���������������� � ��� � ����� �����������������!��������!�������������� ����������)������ �����������������
��� �������������������� ������������� �����)��
> display([superficie,curva,suelo,R_tangente,rotulo],orientation=[-9,79]);
#�!��5
> ;C������������)��� ��'��'�������� ��&���� ���������������
> restart:with(linalg):with(plottools):with(plots):Warning, new definition for normWarning, new definition for trace
> f:=(x,y)->x+2*x*y-3*y^2; v:=[cos(Pi/6),sin(Pi/6)]; p:=[1,2]; Limit((f(1+h*cos(Pi/6),2+h*sin(Pi/6))-f(1,2))/h,h = 0); Deriv_Direc_V:=limit((f(1+h*cos(Pi/6),2+h*sin(Pi/6))-f(1,2))/h,h = 0); print("___________________________________________________________"); Gradiente:=grad(f(x,y),[x,y]); Grad_en_V:=subs(x=1,y=2,%); vector=v; Deriv_Direc_V:=dotprod(Grad_en_V,v);
��(�� → � ��� � + − � . � � / �.
��(���
�
����
./
.
��(�� $ %� .
#�!��E
�� → � -
+ + − 7
.� / .
�
���
�
��� +
.� /
�
���
�
��� + .
.� /
�
���
�
��� + .
.�
.
�
��(�������������� − + 22
./
8999999999999999999999999999999999999999999999999999999999998
��(���������� $ %� + . � − . � 5 �
��(���������� $ %�2 * -
= �������
�
����
./
.
��(�������������� − + 22
./
> ;
�������4��������
0������������ ���������� � �� �� � ������������������������ ������������������������
��������"��� = � ��� � + � ��� � �� � ��� � ������
" ����������������4����������������� �(�����(�� �������)�����%�����*(+��,���*�� '* +��� * +�
�� +�
� �!������������������������������ ���������������������������� ������������ ��������������"���
������������"������� �������������� ����
�������������������������������������������������������������������
����������������������������������������������������������������������������������(�� �� ��� � �� �����������
�����(�������4���������
�����������������,��� � 6��� �.��,��(������������ ����� ��������4��������(���� ��������������'�
��������7������������� �)
�
� F���� ��������!������������G� �� ���������������"��� ��������������������� ����������,�� ��
���������9� ����(���� �4����������� �������.�����������������*�'�+�������� �(�������/�
������� �����.��� ��(��(������������� ��*�(����������.��+��
�.F���"�������������������������������������������� ����� ����(���� ���������(������� �
�������)������%���� � �� � �
�/F��"������������������ ������ �������������(��(����� ���� �4��������
������)��������� ���!� ��"���������� ������������ � �A��� � �($��� � ��� � ��� � ��� � ��%��&���(�$�� ��.%��#�!��7
������������������"����� � ��� � (�$��� � ��� � ��� � ��� � ��%�$�� ��.%
���������"����� ��� ������� ������� ��������������������� �
����������������������������������������H� � ��� � �H�(�HH�A�������HH�HH���HH�0�����(�HH�A�������HH� �0�����(�HH�A�������HH�0��������� ��������� ��� ��������������H� � ��� � �H����������������0�����( ,�����������������A�������&������!��� �������������������
�
0�������������������������� ��������������� ��"��� ���������� � �� �� � ������������������������
������������ ��������!���������"���������G� ���� ��������������������������������&������ �� �����
������� ������'�������������� �������������'��������������
3F����%���*�+�,�-�������(�����:'���������������� �������������������� ������:��������������
��� ����� ������������
�8��( ���
0����"�����(�����������������4������������ ����(���������������( �������� �������������
(��� �������� * +$ '� � �,� − − − − − − − − &- � �&�&���������������������������������'������������������
� �(�����:,�*&'���+�;����7����������������������(�������� �����(�������<�;���� �������
�����������������<
��(�*7���,������(�*.&�,� ��!��A�������#��(���* 5����5��(���������������������������������
������� ������(� + � �− 5 .5.�(� .@. ��(� E��-@�����������������������(1� ���������������
���������������B�����������'����������������������������������������������������������� E�-@�
0����'������������ ������������������� �������������������� �������� ������������� ����������������
������������������� �������� �����������5������������������������� ������������� ������������
���"�������������������8��( ��
&���=����(����������������� ����������������&����������������(��������� ����'�7��������
�������� ������������������������ ��������(������� ������/����(�������(������������ �����
� ��� ������� ��� ���������C�(�π��.�'�&�� ��� ��������� ��������������������������� .�π����/�
?�������������������� ���������������������� ������ ����������������������������&������������
� ������������������ ���� ��������������������������������������������������������������
���(�.��'�����������"����������(�.�&�'�(�/� ������������������������� �� ������� ���������������
�.�/��(� .�π�
��(�π�.����������"����������(�.�&�'�(�/� ������������������������� �� �������� ��� ����������������
�.�/��(�3�π�
#�!��@
������ ����"�����)����������� ��������������� ������� �������
�
> restart:with(linalg):with(plottools):with(plots):Warning, new definition for normWarning, new definition for trace
�8������0�
�� �� ��� ������������������ ���� �������� = = = = * +� '� � + + + + &- � ������� �(�����*0'&+���4��� ��
��������� �������������
����
������������'
�
>
�
>��
�� �� ���� ��������4��������/����� ������������ ��7�����������������(��������
> f:=(x,y)->20+x*y; v:=[3/5,4/5]; p:=[1,2]; LIM_DIREC_V:=limit((f(1+h*3/5,2+h*4/5)-f(1,2))/h,h = 0);
��(�� → � ��� � + .- � �
��(���
�
����
/
2
3
2
��(�� $ %� .
��(� !"��!#$%�� .
<�����������������&����������������������������� �������� �������������� ��������!���������
> Gradiente:=grad(f(x,y),[x,y]); Grad_en_P:=subs(x=1,y=2,%);
��(���������� $ %�� �
��(���������� $ %�.
����������&��������� ��������!������������������������ ����������� ��������������'�����
> dotprod(Grad_en_P,v);
.
<��!�����������������
> plot3d(f(x,y),x=-3..3,y=-3..3,axes=normal,orientation=[101,78]);
#�!�� -
� �������������������!���������������������
> gradplot(f(x,y),x=-3..3,y=-3..3,scaling=constrained);
0�����������������������������������"����������������)���
> Campo_Grad:=gradplot(f(x,y),x=-3..3,y=-3..3,scaling=constrained,arrows=slim, grid=[10,10]): Campo_Grad;
#�!��
��� ���G������� ����������������� �����������������������)����������� �����������������������"���
���� ��'����� �!�����������G� ��� ����������������������������������
$������)�
���*�'�+����������������������� �����*�'�+�/����4���������������� �'�� ��������4�����������
*�'�+��������4��� ��� �������������� �7���(����(���� �(�����
0�������������������������� �!�������
> Curvas_Nivel:=contourplot(f(x,y),x=-3..3,y=-3..3,contours=15,numpoints=1300,color=orange): display({Campo_Grad,Curvas_Nivel});
#�!�� .
'������������������ ��������������
> Superficie:=plot3d([x,y,f(x,y)],x=-3..3,y=-3..3): Dominio:=plot3d([x,y,0],x=-3..3,y=-3..3,style=PATCHNOGRID,color=yellow): display([Superficie,Dominio],axes=framed,orientation=[101,78]);
#���� ��������������������� ���������&��������� ��� ��������!���������"������� �� ���������������
����������������,��������������������#�!�� /
> rect:=plot([[-3,-3],[3,-3],[3,3],[-3,3],[-3,-3]],x=-5..5,y=-5..5): a1:=arrow([1,2],[3,3],0.06,0.3,0.1,color= green): display(rect,a1,scaling=constrained);
> Superficie:=plot3d([x,y,f(x,y)],x=0..4,y=0..4,color=red): Plano_Tang:=plot3d([x,y,18+2*x+y],x=-1..4,y=-1..4, style=wireframe,shading=none,grid=[15,15],axes=none,color=blue,style=PATCHNOGRID, shading=none,thickness=1): Vect_grad:= arrow([1,2,22],[3,3,27],0.2,0.4,0.4,color=black): display({Superficie,Plano_Tang,Vect_grad},axes=framed,orientation=[20,75]);
#�!�� 3
�8������&�
=����7����������������������� �(�����:�,�*��0'&'�0�+�������������9��7������(������� ��
��������*�'�+,� − − − − & �&� �
&��;?���������������������(�������������� ��������(��������
(��� �<
> restart:with(linalg):with(plottools):with(plots):Warning, new definition for normWarning, new definition for trace
> f:=(x,y)->2*x^2-4*y^2; Gradiente:=grad(f(x,y),[x,y]); Grad_en_P:=subs(x=-1,y=2,%);
��(�� → � ��� � − . �.
3 �.
��(���������� $ %�3 � −7 ���(���������� $ %�*3 * 5
#��� ���������������������� ���������������������� ��"�����G� ��� ��������!�����������C(��3� 5����
� �3�
�8��������
� ���� ���������������.�����.������������������������� ����������� ������ ����*�'�+,�
− − − − � �&> �
&������������������������������ �(��������������������*�0'0+��� ���������'�;����
7�������������3������.���� ����4��/���� ������������������������<�;3���������������
#�!�� 2
�������(���������� ��� ���.���<
> restart:with(linalg):with(plottools):with(plots): g:=(x,y)->3*x^2-5*y^2; Gradiente:=grad(g(x,y),[x,y]); Grad_en_P:=subs(x=-1,y=1,%); print("El riesgo maximo lo corre si avanza en la dirección del gradiente"); print("El riesgo se minimiza si corre en la dirección opuesta del gradiente");
Warning, new definition for normWarning, new definition for trace
��(�& → � ��� � − / �.
2 �.
��(���������� $ %�5 � − - ���(���������� $ %�*5 * -
8� �����!���I����� ���������������B����� �������������� �!��������8
8� �����!������������B��������������� ���������������������� �!��������8
> Tasa:=sqrt((-6)^2+(-10)^2);
��(�'�(� . /3
�8��������
���������� ������������������ ���� ��������� = = = = � − − − − ��
�
�&
&����� �(�����*���'>+�/���� ��
���������� ��������7���������@-A����� ��(�����(�������� ��8�������������
> restart:with(linalg):with(plottools):with(plots): V1:=cos(pi/3)=1/2;V2:=sin(pi/3)=sqrt(3)/2;V:=[1/2,sqrt(3)/2];
Warning, new definition for normWarning, new definition for trace
��(�� = �
���
�
������
/π
.
��(��) = �
���
�
������
/π
./
��(���
�
����
.
./
> g:=(x,y)->(1/3)*x^3-(1/2)*y^2; Gradiente:=grad(g(x,y),[x,y]); Grad_en_P:=subs(x=-3,y=5,%);
��(�& → � ��� � −
/�/
.�.
#�!�� 5
��(���������� $ %��. −�
��(���������� $ %�@ *2
> fv_P:=dotprod(Grad_en_P,V); evalf(fv_P);
��(����� − @
.
2
./
� 5@7E.@7-
�8������>�
=���4��������4��������(��������� �(�����*-'-+���� �����(�����������������
= = = = * +� '� � + + + + ��
* +��� � ��
* +��� � �����7�������������������
> restart:with(linalg):with(plottools):with(plots): S:=(x,y)-> exp(x)*cos(y)+exp(y)*cos(x); Gradiente:=grad(S(x,y),[x,y]); Grad_en_P:=evalf(subs(x=0,y=0,%)); "Se desliza en la direccion: V=(-1,-1)";
��(�* → � ��� � + ��
� ���� � ��
� ���� �
��(���������� $ %� − ��
� ���� � ��
� ���� � − + ��
� ���� � ��
� ���� �
��(���������� $ %� � �
8������ �B����� �������������C(�* �* �8
�8������@�
����� ���������� = = = = * +� '� � � ��'��� �� ���� ��������4��������(���� �(�����:�,�*��'&�+�/�
����������7����������4��� ��� �������������� �7���(����(�����3��(�����
> restart:with(linalg):with(plottools):with(plots): f:=(x,y)-> x*y; Gradiente:=grad(f(x,y),[x,y]): Grad_en_P:=evalf(subs(x=3,y=2,%));
Warning, new definition for normWarning, new definition for trace
��(�� → � ��� � � �
��(���������� $ %�.� /�
<��������������� �"������������#��/�.�����
B�(�/�.�(�5�(1 = � � 5��� ��"������ �������� = �5
��
��������������� �����������!����������'���������������������������������
&J(�−5
�.����������"������#����������(�−
.
/���(1� = − � .
�
���
�
���−
.
/� � − � / ������������������!������������
��������������������4�(��/��*.��� �������������!��� �� ��������!������������������������ ����� ��� ��
"����������� ������!��� ������� �!���������&� ��������������� �����������������
#�!�� E
�8������B�
�� �� ��� �������������������� ������� = = = = * +� '� � * +������ + + + + �&�&����� �(�����:�,�*0'�&+���� ��
�����������������(���� ���������)�
�+�.�,�-'���+�/�,-�'��+� = = = = � − − − − � � >���
<��������������� ������������(-������-� ��� ����� ���������&�(�-����� �-���&� ������&�(�/���*2��K(1�
= �
+ � 2
/������ �/��
> restart:with(linalg):with(plottools):with(plots): f:=(x,y)->arctan(x^2+y^2); p:=[1,-2]; "Apartado a)________________________"; v1:=[0,1]; LIM_DIREC_V:=limit((f(1+h*0,-2+h*1)-f(1,-2))/h,h = 0); "Apartado b)_________________________"; v2:=[1,0]; LIM_DIREC_V:=limit((f(1+h*1,-2+h*0)-f(1,-2))/h,h = 0); "Apartado c)__________________________"; v1:=[1,3]; LIM_DIREC_V:=limit((f(1+h*1,-2+h*3)-f(1,-2))/h,h = 0);
Warning, new definition for normWarning, new definition for trace
��(�� → � ��� � � ������� + �.
�.
��(�� $ %� *.
8����������9999999999999999999999998
��(�� $ %�-
��(� !"��!#$%��*.
/
8����������99999999999999999999999998
��(��) $ %� -
��(� !"��!#$%��
/
8����������999999999999999999999999998
��(�� $ %� /
��(� !"��!#$%��*2
/
�8������C�
�� �� ���������� �������������������� ������ = = = = * +� '� � + + + + �&�&����� �(�����:�,�*0'&+'��
#�!�� 7
����4���������� ��� ������������(���� ���
> restart:with(linalg):with(plottools):with(plots): f:=(x,y)->(x^2+y^2); v:=[cos(theta),sin(theta)]; p:=[1,2]; Limit((f(1+h*cos(theta),2+h*sin(theta))-f(1,2))/h,h = 0); Deriv_Direc_V:=limit((f(1+h*cos(theta),2+h*sin(theta))-f(1,2))/h,h = 0); "_______________________________________________________________________________"; fx(P):=subs(theta=0,Deriv_Direc_V)=2;fy(P):=subs(theta=pi/2,Deriv_Direc_V)=4;
Warning, new definition for normWarning, new definition for trace
��(�� → � ��� � + �.
�.
��(�� $ %�� ���� θ � ���� θ��(�� $ %� .
�� → � -
+ − � � + � � ���� θ .� � + . � � ���� θ .
2
�
��(�������������� + . � ���� θ 3 � ���� θ8999999999999999999999999999999999999999999999999999999999999999999999999999L
99998
��(�� ��� � = + . � ���� - 3 � ���� - .
��(�� ��& � = + .�
���
�
������
.π 3
�
���
�
������
.π 3
;����������7���� �4�������������9� �� ���������������.������������<
<��������������������� ������� "����������������θ���������������������θ���� = � �A θ + . � ���� θ 3 � ���� θ �
=���������AJ(�− + . � ���� θ 3 � ���� θ ������!�� �������-�&����� �������� ����� �����"���'�����
����������������� ��� ������ ��������������������� �����
� ���� θ (��*�M��
2�,� � ���� θ (��*�M��
.
2�,��"�����G� ����� ���������&� �����������������������)����
"���� ��������!��������������.�3����&������������������
2����
.
2���
�� ���� ����������"������������������������� ��"�����G� �� ������������������,���!�����
��������������������������
�8������D�
#�!�� @
?����������������(���������� ���4�����������������'�� ��������� = = = = * +� '� � + + + + ��* + + + + + � 0 �
�
������������(����������� ������������ ��8�� E����� � F�
> f:=(x,y)->exp(y)+(y+1)*exp(x) ; print(`DERIVADAS PARCIALES y su valor en (0,0).`); fx:=D[1](f); fy:=D[2](f); fx_p:=D[1](f)(0,0); fy_p:=D[2](f)(0,0);
��(�� → � ��� � + ��
� � + � ��
�$#!�+�+*��+#%!+ $*���(,���-��������� �
��(��� → � ��� � � � + � ��
��(��� → � ��� � + ����
��(�����
��(����� .
��������� ��������������"������ ���������������:N������������������������������� ����������"������
������������:6������ ���� ��
>�?
#�!��.-