f x , y D 6 x^2 y^2; ParametricPlot3D@8 tD, r Sin tD, 6 r ...€¦ · In[16]:= f@x_, y_D = 6-x^2-...

6
In[16]:= f@x_, y_D = 6 - x^2 - y^2; ParametricPlot3D@8r * Cos@tD,r * Sin@tD,6 - r^2<, 8t, 0, 2 * Pi<, 8r, 0, 4<D ContourPlot@f@x, yD, 8x, - 4, 4<, 8y, - 4, 4<D gradf = 8D@f@x, yD,xD,D@f@x, yD,yD<; 8x0 = 2, y0 = 3<; h = 0.01; puntos = Table@8x1, y1< = 8x0, y0< + h * gradf . 8x x0, y y0<; 8x0, y0< = 8x1, y1<, 8k, 1, 500<D Out[17]= -4 -2 0 2 4 -4 -2 0 2 4 -10 -5 0 5

Transcript of f x , y D 6 x^2 y^2; ParametricPlot3D@8 tD, r Sin tD, 6 r ...€¦ · In[16]:= f@x_, y_D = 6-x^2-...

Page 1: f x , y D 6 x^2 y^2; ParametricPlot3D@8 tD, r Sin tD, 6 r ...€¦ · In[16]:= f@x_, y_D = 6-x^2- y^2; ParametricPlot3D@8r*Cos@tD, r*Sin@tD, 6-r^2

In[16]:= f@x_, y_D = 6 - x^2 - y^2;

ParametricPlot3D@8r * Cos@tD, r * Sin@tD, 6 - r^2<, 8t, 0, 2 * Pi<, 8r, 0, 4<DContourPlot@f@x, yD, 8x, -4, 4<, 8y, -4, 4<Dgradf = 8D@f@x, yD, xD, D@f@x, yD, yD<;

8x0 = 2, y0 = 3<;

h = 0.01;

puntos = Table@8x1, y1< = 8x0, y0< + h * gradf �. 8x ® x0, y ® y0<;

8x0, y0< = 8x1, y1<, 8k, 1, 500<D

Out[17]=

-4

-2

0

2

4

-4

-2

0

2

4

-10

-5

0

5

Page 2: f x , y D 6 x^2 y^2; ParametricPlot3D@8 tD, r Sin tD, 6 r ...€¦ · In[16]:= f@x_, y_D = 6-x^2- y^2; ParametricPlot3D@8r*Cos@tD, r*Sin@tD, 6-r^2

Out[18]=

-4 -2 0 2 4

-4

-2

0

2

4

Out[22]= 881.96, 2.94<, 81.9208, 2.8812<, 81.88238, 2.82358<, 81.84474, 2.7671<,

81.80784, 2.71176<, 81.77168, 2.65753<, 81.73625, 2.60438<, 81.70153, 2.55229<,

81.6675, 2.50124<, 81.63415, 2.45122<, 81.60146, 2.40219<, 81.56943, 2.35415<,

81.53804, 2.30707<, 81.50728, 2.26093<, 81.47714, 2.21571<, 81.4476, 2.17139<,

81.41864, 2.12797<, 81.39027, 2.08541<, 81.36247, 2.0437<, 81.33522, 2.00282<,

81.30851, 1.96277<, 81.28234, 1.92351<, 81.25669, 1.88504<, 81.23156, 1.84734<,

81.20693, 1.81039<, 81.18279, 1.77419<, 81.15914, 1.7387<, 81.13595, 1.70393<,

81.11323, 1.66985<, 81.09097, 1.63645<, 81.06915, 1.60372<, 81.04777, 1.57165<,

81.02681, 1.54022<, 81.00627, 1.50941<, 80.986149, 1.47922<, 80.966426, 1.44964<,

80.947098, 1.42065<, 80.928156, 1.39223<, 80.909593, 1.36439<, 80.891401, 1.3371<,

80.873573, 1.31036<, 80.856101, 1.28415<, 80.838979, 1.25847<,

80.8222, 1.2333<, 80.805756, 1.20863<, 80.789641, 1.18446<, 80.773848, 1.16077<,

80.758371, 1.13756<, 80.743203, 1.11481<, 80.728339, 1.09251<,

80.713773, 1.07066<, 80.699497, 1.04925<, 80.685507, 1.02826<, 80.671797, 1.0077<,

80.658361, 0.987542<, 80.645194, 0.967791<, 80.63229, 0.948435<,

80.619644, 0.929466<, 80.607251, 0.910877<, 80.595106, 0.892659<,

80.583204, 0.874806<, 80.57154, 0.85731<, 80.560109, 0.840164<,

80.548907, 0.823361<, 80.537929, 0.806893<, 80.52717, 0.790756<,

80.516627, 0.77494<, 80.506294, 0.759442<, 80.496169, 0.744253<,

80.486245, 0.729368<, 80.47652, 0.71478<, 80.46699, 0.700485<, 80.45765, 0.686475<,

80.448497, 0.672746<, 80.439527, 0.659291<, 80.430737, 0.646105<,

80.422122, 0.633183<, 80.413679, 0.620519<, 80.405406, 0.608109<,

80.397298, 0.595947<, 80.389352, 0.584028<, 80.381565, 0.572347<,

80.373933, 0.5609<, 80.366455, 0.549682<, 80.359126, 0.538688<,

80.351943, 0.527915<, 80.344904, 0.517356<, 80.338006, 0.507009<,

80.331246, 0.496869<, 80.324621, 0.486932<, 80.318129, 0.477193<,

80.311766, 0.467649<, 80.305531, 0.458296<, 80.29942, 0.44913<,

80.293432, 0.440148<, 80.287563, 0.431345<, 80.281812, 0.422718<,

80.276176, 0.414264<, 80.270652, 0.405978<, 80.265239, 0.397859<,

80.259934, 0.389901<, 80.254736, 0.382103<, 80.249641, 0.374461<,

, , ,

2 Maximo_descenso_optimizacion.nb

Page 3: f x , y D 6 x^2 y^2; ParametricPlot3D@8 tD, r Sin tD, 6 r ...€¦ · In[16]:= f@x_, y_D = 6-x^2- y^2; ParametricPlot3D@8r*Cos@tD, r*Sin@tD, 6-r^2

Out[22]=

80.244648, 0.366972<, 80.239755, 0.359633<, 80.23496, 0.35244<,

80.230261, 0.345391<, 80.225656, 0.338483<, 80.221143, 0.331714<,

80.21672, 0.325079<, 80.212385, 0.318578<, 80.208138, 0.312206<,

80.203975, 0.305962<, 80.199895, 0.299843<, 80.195897, 0.293846<,

80.191979, 0.287969<, 80.18814, 0.28221<, 80.184377, 0.276566<,

80.18069, 0.271034<, 80.177076, 0.265614<, 80.173534, 0.260301<,

80.170064, 0.255095<, 80.166662, 0.249993<, 80.163329, 0.244994<,

80.160062, 0.240094<, 80.156861, 0.235292<, 80.153724, 0.230586<,

80.150649, 0.225974<, 80.147637, 0.221455<, 80.144684, 0.217026<,

80.14179, 0.212685<, 80.138954, 0.208431<, 80.136175, 0.204263<,

80.133452, 0.200178<, 80.130783, 0.196174<, 80.128167, 0.192251<,

80.125604, 0.188406<, 80.123092, 0.184637<, 80.12063, 0.180945<,

80.118217, 0.177326<, 80.115853, 0.173779<, 80.113536, 0.170304<,

80.111265, 0.166898<, 80.10904, 0.16356<, 80.106859, 0.160288<,

80.104722, 0.157083<, 80.102627, 0.153941<, 80.100575, 0.150862<,

80.0985633, 0.147845<, 80.096592, 0.144888<, 80.0946602, 0.14199<,

80.092767, 0.13915<, 80.0909117, 0.136367<, 80.0890934, 0.13364<,

80.0873116, 0.130967<, 80.0855653, 0.128348<, 80.083854, 0.125781<,

80.0821769, 0.123265<, 80.0805334, 0.1208<, 80.0789227, 0.118384<,

80.0773443, 0.116016<, 80.0757974, 0.113696<, 80.0742814, 0.111422<,

80.0727958, 0.109194<, 80.0713399, 0.10701<, 80.0699131, 0.10487<,

80.0685148, 0.102772<, 80.0671445, 0.100717<, 80.0658017, 0.0987025<,

80.0644856, 0.0967284<, 80.0631959, 0.0947939<, 80.061932, 0.092898<,

80.0606933, 0.09104<, 80.0594795, 0.0892192<, 80.0582899, 0.0874348<,

80.0571241, 0.0856861<, 80.0559816, 0.0839724<, 80.054862, 0.082293<,

80.0537647, 0.0806471<, 80.0526894, 0.0790342<, 80.0516357, 0.0774535<,

80.0506029, 0.0759044<, 80.0495909, 0.0743863<, 80.0485991, 0.0728986<,

80.0476271, 0.0714406<, 80.0466745, 0.0700118<, 80.0457411, 0.0686116<,

80.0448262, 0.0672393<, 80.0439297, 0.0658946<, 80.0430511, 0.0645767<,

80.0421901, 0.0632851<, 80.0413463, 0.0620194<, 80.0405194, 0.060779<,

80.039709, 0.0595635<, 80.0389148, 0.0583722<, 80.0381365, 0.0572047<,

80.0373738, 0.0560607<, 80.0366263, 0.0549394<, 80.0358938, 0.0538407<,

80.0351759, 0.0527638<, 80.0344724, 0.0517086<, 80.0337829, 0.0506744<,

80.0331073, 0.0496609<, 80.0324451, 0.0486677<, 80.0317962, 0.0476943<,

80.0311603, 0.0467404<, 80.0305371, 0.0458056<, 80.0299263, 0.0448895<,

80.0293278, 0.0439917<, 80.0287413, 0.0431119<, 80.0281664, 0.0422497<,

80.0276031, 0.0414047<, 80.027051, 0.0405766<, 80.02651, 0.039765<,

80.0259798, 0.0389697<, 80.0254602, 0.0381903<, 80.024951, 0.0374265<,

80.024452, 0.036678<, 80.023963, 0.0359444<, 80.0234837, 0.0352256<,

80.023014, 0.034521<, 80.0225538, 0.0338306<, 80.0221027, 0.033154<,

80.0216606, 0.0324909<, 80.0212274, 0.0318411<, 80.0208029, 0.0312043<,

80.0203868, 0.0305802<, 80.0199791, 0.0299686<, 80.0195795, 0.0293692<,

80.0191879, 0.0287818<, 80.0188041, 0.0282062<, 80.0184281, 0.0276421<,

80.0180595, 0.0270892<, 80.0176983, 0.0265475<, 80.0173443, 0.0260165<,

80.0169975, 0.0254962<, 80.0166575, 0.0249863<, 80.0163244, 0.0244865<,

80.0159979, 0.0239968<, 80.0156779, 0.0235169<, 80.0153644, 0.0230465<,

80.0150571, 0.0225856<, 80.0147559, 0.0221339<, 80.0144608, 0.0216912<,

80.0141716, 0.0212574<, 80.0138882, 0.0208322<, 80.0136104, 0.0204156<,

80.0133382, 0.0200073<, 80.0130714, 0.0196071<, 80.01281, 0.019215<,

80.0125538, 0.0188307<, 80.0123027, 0.0184541<, 80.0120567, 0.018085<,

80.0118155, 0.0177233<, 80.0115792, 0.0173688<, 80.0113476, 0.0170215<,

80.0111207, 0.016681<, 80.0108983, 0.0163474<, 80.0106803, 0.0160205<,

, , ,

Maximo_descenso_optimizacion.nb 3

Page 4: f x , y D 6 x^2 y^2; ParametricPlot3D@8 tD, r Sin tD, 6 r ...€¦ · In[16]:= f@x_, y_D = 6-x^2- y^2; ParametricPlot3D@8r*Cos@tD, r*Sin@tD, 6-r^2

Out[22]=

80.0104667, 0.0157<, 80.0102574, 0.015386<, 80.0100522, 0.0150783<,

80.00985117, 0.0147768<, 80.00965415, 0.0144812<, 80.00946107, 0.0141916<,

80.00927184, 0.0139078<, 80.00908641, 0.0136296<, 80.00890468, 0.013357<,

80.00872659, 0.0130899<, 80.00855205, 0.0128281<, 80.00838101, 0.0125715<,

80.00821339, 0.0123201<, 80.00804912, 0.0120737<, 80.00788814, 0.0118322<,

80.00773038, 0.0115956<, 80.00757577, 0.0113637<, 80.00742426, 0.0111364<,

80.00727577, 0.0109137<, 80.00713026, 0.0106954<, 80.00698765, 0.0104815<,

80.0068479, 0.0102718<, 80.00671094, 0.0100664<, 80.00657672, 0.00986508<,

80.00644519, 0.00966778<, 80.00631628, 0.00947442<, 80.00618996, 0.00928494<,

80.00606616, 0.00909924<, 80.00594483, 0.00891725<, 80.00582594, 0.00873891<,

80.00570942, 0.00856413<, 80.00559523, 0.00839285<, 80.00548333, 0.00822499<,

80.00537366, 0.00806049<, 80.00526619, 0.00789928<, 80.00516086, 0.00774129<,

80.00505765, 0.00758647<, 80.00495649, 0.00743474<, 80.00485736, 0.00728604<,

80.00476022, 0.00714032<, 80.00466501, 0.00699752<, 80.00457171, 0.00685757<,

80.00448028, 0.00672042<, 80.00439067, 0.00658601<, 80.00430286, 0.00645429<,

80.0042168, 0.0063252<, 80.00413246, 0.0061987<, 80.00404982, 0.00607472<,

80.00396882, 0.00595323<, 80.00388944, 0.00583416<, 80.00381165, 0.00571748<,

80.00373542, 0.00560313<, 80.00366071, 0.00549107<, 80.0035875, 0.00538125<,

80.00351575, 0.00527362<, 80.00344543, 0.00516815<, 80.00337652, 0.00506479<,

80.00330899, 0.00496349<, 80.00324281, 0.00486422<, 80.00317796, 0.00476694<,

80.0031144, 0.0046716<, 80.00305211, 0.00457817<, 80.00299107, 0.0044866<,

80.00293125, 0.00439687<, 80.00287262, 0.00430893<, 80.00281517, 0.00422275<,

80.00275887, 0.0041383<, 80.00270369, 0.00405553<, 80.00264962, 0.00397442<,

80.00259662, 0.00389493<, 80.00254469, 0.00381704<, 80.0024938, 0.0037407<,

80.00244392, 0.00366588<, 80.00239504, 0.00359256<, 80.00234714, 0.00352071<,

80.0023002, 0.0034503<, 80.00225419, 0.00338129<, 80.00220911, 0.00331367<,

80.00216493, 0.00324739<, 80.00212163, 0.00318245<, 80.0020792, 0.0031188<,

80.00203761, 0.00305642<, 80.00199686, 0.00299529<, 80.00195692, 0.00293539<,

80.00191779, 0.00287668<, 80.00187943, 0.00281914<, 80.00184184, 0.00276276<,

80.001805, 0.00270751<, 80.0017689, 0.00265336<, 80.00173353, 0.00260029<,

80.00169886, 0.00254828<, 80.00166488, 0.00249732<, 80.00163158, 0.00244737<,

80.00159895, 0.00239842<, 80.00156697, 0.00235046<, 80.00153563, 0.00230345<,

80.00150492, 0.00225738<, 80.00147482, 0.00221223<, 80.00144532, 0.00216799<,

80.00141642, 0.00212463<, 80.00138809, 0.00208213<, 80.00136033, 0.00204049<,

80.00133312, 0.00199968<, 80.00130646, 0.00195969<, 80.00128033, 0.00192049<,

80.00125472, 0.00188208<, 80.00122963, 0.00184444<, 80.00120504, 0.00180755<,

80.00118093, 0.0017714<, 80.00115732, 0.00173597<, 80.00113417, 0.00170125<,

80.00111149, 0.00166723<, 80.00108926, 0.00163388<, 80.00106747, 0.00160121<,

80.00104612, 0.00156918<, 80.0010252, 0.0015378<, 80.0010047, 0.00150704<,

80.000984602, 0.0014769<, 80.00096491, 0.00144736<, 80.000945611, 0.00141842<,

80.000926699, 0.00139005<, 80.000908165, 0.00136225<, 80.000890002, 0.001335<,

80.000872202, 0.0013083<, 80.000854758, 0.00128214<, 80.000837663, 0.00125649<,

80.000820909, 0.00123136<, 80.000804491, 0.00120674<, 80.000788401, 0.0011826<,

80.000772633, 0.00115895<, 80.000757181, 0.00113577<, 80.000742037, 0.00111306<,

80.000727196, 0.00109079<, 80.000712652, 0.00106898<, 80.000698399, 0.0010476<,

80.000684431, 0.00102665<, 80.000670743, 0.00100611<, 80.000657328, 0.000985992<,

80.000644181, 0.000966272<, 80.000631298, 0.000946947<, 80.000618672, 0.000928008<,

80.000606298, 0.000909447<, 80.000594172, 0.000891258<, 80.000582289, 0.000873433<,

80.000570643, 0.000855965<, 80.00055923, 0.000838845<, 80.000548046, 0.000822068<,

80.000537085, 0.000805627<, 80.000526343, 0.000789515<, 80.000515816, 0.000773724<,

80.0005055, 0.00075825<, 80.00049539, 0.000743085<, 80.000485482, 0.000728223<,

80.000475772, 0.000713659<, 80.000466257, 0.000699385<, 80.000456932, 0.000685398<,

, , ,

4 Maximo_descenso_optimizacion.nb

Page 5: f x , y D 6 x^2 y^2; ParametricPlot3D@8 tD, r Sin tD, 6 r ...€¦ · In[16]:= f@x_, y_D = 6-x^2- y^2; ParametricPlot3D@8r*Cos@tD, r*Sin@tD, 6-r^2

Out[22]=

80.000447793, 0.00067169<, 80.000438837, 0.000658256<, 80.000430061, 0.000645091<,

80.000421459, 0.000632189<, 80.00041303, 0.000619545<, 80.00040477, 0.000607154<,

80.000396674, 0.000595011<, 80.000388741, 0.000583111<, 80.000380966, 0.000571449<,

80.000373347, 0.00056002<, 80.00036588, 0.000548819<, 80.000358562, 0.000537843<,

80.000351391, 0.000527086<, 80.000344363, 0.000516544<, 80.000337476, 0.000506214<,

80.000330726, 0.000496089<, 80.000324112, 0.000486168<, 80.000317629, 0.000476444<,

80.000311277, 0.000466915<, 80.000305051, 0.000457577<, 80.00029895, 0.000448425<,

80.000292971, 0.000439457<, 80.000287112, 0.000430668<, 80.00028137, 0.000422054<,

80.000275742, 0.000413613<, 80.000270227, 0.000405341<, 80.000264823, 0.000397234<,

80.000259526, 0.00038929<, 80.000254336, 0.000381504<, 80.000249249, 0.000373874<,

80.000244264, 0.000366396<, 80.000239379, 0.000359068<, 80.000234591, 0.000351887<,

80.000229899, 0.000344849<, 80.000225301, 0.000337952<, 80.000220795, 0.000331193<,

80.00021638, 0.000324569<, 80.000212052, 0.000318078<, 80.000207811, 0.000311716<,

80.000203655, 0.000305482<, 80.000199582, 0.000299372<, 80.00019559, 0.000293385<,

80.000191678, 0.000287517<, 80.000187845, 0.000281767<, 80.000184088, 0.000276132<,

80.000180406, 0.000270609<, 80.000176798, 0.000265197<, 80.000173262, 0.000259893<,

80.000169797, 0.000254695<, 80.000166401, 0.000249601<, 80.000163073, 0.000244609<,

80.000159811, 0.000239717<, 80.000156615, 0.000234923<, 80.000153483, 0.000230224<,

80.000150413, 0.00022562<, 80.000147405, 0.000221107<, 80.000144457, 0.000216685<,

80.000141568, 0.000212351<, 80.000138736, 0.000208104<, 80.000135962, 0.000203942<,

80.000133242, 0.000199863<, 80.000130577, 0.000195866<, 80.000127966, 0.000191949<,

80.000125407, 0.00018811<, 80.000122898, 0.000184348<, 80.00012044, 0.000180661<,

80.000118032, 0.000177047<, 80.000115671, 0.000173507<, 80.000113358, 0.000170036<,

80.00011109, 0.000166636<, 80.000108869, 0.000163303<, 80.000106691, 0.000160037<,

80.000104557, 0.000156836<, 80.000102466, 0.000153699<, 80.000100417, 0.000150625<,

80.0000984086, 0.000147613<, 80.0000964405, 0.000144661<,

80.0000945116, 0.000141767<, 80.0000926214, 0.000138932<,

80.000090769, 0.000136153<, 80.0000889536, 0.00013343<,

80.0000871745, 0.000130762<, 80.000085431, 0.000128147<,

80.0000837224, 0.000125584<, 80.000082048, 0.000123072<<

In[13]:= c1 = ListPlot@puntos, Joined ® True, PlotStyle ® 8RGBColor@1, 0, 0D, [email protected]<Dc2 = ContourPlot@f@x, yD, 8x, -1, 1<,

8y, -1, 1<, ContourShading ® False, Contours ® 40DShow@c1, c2, AspectRatio ® AutomaticD

Out[13]=

0.2 0.4 0.6 0.8

0.2

0.4

0.6

0.8

1.0

1.2

Maximo_descenso_optimizacion.nb 5

Page 6: f x , y D 6 x^2 y^2; ParametricPlot3D@8 tD, r Sin tD, 6 r ...€¦ · In[16]:= f@x_, y_D = 6-x^2- y^2; ParametricPlot3D@8r*Cos@tD, r*Sin@tD, 6-r^2

Out[14]=

-1.0 -0.5 0.0 0.5 1.0

-1.0

-0.5

0.0

0.5

1.0

Out[15]=

0.2 0.4 0.6 0.8

0.2

0.4

0.6

0.8

1.0

1.2

6 Maximo_descenso_optimizacion.nb