(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.1' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 40668, 1167]*) (*NotebookOutlinePosition[ 41992, 1204]*) (* CellTagsIndexPosition[ 41948, 1200]*) (*WindowFrame->Normal*) Notebook[{ Cell["Caos y conjuntos fractales", "Title"], Cell["\<\ F. Javier P\[EAcute]rez Gonz\[AAcute]lez Departamento de An\[AAcute]lisis Matem\[AAcute]tico Universidad de Granada\ \>", "Author", TextAlignment->Right, FontSize->12], Cell[CellGroupData[{ Cell["Introducci\[OAcute]n", "Section"], Cell[TextData[{ "En la primera parte de esta pr\[AAcute]ctica se estudia la manera de \ \"compilar funciones\" en ", StyleBox["Mathematica", FontSlant->"Italic"], " e investigamos las iteraciones de la funci\[OAcute]n log\[IAcute]stica y \ su relaci\[OAcute]n con el \"caos matem\[AAcute]tico\". Los ejemplos que se \ ponen deber\[IAcute]an ser suficientes para que aprendas a \"compilar \ funciones\" sencillas. En las dos \[UAcute]ltimas partes deber\[AAcute]s \ definir funciones compiladas para representar gr\[AAcute]ficamente conjuntos \ fractales obtenidos por iteraci\[OAcute]n de funciones complejas." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Compilar funciones. La funci\[OAcute]n log\[IAcute]stica. Caos matem\ \[AAcute]tico", "Section"], Cell[TextData[{ "Cuando definimos una funci\[OAcute]n de la forma usual en ", StyleBox["Mathematica", FontSlant->"Italic"], ", por ejemplo ", Cell[BoxData[ \(TraditionalForm\`f[x_] := x*\ Sin[1/x]\)]], ", dicha definici\[OAcute]n queda almacenada de forma que cuando le damos a \ ", Cell[BoxData[ \(TraditionalForm\`x\)]], " un valor particular ", StyleBox["Mathematica", FontSlant->"Italic"], " sustituye dicho valor en ", Cell[BoxData[ \(TraditionalForm\`x*Sin[1/x]\)]], ". El valor que le damos a ", Cell[BoxData[ \(TraditionalForm\`x\)]], " puede ser de muy variadada naturaleza; puede ser exacto o aproximado, \ entero, real o un complejo, una expresi\[OAcute]n simb\[OAcute]lica o una \ lista... ", StyleBox["Mathematica", FontSlant->"Italic"], " debe tener en cuenta todas estas posibilidades con el consiguiente coste \ en tiempo de c\[AAcute]lculo. Recuerda que en lenguajes como C o Fortran hay \ que declarar los tipos de variables que vamos a usar en cada proceso. En ", StyleBox["Mathematica", FontSlant->"Italic"], " tambi\[EAcute]n podemos hacer esto usando \ \"Compile[{{x,tipox},{y,tipoy},{z,tipoz},...},expr]\" que crea una \"funci\ \[OAcute]n compilada\" que contiene una sucesi\[OAcute]n de instrucciones muy \ simples escritas en un lenguaje pr\[OAcute]ximo al c\[OAcute]digo \ m\[AAcute]quina y eval\[UAcute]a \"expr\" para valores dados de los \ argumentos x,y,z,... de los cuales se especifica en cada caso su tipo. Esta \ forma de proceder es \[UAcute]til para definir funciones que deben realizar \ una gran cantidad de c\[AAcute]lculos n\[UAcute]mericos sencillos repetitivos \ o iterativos. Se trata de un procedimiento que ", StyleBox["Mathematica", FontSlant->"Italic"], " usa internamente en comandos que tienen que evaluar repetidamente una \ funci\[OAcute]n en muchos valores como, por ejemplo, Plot[ ] o NIntegrate[ ]. \ Estos comandos usan la opci\[OAcute]n \"Compile\". Veamos un bonito ejemplo \ del uso de \"Compile\" con la funci\[OAcute]n log\[IAcute]stica que tambi\ \[EAcute]n es un buen ejemplo de c\[OAcute]mo se trabaja con listas en ", StyleBox["Mathematica", FontSlant->"Italic"], "." }], "Text"], Cell[CellGroupData[{ Cell["La funci\[OAcute]n log\[IAcute]stica", "Subsection"], Cell[BoxData[ \(logistica = Compile[{{a, _Real}, {x, _Real}}, a*x*\((1 - x)\)]\)], "Input"], Cell[TextData[{ "Observa que las variables de la funci\[OAcute]n se ponen a la derecha \ encerradas entre llaves; la expresi\[OAcute]n {{a,_Real},{x,_Real}} le dice a \ ", StyleBox["Mathematica", FontSlant->"Italic"], " que \"logistica\" es una funci\[OAcute]n de dos variables que son de tipo \ \"Real\". Esta funci\[OAcute]n se usa igual que cualquier otra \ funci\[OAcute]n de dos variables." }], "Text"], Cell[BoxData[ \(logistica[ .2, 2.3]\)], "Input"], Cell[BoxData[ \(\(Plot[logistica[3. , x], {x, 0, 1}];\)\)], "Input"], Cell[BoxData[ \(\(Plot3D[logistica[a, x], {a, 0, 4}, {x, 0, 1}, Ticks \[Rule] None];\)\)], "Input"], Cell[TextData[{ "Hemos definido la \"funci\[OAcute]n log\[IAcute]stica\" ", Cell[BoxData[ \(TraditionalForm\`logistica[a, x] = a\ x\ \((1 - x)\)\)]], " donde se considera que ", Cell[BoxData[ \(TraditionalForm\`a\)]], " es un par\[AAcute]metro con valores", Cell[BoxData[ \(TraditionalForm\`\(\(\ \)\(0 < a \[LessEqual] 4\)\)\)]], " y la variable ", Cell[BoxData[ \(TraditionalForm\`x\)]], " se mueve en el intervalo ", Cell[BoxData[ \(TraditionalForm\`\([0, 1]\)\)]], ". Vamos a hacer iteraciones de esa funci\[OAcute]n para valores fijos del \ par\[AAcute]metro ", Cell[BoxData[ \(TraditionalForm\`a\)]], " en diferentes puntos del intervalo [0,1]. Fijafo un valor de ", Cell[BoxData[ \(TraditionalForm\`a\)]], ", la funci\[OAcute]n ", Cell[BoxData[ \(TraditionalForm\`x \[Rule] logistica[a, x]\)]], " puede representarse en la forma ", Cell[BoxData[ \(TraditionalForm\`logistica[a, #] &\)]], ". As\[IAcute] evitamos tener que definir de forma expl\[IAcute]cita la \ funci\[OAcute]n ", Cell[BoxData[ \(TraditionalForm\`x \[Rule] logistica[a, x]\)]], "." }], "Text"], Cell[BoxData[ \(\(\(\(prmtrfijo[a_Real]\)[m_List]\)\(:=\)\(Map[logistica[a, #] &, m]\)\(\ \)\( (*\ para\ un\ valor\ fijo\ de\ a\ calculamos\ los\ valores\ de\ la\ funci\ \[OAcute]n\ log\[IAcute]stica\ en\ los\ puntos\ de\ la\ lista\ m\ *) \)\)\)], \ "Input"], Cell[BoxData[ \(\(\(\(prmtrfijo[3.4]\)[Range[0. , 1. , .01]]\)\(\ \)\( (*\ dividimos\ [0, 1]\ en\ 100\ partes\ iguales\ y\ calculamos\ los\ valores\ de\ la\ \ funci\[OAcute]n\ log\[IAcute]stica\ para\ \[IndentingNewLine]a = 3.4\ en\ cada\ punto\ de\ la\ partici\[OAcute]n\ obtenida\ *) \ \)\)\)], "Input"], Cell[TextData[{ "Para calcular las iteraciones podemos usar el comando NestList[f,z,n] cuya \ salida es una lista cuyos elementos son las iteradas sucesivas de ", Cell[BoxData[ \(TraditionalForm\`f\)]], " sobre ", Cell[BoxData[ \(TraditionalForm\`z\)]], ", empezando en el valor inicial ", Cell[BoxData[ \(TraditionalForm\`z\)]], " y terminando en ", Cell[BoxData[ \(TraditionalForm\`\(f\^\([n]\)\)(z)\)]], " (el resultado de aplicar ", Cell[BoxData[ \(TraditionalForm\`f\)]], " n veces al valor ", Cell[BoxData[ \(TraditionalForm\`z\)]], "). Nuestro valor inicial de partida ser\[AAcute] una lista de valores de \ ", Cell[BoxData[ \(TraditionalForm\`x\)]], " a la que aplicaremos la funci\[OAcute]n prmtrfijo[ ] n veces. Nos vamos a \ quedar solamente con los \[UAcute]ltimos m elementos de la lista y le a\ \[NTilde]adimos la lista inicial al principio." }], "Text"], Cell[BoxData[ \(iteraciones[a_Real, L_List, n_Integer, m_Integer] := Prepend[Take[NestList[prmtrfijo[a], L, n], \(-m\)], L] /; n > m\)], "Input"], Cell["Aqu\[IAcute] puedes ver c\[OAcute]mo funciona.", "Text"], Cell[BoxData[ \(\(\(tmp = iteraciones[3.4, Range[0. , 1. , .2], 105, 5]\[IndentingNewLine] tmp\ // TableForm[#, TableHeadings -> {{\*"\"\<\!\(x\_0\)\>\"", \ \*"\"\<\!\(x\_101\)\>\"", \*"\"\<\!\(x\_102\)\>\"", \*"\"\<\!\(x\_103\)\>\"", \ \*"\"\<\!\(x\_104\)\>\"", \*"\"\<\!\(x\_105\)\>\""}, {}}] &\)\(\ \)\( (*\ adem\[AAcute]s\ de\ la\ lista\ inicial, Range[0. , 1. , .2], obtenemos\ otras\ 5\ listas\ con\ las\ iteraciones\ de\ \[OAcute]rdenes\ \ 101, 102, 103, 104\ y\ 105\ sobre\ cada\ punto\ de\ la\ lista\ inicial\ para\ el\ \ valor\ a = 3.4\ *) \)\)\)], "Input"], Cell["\<\ Vamos a transformar esta lista en otra apropiada para representarla gr\ \[AAcute]ficamente con ListPlot[ ]. Con el comando Transpose[ ] obtenemos una \ lista de listas con las iteradas de cada punto de la lista inicial.\ \>", "Text"], Cell[BoxData[{ \(tmp = Transpose[tmp]\), "\[IndentingNewLine]", \(tmp // TableForm[#, TableHeadings -> {{}, {\*"\"\<\!\(x\_0\)\>\"", \ \*"\"\<\!\(x\_101\)\>\"", \*"\"\<\!\(x\_102\)\>\"", \*"\"\<\!\(x\_103\)\>\"", \ \*"\"\<\!\(x\_104\)\>\"", \*"\"\<\!\(x\_105\)\>\""}}] &\)}], "Input"], Cell["\<\ Ahora convertimos cada lista en una lista de pares cuya primera componente es \ el primer elemento de dicha lista. Para ello aplicamos una regla de sustituci\ \[OAcute]n apropiada. Observa que tenemos que aplicar una regla de sustituci\ \[OAcute]n diferida. Despu\[EAcute]s disponemos todos los pares obtenidos en \ una lista (Flatten[lista,1]).\ \>", "Text"], Cell[BoxData[ \(tmp = Flatten[tmp /. x_?VectorQ :> Table[{x[\([1]\)], x[\([k]\)]}, {k, 2, Length[x]}], 1]\)], "Input"], Cell["\<\ Finalmente, eliminamos los pares que se repiten y ordenamos de menor a mayor \ con Union[ ] y obtenemos una lista de pares cuyos primeros elementos son los \ de la lista inicial y los segundos elementos son sus iteradas de \ \[OAcute]rdenes 101,102,103,104 y 105 (aunque no necesariamente en ese \ orden).\ \>", "Text"], Cell[BoxData[ \(tmp = \(\(Union[tmp]\)\(//\)\((NumberForm[#, 9] &\ )\)\( (*\ le\ pido\ a\ Mathematica\ que\ muestre\ 9\ decimales\ \ significativos\ de\ cada\ n\[UAcute]mero\ *) \)\(\ \)\)\)], "Input"], Cell["Podemos combinar los comando anteriores en uno solo", "Text"], Cell[BoxData[ \(listafinal[a_, n_, m_, p_] := Union[Flatten[ Transpose[iteraciones[a, Range[0. , 1. , N[1/p]], n, m]] /. x_?VectorQ :> Table[{x[\([1]\)], x[\([k]\)]}, {k, 2, Length[x]}], 1]]\)], "Input"], Cell["Comprobamos este comando.", "Text"], Cell[BoxData[ \(\((listafinal[3.4, 105, 5, 5] // NumberForm[#, 9] &\ )\) \[Equal] tmp\)], "Input"], Cell["Representamos la lista obtenida.", "Text"], Cell[BoxData[ \(\(\(ListPlot[listafinal[3.4, 105, 5, 5], PlotStyle \[Rule] {PointSize[0.015], Hue[0]}, \ PlotRange \[Rule] All];\)\(\ \)\)\)], "Input"], Cell["\<\ Las sucesiones obtenidas, salvo la primera y la \[UAcute]ltima que son la \ sucesi\[OAcute]n nula, son (a partir de un t\[EAcute]rmino en adelante) peri\ \[OAcute]dicas con per\[IAcute]odo 2 y repiten los valores 0.451963 y \ 0.842154 indefinidamente; y este comportamiento es independiente del punto de \ partida. Para convencernos de que esto es siempre as\[IAcute] vamos a repetir \ lo anterior haciendo m\[AAcute]s divisiones.\ \>", "Text"], Cell[BoxData[ \(\(\(ListPlot[listafinal[3.4, 200, 100, 100], PlotStyle \[Rule] {PointSize[0.01], Hue[0]}, \ PlotRange \[Rule] All]\)\(;\)\(\ \)\( (*\ dividimos\ en\ 100\ partes\ el\ intervalo\ [0, 1]\ en\ cada\ punto\ calculamos\ 200\ iteradas\ y\ nos\ quedamos\ \ con\ las\ 100\ \[UAcute]ltimas\ *) \)\)\)], "Input"], Cell[TextData[{ "La sucesi\[OAcute]n de las iteradas para el valor de", Cell[BoxData[ \(TraditionalForm\`\(\(\ \)\(a = 3.4\)\)\)]], " resulta ser (a partir de un t\[EAcute]rmino en adelante) una sucesi\ \[OAcute]n peri\[OAcute]dica con per\[IAcute]odo igual a 2 independientemente \ del valor inicial de partida ", Cell[BoxData[ \(TraditionalForm\`0 < x < 1\)]], ". Probemos a ver lo que pasa con otro valor pr\[OAcute]ximo del par\ \[AAcute]metro ", Cell[BoxData[ \(TraditionalForm\`a\)]], ". Pongamos ", Cell[BoxData[ \(TraditionalForm\`a = 3.5\)]], "." }], "Text"], Cell[BoxData[ \(\(\(ListPlot[listafinal[3.5, 200, 100, 100], PlotStyle \[Rule] {PointSize[0.01], Hue[0]}, PlotStyle \[Rule] AbsolutePointSize[0.0001], \ PlotRange \[Rule] All];\)\(\ \)\)\)], "Input"], Cell[TextData[{ "La sucesi\[OAcute]n de las iteradas para el valor de", Cell[BoxData[ \(TraditionalForm\`\(\(\ \)\(a = 3.5\)\)\)]], " resulta ser (a partir de un t\[EAcute]rmino en adelante) una sucesi\ \[OAcute]n peri\[OAcute]dica con per\[IAcute]odo igual a 4 independientemente \ del valor inicial de partida ", Cell[BoxData[ \(TraditionalForm\`0 < x < 1\)]], ". ", "Veamos lo que pasa si cambiamos un poquito el valor de ", Cell[BoxData[ \(TraditionalForm\`a\)]], " y tomamos", Cell[BoxData[ \(TraditionalForm\`\(\(\ \)\(a = \(\(3.7\)\(.\)\)\)\)\)]] }], "Text"], Cell[BoxData[ \(\(\(ListPlot[listafinal[3.7, 200, 100, 100], PlotStyle \[Rule] {PointSize[0.01], Hue[0]}, PlotStyle \[Rule] AbsolutePointSize[0.0001], \ PlotRange \[Rule] All];\)\(\ \)\)\)], "Input"], Cell[TextData[{ "\[DownExclamation]Sorpresa! La sucesi\[OAcute]n de iteradas ahora parece \ estar distribuida por todo el intervalo ", Cell[BoxData[ \(TraditionalForm\`\([0.25, 0.95]\)\)]], "de una forma ca\[OAcute]tica independientemente del valor inicial de \ partida ", Cell[BoxData[ \(TraditionalForm\`0 < x < 1\)]], ". Esto se llama \"caos\" matem\[AAcute]tico." }], "Text"], Cell[CellGroupData[{ Cell["El diagrama de bifurcaci\[OAcute]n", "Subsubsection"], Cell[TextData[{ "La siguiente celda contiene algunos comandos que he definido para \ representar el \"diagrama de bifurcaci\[OAcute]n\" que muestra las sucesiones \ de iteradas para distintos valores de ", Cell[BoxData[ \(TraditionalForm\`a\)]], ". Se trata de una curiosidad matem\[AAcute]tica y no es mi \ prop\[OAcute]sito que estudies los comandos que siguen. T\[OAcute]matelo como \ un juego. Ejecuta la celda y sigue adelante." }], "Text"], Cell[BoxData[{ \(bifurcacion[n_Integer, m_Integer, p_Integer, q_Integer] := Table[{a, Drop[iteraciones[a, Range[0. , 1. , N[1/p]], n, m], 1]}, {a, 0. , 4. , N[1/q]}] // Chop\), "\[IndentingNewLine]", \(diferentes[L_List] := Module[{lista = {}}, For[k = 1, k < Length[L], \(k++\), lista = Append[lista, If[MemberQ[lista, L[\([k]\)]] \[Equal] False, L[\([k]\)], {}]]]; Flatten[lista]]\), "\[IndentingNewLine]", \(lista[n_Integer, m_Integer, p_Integer, q_Integer] := Map[diferentes, Partition[ Flatten[bifurcacion[n, m, p, q], 3], \((p + 1)\)*m + 1]]\), "\[IndentingNewLine]", \(puntos[n_Integer, m_Integer, p_Integer, q_Integer] := Union[Flatten[ lista[n, m, p, q] /. x_?VectorQ :> If[Length[x] > 1, Table[{x[\([1]\)], x[\([k]\)]}, {k, 2, Length[x]}], {{x[\([1]\)], x[\([1]\)]}}], 1]]\)}], "Input"], Cell["Aqu\[IAcute] puedes ver el diagrama de bifurcaci\[OAcute]n.", "Text"], Cell[BoxData[ \(\(ListPlot[puntos[75, 25, 15, 50], PlotStyle \[Rule] {PointSize[0.001], Hue[0]}, \ PlotRange \[Rule] All, AxesLabel \[Rule] {"\", "\"}];\)\)], "Input"], Cell[TextData[{ "Lo que est\[AAcute]s viendo es una \"gr\[AAcute]fica\". Estamos \ representando en el eje de abscisas valores del par\[AAcute]metro ", Cell[BoxData[ \(TraditionalForm\`a\)]], " y para cada valor de ", Cell[BoxData[ \(TraditionalForm\`a\)]], " representamos en ordenadas los valores de la sucesi\[OAcute]n de iteradas \ correspondientes a dicho valor pero calculadas para distintos valores \ iniciales de ", Cell[BoxData[ \(TraditionalForm\`x \[Element] \(\(\([0, 1]\) . \ La\)\(\ \)\(gr\[AAcute]fica\)\(\ \)\(nos\)\(\ \)\(dice\)\(\ \ \)\(que\)\(\ \)\)\)]], "para valores del par\[AAcute]metro ", Cell[BoxData[ FormBox[Cell[TextData[Cell[BoxData[ \(TraditionalForm\`a \[Element] \([0, 1]\)\)]]]], TraditionalForm]]], "las iteradas convergen a 0 (independiente del valor inicial de partida en \ [0,1]); para a\[Element][1,2.9] la sucesi\[OAcute]n de iteradas converge a un \ l\[IAcute]mite (el mismo independientemente del valor inicial de partida en \ [0,1]); para valores de ", Cell[BoxData[ \(TraditionalForm\`a \[Element] \([3.1, 3.4]\)\)]], " la sucesi\[OAcute]n de iteradas resulta ser (a partir de un \ t\[EAcute]rmino en adelante) una sucesi\[OAcute]n peri\[OAcute]dica con per\ \[IAcute]odo igual a 2 (independientemente del valor inicial de partida ", Cell[BoxData[ \(TraditionalForm\`0 < x < 1\)]], "). Si ampl\[IAcute]as la gr\[AAcute]fica anterior podr\[AAcute]s encontrar \ intervalos de valores de ", Cell[BoxData[ \(TraditionalForm\`a\)]], " para los que la sucesi\[OAcute]n de iteradas resulta ser (a partir de un \ t\[EAcute]rmino en adelante) una sucesi\[OAcute]n peri\[OAcute]dica con per\ \[IAcute]odo igual a 4 (independientemente del valor inicial de partida ", Cell[BoxData[ \(TraditionalForm\`0 < x < 1\)]], "). Para valores de ", Cell[BoxData[ \(TraditionalForm\`a > 3.7\)]], "el comportamiento de la sucesi\[OAcute]n, independientemente del valor \ inicial de partida ", Cell[BoxData[ \(TraditionalForm\`0 < x < 1\)]], ", es ca\[OAcute]tio. " }], "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Compilar funciones", "Subsection"], Cell["\<\ Compilar la funci\[OAcute]n log\[IAcute]stica ha permitido hacer los c\ \[AAcute]lculos en muy poco tiempo.\ \>", "Text"], Cell[BoxData[ \(\(\(\(iteraciones[3.4, Range[0. , 1. , .01], 500, 100];\) // Timing\ (*\ estamos\ usando\ la\ funci\[OAcute]n\ 100 x500 = 50000\ veces\ *) \[IndentingNewLine] \(iteraciones[3.4, Range[0. , 1. , .001], 500, 100];\) // Timing\)\(\ \)\( (*\ estamos\ usando\ la\ funci\[OAcute]n\ 1000 x500 = 500000\ veces\ *) \)\)\)], "Input"], Cell["Si no compilamos el tiempo necesario es casi el doble.", "Text"], Cell[BoxData[ \(\(\(Clear[logistica]\[IndentingNewLine] logistica[a_, x_] = a*x*\((1 - x)\); \ (*\ definimos\ la\ funci\[OAcute]n\ sin\ compilar\ *) \[IndentingNewLine]\(\ \(iteraciones[3.4, Range[0. , 1. , .01], 500, 100];\)\(//\)\(Timing\)\(\ \)\( (*\ estamos\ usando\ la\ funci\[OAcute]n\ sin\ compilar\ 100 x500 = 50000\ veces\ *) \)\)\n \(iteraciones[3.4, Range[0. , 1. , .001], 500, 100];\) // Timing\)\(\ \)\( (*\ estamos\ usando\ la\ funci\[OAcute]n\ sin\ compilar\ 1000 x500 = 500000\ veces\ *) \)\)\)], "Input"], Cell[BoxData[ \(Clear["\"]\)], "Input"], Cell[TextData[{ "\"Compile\" supone por defecto que sus argumentos son n\[UAcute]meros \ reales con precisi\[OAcute]n m\[AAcute]quina. Podemos compilar cuatro tipos \ de variables _Integer, _Real, _Complex y True ", StyleBox["|", FontWeight->"Bold"], " False. Aqu\[IAcute] tienes un ejemplo con una variable booleana." }], "Text"], Cell[BoxData[ \(\(\(sumdifcond\)\(=\)\(Compile[{{x, True | False}, {y, _Integer}, {z, _Integer}}, If[x, z + y, z - y]]\)\( (*\ en\ este\ c\[OAcute]digo\ x\ es\ una\ variable\ que\ puede\ tener\ el\ \ valor\ True\ o\ el\ valor\ False . \ Si\ x = True\ la\ funci\[OAcute]n\ devuelve\ z + y; \ si\ x = False\ devuelve\ z - y\ *) \)\)\)], "Input"], Cell[BoxData[ \(sumdifcond[True, 5, 8]\)], "Input"], Cell[TextData[{ "Los siguientes ejemplos permiten apreciar la diferencia entre compilar o \ no una funci\[OAcute]n. El primer comando calcula la suma de Riemann de una \ funci\[OAcute]n f en un intervalo [a,b] que se divide en n partes iguales \ evaluando la funci\[OAcute]n en el punto medio de cada intervalo. El segundo \ comando hace lo mismo con la diferencia de que se compila la funci\[OAcute]n \ antes de evaluarla y tambi\[EAcute]n se compila el propio comando. Aplicamos \ estos comandos a la funci\[OAcute]n ", Cell[BoxData[ \(TraditionalForm\`g(x) = \((1/x)\)\ \(cos(1/x)\)\)]], " en el intervalo [.01,1] al que dividimos en 100000 partes iguales. \ Observa la notable diferencia en los tiempos de ejecuci\[OAcute]n." }], "Text"], Cell[BoxData[{ \(\(f[x_] = Cos[1/x]/x;\)\), "\[IndentingNewLine]", \(\(fc = Compile[{{x, _Real}}, Cos[1/x]/x];\)\), "\[IndentingNewLine]", \(\(Sriemann[a_, b_, n_] := Module[{inc = N[\((b - a)\)/n]}, Sum[f[a + 0.5*inc + k*inc], {k, 0, n - 1}]* inc];\)\), "\[IndentingNewLine]", \(\(SCPriemann = Compile[{{a, _Real}, {b, _Real}, {n, _Integer}}, Module[{inc = N[\((b - a)\)/n]}, Sum[fc[a + 0.5*inc + k*inc], {k, 0, n - 1}]* inc]];\)\), "\[IndentingNewLine]", \(Sriemann[0.01, 1. , 100000] // Timing\), "\n", \(SCPriemann[0.01, 1. , 100000] // Timing\)}], "Input"], Cell[TextData[{ "El uso de \"Compile\" est\[AAcute] especialmente indicado cuando hay que \ hacer operaciones repetitivas sencillas que no se prestan al manejo de \ listas. La siguiente funci\[OAcute]n calcula el primer natural n tal que la \ suma ", Cell[BoxData[ \(TraditionalForm\`\(1 + 1/2 + 1/3 + ... \) 1/n\)]], " es mayor que un n\[UAcute]mero positivo dado ", Cell[BoxData[ \(TraditionalForm\`x\)]], ". Como esas sumas crecen muy lentamente hay que realizar un gran \ n\[UAcute]mero de c\[AAcute]lculos. Observa la gran diferencia entre compilar \ el c\[OAcute]digo o no hacerlo." }], "Text"], Cell[BoxData[ \(\(\(primerasuma[x_] := Module[{n = 1, s = 1. }, While[s \[LessEqual] x, n = n + 1; s = s + N[1/n]]; n]\ (*\ c\[OAcute]digo\ no\ compilado\ *) \[IndentingNewLine] \(\(\(CPprimerasuma = Compile[{{x, _Real}}, Module[{n = 1, s = 1. }, While[s \[LessEqual] x, n = n + 1; s = s + N[1/n]]; n]]\)\(\ \)\);\)\)\( (*\ c\[OAcute]digo\ compilado\ *) \)\)\)], "Input"], Cell[BoxData[{ \(primerasuma[12] // Timing\), "\[IndentingNewLine]", \(CPprimerasuma[12] // Timing\)}], "Input"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Los conjuntos de Julia y de Mandelbrot", "Section"], Cell[TextData[{ "Los fractales m\[AAcute]s conocidos son los conjuntos de Julia y de \ Mandelbrot. Es muy f\[AAcute]cil generar dichos conjuntos usando \ n\[UAcute]meros complejos. Para cada n\[UAcute]mero complejo ", Cell[BoxData[ FormBox[ StyleBox["c", FontWeight->"Bold"], TraditionalForm]]], " definamos la funci\[OAcute]n ", Cell[BoxData[ FormBox[ StyleBox[\(\(f\_c\) : \[DoubleStruckCapitalC]\[LongRightArrow]\ \[DoubleStruckCapitalC]\), FontWeight->"Bold"], TraditionalForm]]], " por ", Cell[BoxData[ FormBox[ StyleBox[\(\(f\_c\)(z) = z\^2 + c\), FontWeight->"Bold"], TraditionalForm]]], " para todo ", Cell[BoxData[ FormBox[ StyleBox[\(z\ \[Element] \ \[DoubleStruckCapitalC]\), FontWeight->"Bold"], TraditionalForm]]], ". El", StyleBox[" conjunto de Julia", FontWeight->"Bold"], " asociado al n\[UAcute]mero complejo ", Cell[BoxData[ FormBox[ StyleBox["c", FontWeight->"Bold"], TraditionalForm]]], " se define como el conjunto ", Cell[BoxData[ FormBox[ StyleBox[\(J(c)\), FontWeight->"Bold"], TraditionalForm]]], " de los n\[UAcute]meros complejos ", Cell[BoxData[ FormBox[ StyleBox["z", FontWeight->"Bold"], TraditionalForm]]], " tales que la sucesi\[OAcute]n definida por ", Cell[BoxData[ FormBox[ StyleBox[\(z\_0 = z, \ z\_n = \(z\_\(n - 1\)\%2 + c = \(f\_c\)(z\_\(n - 1\))\)\), FontWeight->"Bold"], TraditionalForm]]], " est\[AAcute] acotada (algunos autores llaman conjunto de Julia", StyleBox[" a la frontera", FontWeight->"Bold", FontSlant->"Italic"], " de ", Cell[BoxData[ FormBox[ StyleBox[\(J(c)\), FontWeight->"Bold"], TraditionalForm]]], "). El conjunto de Mandelbrot es el conjunto de los n\[UAcute]meros \ complejos ", Cell[BoxData[ FormBox[ StyleBox["c", FontWeight->"Bold"], TraditionalForm]]], " tales que la sucesi\[OAcute]n definida por ", Cell[BoxData[ FormBox[ StyleBox[\(z\_0 = 0, \ z\_n = \(z\_\(n - 1\)\%2 + c = \(f\_c\)(z\_\(n - 1\))\)\), FontWeight->"Bold"], TraditionalForm]]], " est\[AAcute] acotada. En otros t\[EAcute]rminos, el conjunto de \ Mandelbrot es el conjunto de los n\[UAcute]meros complejos ", Cell[BoxData[ FormBox[ StyleBox["c", FontWeight->"Bold"], TraditionalForm]]], " tales que ", Cell[BoxData[ FormBox[ StyleBox[\(0 \[Element] J(c)\), FontWeight->"Bold"], TraditionalForm]]], ". \nPara representar la sucesi\[OAcute]n ", Cell[BoxData[ FormBox[ StyleBox[\(z\_0 = z, \ z\_n = \(z\_\(n - 1\)\%2 + c = \(f\_c\)(z\_\(n - 1\))\)\), FontWeight->"Bold"], TraditionalForm]]], " suele usarse la notaci\[OAcute]n ", Cell[BoxData[ FormBox[ StyleBox[\(z\_n = \(f\_c\%\((n)\)\)(z)\), FontWeight->"Bold"], TraditionalForm]]], ", con el convenio de que ", Cell[BoxData[ \(TraditionalForm\`z\_0 = \(\(f\_c\%\((0)\)\)(z) = z\)\)], FontWeight->"Bold"], ". Esta sucesi\[OAcute]n se llama la ", StyleBox["\[OAcute]rbita", FontWeight->"Bold"], " de ", Cell[BoxData[ FormBox[ StyleBox["z", FontWeight->"Bold"], TraditionalForm]]], " por ", Cell[BoxData[ FormBox[ StyleBox[\(f\_c\), FontWeight->"Bold"], TraditionalForm]]], " y sus elementos se obtienen iterando sucesivamente la funci\[OAcute]n ", Cell[BoxData[ FormBox[ StyleBox[\(f\_c\), FontWeight->"Bold"], TraditionalForm]]], " partiendo del valor inicial ", Cell[BoxData[ FormBox[ StyleBox["z", FontWeight->"Bold"], TraditionalForm]]], ". La notaci\[OAcute]n ", Cell[BoxData[ FormBox[ StyleBox[\(f\_c\%\((n)\)\), FontWeight->"Bold"], TraditionalForm]]], "representa la composici\[OAcute]n de la funci\[OAcute]n ", Cell[BoxData[ FormBox[ StyleBox[\(f\_c\), FontWeight->"Bold"], TraditionalForm]]], " consigo misma ", StyleBox["n", FontWeight->"Bold", FontSlant->"Italic"], " veces.\nEs sabido que si", StyleBox[" ", FontWeight->"Bold"], StyleBox["|c|\[LessEqual]2", FontWeight->"Bold", FontSlant->"Italic"], " y", StyleBox[" z\[Element] J(c), ", FontWeight->"Bold", FontSlant->"Italic"], "entonces", StyleBox[" ", FontWeight->"Bold", FontSlant->"Italic"], "la \[OAcute]rbita de ", Cell[BoxData[ FormBox[ StyleBox["z", FontWeight->"Bold"], TraditionalForm]]], " por ", Cell[BoxData[ FormBox[ StyleBox[\(f\_c\), FontWeight->"Bold"], TraditionalForm]]], " est\[AAcute] contenida en el disco cerrado de centro 0 y radio 2 y, en \ particular, ", StyleBox["|z|\[LessEqual]2.", FontWeight->"Bold", FontSlant->"Italic"], " Tambi\[EAcute]n es sabido que el conjunto de Mandelbrot est\[AAcute] \ contenido en el disco cerrado de centro 0 y radio 2 y si un punto ", StyleBox["c", FontWeight->"Bold", FontSlant->"Italic"], StyleBox[" ", FontSlant->"Italic"], "est\[AAcute] en el conjunto de Mandelbrot, entonces ", StyleBox[" ", FontWeight->"Bold", FontSlant->"Italic"], "la \[OAcute]rbita de ", Cell[BoxData[ FormBox[ StyleBox["0", FontWeight->"Bold"], TraditionalForm]]], " por ", Cell[BoxData[ FormBox[ StyleBox[\(f\_c\), FontWeight->"Bold"], TraditionalForm]]], " est\[AAcute] contenida en el disco cerrado de centro 0 y radio 2." }], "Text"], Cell[CellGroupData[{ Cell["Ejercicio 1", "Exercise"], Cell[TextData[{ "Define una funci\[OAcute]n compilada \"", Cell[BoxData[ \(TraditionalForm\`Julia\)]], "\" de dos argumentos complejos ", Cell[BoxData[ FormBox[ StyleBox[\(z, \ c\), FontWeight->"Bold"], TraditionalForm]]], ", que calcule t\[EAcute]rminos de la \[OAcute]rbita de ", Cell[BoxData[ FormBox[ StyleBox["z", FontWeight->"Bold"], TraditionalForm]]], " por ", Cell[BoxData[ FormBox[ StyleBox[\(f\_c\), FontWeight->"Bold"], TraditionalForm]]], ". El proceso se detiene si se encuentra un t\[EAcute]rmino de dicha \ \[OAcute]rbita con m\[OAcute]dulo mayor que 2 y en otro caso contin\[UAcute]a \ hasta calcular el t\[EAcute]rmino 40 de la \[OAcute]rbita ", Cell[BoxData[ FormBox[ RowBox[{"(", StyleBox[\(z\_40\), FontWeight->"Bold"], ")"}], TraditionalForm]]], ". L", StyleBox["a salida de esta funci\[OAcute]n debe ser", FontSlant->"Italic"], " ", StyleBox["el n\[UAcute]mero de iteraciones", FontSlant->"Italic"], " ", StyleBox["que realiza.", FontSlant->"Italic"], " \nUsa el comando DensityPlot", Cell[BoxData[ \(TraditionalForm\`\([f, \ {x, \ xmin, \ xmax}, \ {y, \ ymin, \ ymax}]\)\)]], " con opciones (PlotPoint, Mesh) y una funci\[OAcute]n de color apropiadas \ para representar la funci\[OAcute]n \"Julia[x + I y,c]\" para valores de ", StyleBox["c", FontWeight->"Bold", FontSlant->"Italic"], " iguales a -0.5, -1, ", Cell[BoxData[ \(TraditionalForm\`0.360284\ + \ 0.100376\ \[ImaginaryI]\)]], ", ", Cell[BoxData[ \(TraditionalForm\`\(-0.122\)\ + \ 0.745\ \[ImaginaryI]\)]], " .\n", StyleBox["Observaci\[OAcute]n", FontWeight->"Bold"], ": Si ", Cell[BoxData[ FormBox[ StyleBox[\(z \[Element] \ J(c)\), FontWeight->"Bold"], TraditionalForm]]], " entonces ", Cell[BoxData[ \(TraditionalForm\`Julia[z, c] = 40\)]], ". Es posible que para algunos valores \"raros\" de ", StyleBox["z", FontWeight->"Bold", FontSlant->"Italic"], " sean necesarias m\[AAcute]s de 40 iteraciones para saber si est\[AAcute]n \ o no en el conjunto de Julia, para tales valores podr\[IAcute]a ocurrir que \ ", Cell[BoxData[ \(TraditionalForm\`Julia[z, c] = 40\)]], " pero ", Cell[BoxData[ FormBox[ StyleBox[\(z\ \[NotElement] J(c)\), FontWeight->"Bold"], TraditionalForm]]], ". El conjunto de estos valores \"raros\" es tan peque\[NTilde]o que no \ afecta realmente al aspecto final del conjunto. " }], "ExerciseText"] }, Open ]], Cell[CellGroupData[{ Cell["Ejercicio 2", "Exercise"], Cell["\<\ Usando la funci\[OAcute]n \"Julia[]\" de forma adecuada representa \ gr\[AAcute]ficamente el conjunto de Mandelbrot.\ \>", "ExerciseText"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Aproximaci\[OAcute]n de ra\[IAcute]ces complejas por el m\[EAcute]todo \ de Newton", "Section"], Cell[TextData[{ "Como seguramente ya sabes, el m\[EAcute]todo de Newton es una \ t\[EAcute]cnica frecuentemente usada para calcular soluciones de una ecuaci\ \[OAcute]n ", Cell[BoxData[ FormBox[ StyleBox[\(f(z) = 0\), FontWeight->"Bold"], TraditionalForm]]], ". Para ello, se elige un valor inicial ", Cell[BoxData[ FormBox[ StyleBox[\(z\_1\), FontWeight->"Bold"], TraditionalForm]]], " y, a partir de \[EAcute]l, se forma la sucesi\[OAcute]n definida por", StyleBox[" ", FontWeight->"Bold"], Cell[BoxData[ FormBox[ RowBox[{\(z\_\(n + 1\)\), "=", RowBox[{\(z\_n\), "-", StyleBox[\(\(f(z\_n)\)\/\(f\ ' \((z\_n)\)\)\), FontSize->16]}]}], TraditionalForm]], FontWeight->"Bold"], ". Si dicha sucesi\[OAcute]n converge, su l\[IAcute]mite es una soluci\ \[OAcute]n de la ", "ecuaci\[OAcute]n ", Cell[BoxData[ FormBox[ StyleBox[\(f(z) = 0\), FontWeight->"Bold"], TraditionalForm]]], ".", " Naturalmente, cuando hay m\[AAcute]s de una soluci\[OAcute]n, la elecci\ \[OAcute]n del valor inicial determina a cu\[AAcute]l de ellas converge el \ proceso. \n", StyleBox["Mathematica", FontSlant->"Italic"], " tiene un comando \"FindRoot[f(z)=0,{z,a}]\" que utiliza precisamente el m\ \[EAcute]todo de Newton para calcular soluciones de la ", "ecuaci\[OAcute]n ", Cell[BoxData[ FormBox[ StyleBox[\(f(z) = 0\), FontWeight->"Bold"], TraditionalForm]]], " a partir del valor inicial ", Cell[BoxData[ FormBox[ StyleBox[\(z = a\), FontWeight->"Bold"], TraditionalForm]]], ". Eval\[UAcute]a la siguiente celda." }], "Text"], Cell[BoxData[ \(FindRoot[z\^2 + 1 \[Equal] 0, {z, 0.5}]\)], "Input"], Cell[TextData[{ "\[DownQuestion]Sabes por qu\[EAcute] ha fallado el m\[EAcute]todo en este \ caso particular? F\[IAcute]jate en c\[OAcute]mo se van obteniendo las \ aproximaciones sucesivas ", Cell[BoxData[ FormBox[ RowBox[{\(z\_\(n + 1\)\), "=", RowBox[{\(z\_n\), "-", StyleBox[\(\(f(z\_n)\)\/\(f\ ' \((z\_n)\)\)\), FontSize->16]}]}], TraditionalForm]], FontWeight->"Bold"], ". Es evidente que, para ", Cell[BoxData[ FormBox[ RowBox[{ StyleBox[\(f(z)\), FontWeight->"Bold"], StyleBox["=", FontWeight->"Bold"], RowBox[{ StyleBox[\(z\^2\), FontWeight->"Bold"], StyleBox["+", FontWeight->"Bold"], StyleBox["1", FontWeight->"Bold"], " "}]}], TraditionalForm]]], "partiendo de un valor real obtenemos siempre valores reales por lo que el \ m\[EAcute]todo no puede proporcionarnos las ra\[IAcute]ces de ", Cell[BoxData[ FormBox[ StyleBox[\(z\^2 + 1\ = 0\), FontWeight->"Bold"], TraditionalForm]]], " que son complejas. Repite con una ligera variante." }], "Text"], Cell[BoxData[ \(FindRoot[z\^2 + 1 \[Equal] 0, {z, 0.5 + 0.1 \[ImaginaryI]}]\)], "Input"], Cell[TextData[{ "Ahora ", StyleBox["Mathematica", FontSlant->"Italic"], " ha calculado la soluci\[OAcute]n ", Cell[BoxData[ FormBox[ StyleBox[\(z = \[ImaginaryI]\), FontWeight->"Bold"], TraditionalForm]]], StyleBox[" ", FontWeight->"Bold"], "con gran precisi\[OAcute]n. Observa ahora el efecto de cambiar un poco el \ valor inicial." }], "Text"], Cell[BoxData[ \(FindRoot[z\^2 + 1 \[Equal] 0, {z, 0.5 - 0.1 \[ImaginaryI]}]\)], "Input"], Cell[CellGroupData[{ Cell["Ejercicio 3", "Exercise"], Cell[TextData[{ "Aplicando el m\[EAcute]todo de Newton a ", Cell[BoxData[ \(TraditionalForm\`f \((z)\) = z\^2 + 1\)]], " escribe un programa que, partiendo del valor inical ", Cell[BoxData[ FormBox[ RowBox[{" ", RowBox[{ RowBox[{ FormBox[\(\(z\_0\)\(=\)\), "TraditionalForm"], "0.5"}], "+", \(0.1 \[ImaginaryI]\)}]}], TraditionalForm]]], ", imprima una tabla de 3 columnas en las que aparezcan, respectivamente, \ la iteraci\[OAcute]n ", Cell[BoxData[ FormBox[ StyleBox["k", FontWeight->"Bold"], TraditionalForm]]], ", la aproximaci\[OAcute]n ", Cell[BoxData[ \(TraditionalForm\`z\_k\)], FontWeight->"Bold"], " y el correspondiente valor de la funci\[OAcute]n ", Cell[BoxData[ FormBox[ StyleBox[\(\((z\_k)\)\^2 + 1\), FontWeight->"Bold"], TraditionalForm]]], " para k=1,2,...,10." }], "ExerciseText"], Cell[TextData[{ "Como puedes ver ", StyleBox["Mathematica", FontSlant->"Italic"], " aplica el m\[EAcute]todo de Newton para calcular ra\[IAcute]ces tanto \ reales como complejas. Ahora bien, la intrepretaci\[OAcute]n del \ m\[EAcute]todo en el caso del c\[AAcute]lculo de ra\[IAcute]ces reales no \ tiene sentido en el caso complejo. En el caso real, el punto ", Cell[BoxData[ FormBox[ StyleBox[\(z\_\(n + 1\)\), FontWeight->"Bold"], TraditionalForm]]], StyleBox[" ", FontWeight->"Bold"], "se obtiene como el punto de corte de la recta tangente a la curva ", Cell[BoxData[ FormBox[ StyleBox[\(y = f(z)\), FontWeight->"Bold"], TraditionalForm]]], " en el punto", StyleBox[" ", FontWeight->"Bold"], Cell[BoxData[ \(TraditionalForm\`\((z\_n, f(z\_n))\)\)], FontWeight->"Bold"], " con el eje de abscisas y se conocen condiciones precisas que garantizan \ la convergencia del m\[EAcute]todo. Lo que ocurre en el caso complejo puede \ ser ", StyleBox["mucho m\[AAcute]s complicado", FontSlant->"Italic"], " como vas a ver. " }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Ejercicio 4", "Exercise"], Cell[TextData[{ "Define una funci\[OAcute]n compilada que, partiendo de un valor inicial ", Cell[BoxData[ FormBox[ RowBox[{" ", StyleBox[\(z = x + \[ImaginaryI]\ y\), FontWeight->"Bold"]}], TraditionalForm]]], StyleBox[", ", FontWeight->"Bold"], "calcule las sucesivas iteraciones del m\[EAcute]todo de Newton para \ aproximar una soluci\[OAcute]n de ", Cell[BoxData[ FormBox[ StyleBox[\(z\^3 + 1 = 0\), FontWeight->"Bold"], TraditionalForm]]], " y que se pare si en alg\[UAcute]n paso el valor obtenido de ", Cell[BoxData[ FormBox[ StyleBox[\(\(z\)\(\ \ \)\), FontWeight->"Bold"], TraditionalForm]]], "verifica que ", Cell[BoxData[ FormBox[ StyleBox[\(\(|\)\(z\^3 + 1\)\(|\)\(\(\[LessEqual]\)\(0.001\)\)\), FontWeight->"Bold"], TraditionalForm]]], " o si ha llegado a la iteraci\[OAcute]n n\[UAcute]mero cincuenta. Puede \ ser conveniente tomar precauciones para no dividir por cero. Si la \ ra\[IAcute]z a la que converge el m\[EAcute]todo es", StyleBox[" -1", FontWeight->"Bold"], " le asignamos a ", StyleBox["z", FontWeight->"Bold", FontSlant->"Italic"], " el valor", StyleBox[" 0.15", FontWeight->"Bold"], ", si es ", StyleBox["0.5 + 0.866 \[ImaginaryI] ", FontWeight->"Bold"], "le asignamos el valor ", StyleBox["0.5", FontWeight->"Bold"], " y si es ", StyleBox["0.5 - 0.866 \[ImaginaryI] ", FontWeight->"Bold"], "el valor ", StyleBox["0.9", FontWeight->"Bold"], ". La raz\[OAcute]n de estos valores es que vamos a usarlos despu\[EAcute]s \ para aplicarles la funci\[OAcute]n de color \"Hue\". El color Hue[0.15] es \ amarillo, el Hue[0.5] es azul y el Hue[0.9] es rojo. De esta forma, los \ puntos que convergen a la ra\[IAcute]z ", StyleBox["-1", FontWeight->"Bold"], " se colorean de amarillo, los que convergen a la ra\[IAcute]z ", Cell[BoxData[ StyleBox[\(1\/2 + \(\[ImaginaryI]\ \@3\)\/2\), FontWeight->"Bold"]]], "se colorean de azul y los que convergen a la ra\[IAcute]z ", Cell[BoxData[ StyleBox[\(1\/2 - \(\[ImaginaryI]\ \@3\)\/2\), FontWeight->"Bold"]]], "se colorean de rojo. Finalmente usa DensityPlot para representar la funci\ \[OAcute]n en el intervalo [-2,2]x[-2,2] con las opciones apropiadas para \ optimizar la gr\[AAcute]fica. " }], "ExerciseText"] }, Open ]] }, Open ]] }, FrontEndVersion->"5.1 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 685}}, WindowSize->{1016, 635}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, PageHeaders->{{Cell[ TextData[ "F. Javier P\[EAcute]rez Gonz\[AAcute]lez\nDpto. An\[AAcute]lisis \ Matem\[AAcute]tico - Universidad de Granada"], "Header"], Cell[ TextData[ { CounterBox[ "Page"]}], "PageNumber"], Cell[ TextData[ "Caos y conjuntos fractales"], "Header"]}, {Cell[ TextData[ "F. Javier P\[EAcute]rez Gonz\[AAcute]lez\nDpto. An\[AAcute]lisis \ Matem\[AAcute]tico - Universidad de Granada"], "Header"], Cell[ TextData[ { CounterBox[ "Page"]}], "PageNumber"], Cell[ TextData[ "Caos y conjuntos fractales"], "Header"]}}, Magnification->1.25, StyleDefinitions -> "Classroom.nb" ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[1754, 51, 43, 0, 83, "Title"], Cell[1800, 53, 181, 6, 90, "Author"], Cell[CellGroupData[{ Cell[2006, 63, 39, 0, 77, "Section"], Cell[2048, 65, 632, 11, 75, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[2717, 81, 102, 1, 77, "Section"], Cell[2822, 84, 2234, 49, 222, "Text"], Cell[CellGroupData[{ Cell[5081, 137, 58, 0, 64, "Subsection"], Cell[5142, 139, 102, 2, 60, "Input"], Cell[5247, 143, 417, 9, 77, "Text"], Cell[5667, 154, 52, 1, 60, "Input"], Cell[5722, 157, 72, 1, 60, "Input"], Cell[5797, 160, 112, 2, 60, "Input"], Cell[5912, 164, 1169, 34, 99, "Text"], Cell[7084, 200, 280, 5, 103, "Input"], Cell[7367, 207, 339, 6, 125, "Input"], Cell[7709, 215, 940, 27, 99, "Text"], Cell[8652, 244, 165, 3, 81, "Input"], Cell[8820, 249, 62, 0, 34, "Text"], Cell[8885, 251, 624, 12, 190, "Input"], Cell[9512, 265, 243, 4, 55, "Text"], Cell[9758, 271, 311, 6, 125, "Input"], Cell[10072, 279, 369, 6, 77, "Text"], Cell[10444, 287, 149, 4, 60, "Input"], Cell[10596, 293, 329, 6, 77, "Text"], Cell[10928, 301, 216, 3, 125, "Input"], Cell[11147, 306, 67, 0, 34, "Text"], Cell[11217, 308, 248, 5, 103, "Input"], Cell[11468, 315, 41, 0, 34, "Text"], Cell[11512, 317, 109, 2, 60, "Input"], Cell[11624, 321, 48, 0, 34, "Text"], Cell[11675, 323, 173, 3, 81, "Input"], Cell[11851, 328, 454, 7, 77, "Text"], Cell[12308, 337, 353, 6, 125, "Input"], Cell[12664, 345, 609, 17, 77, "Text"], Cell[13276, 364, 230, 4, 81, "Input"], Cell[13509, 370, 607, 16, 77, "Text"], Cell[14119, 388, 230, 4, 81, "Input"], Cell[14352, 394, 401, 10, 55, "Text"], Cell[CellGroupData[{ Cell[14778, 408, 59, 0, 55, "Subsubsection"], Cell[14840, 410, 457, 9, 77, "Text"], Cell[15300, 421, 1016, 21, 341, "Input"], Cell[16319, 444, 75, 0, 34, "Text"], Cell[16397, 446, 213, 4, 81, "Input"], Cell[16613, 452, 2132, 48, 229, "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[18794, 506, 40, 0, 65, "Subsection"], Cell[18837, 508, 132, 3, 34, "Text"], Cell[18972, 513, 398, 8, 125, "Input"], Cell[19373, 523, 70, 0, 34, "Text"], Cell[19446, 525, 599, 11, 168, "Input"], Cell[20048, 538, 54, 1, 60, "Input"], Cell[20105, 541, 340, 7, 55, "Text"], Cell[20448, 550, 398, 7, 146, "Input"], Cell[20849, 559, 55, 1, 60, "Input"], Cell[20907, 562, 753, 12, 120, "Text"], Cell[21663, 576, 669, 13, 233, "Input"], Cell[22335, 591, 623, 13, 99, "Text"], Cell[22961, 606, 464, 10, 146, "Input"], Cell[23428, 618, 121, 2, 81, "Input"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[23598, 626, 57, 0, 77, "Section"], Cell[23658, 628, 5701, 183, 298, "Text"], Cell[CellGroupData[{ Cell[29384, 815, 31, 0, 56, "Exercise"], Cell[29418, 817, 2621, 78, 244, "ExerciseText"] }, Open ]], Cell[CellGroupData[{ Cell[32076, 900, 31, 0, 56, "Exercise"], Cell[32110, 902, 148, 3, 34, "ExerciseText"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[32307, 911, 101, 1, 77, "Section"], Cell[32411, 914, 1725, 49, 164, "Text"], Cell[34139, 965, 72, 1, 60, "Input"], Cell[34214, 968, 1203, 33, 89, "Text"], Cell[35420, 1003, 93, 1, 60, "Input"], Cell[35516, 1006, 389, 13, 34, "Text"], Cell[35908, 1021, 93, 1, 60, "Input"], Cell[CellGroupData[{ Cell[36026, 1026, 31, 0, 56, "Exercise"], Cell[36060, 1028, 963, 29, 77, "ExerciseText"], Cell[37026, 1059, 1130, 31, 120, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[38193, 1095, 31, 0, 56, "Exercise"], Cell[38227, 1097, 2413, 66, 238, "ExerciseText"] }, Open ]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)