(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 7.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 37956, 1219] NotebookOptionsPosition[ 34353, 1105] NotebookOutlinePosition[ 34913, 1130] CellTagsIndexPosition[ 34842, 1125] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["INTERPOLACI\[CapitalOAcute]N NUM\[CapitalEAcute]RICA.", "Title", CellChangeTimes->{3.506340078859375*^9}, TextAlignment->Center, TextJustification->0, FontSize->18, Background->None], Cell[CellGroupData[{ Cell[" El comando InterpolatingPolinomial.", "Section"], Cell[TextData[{ "Este comando permite obtener el polinomio de interpolaci\[OAcute]n tomando \ como argumento una lista con las coordenadas (abscisas y ordenadas) de los \ puntos por los que tiene que pasar exactamente el polinomio de interpolaci\ \[OAcute]n. El resultado que se obtiene es una funci\[OAcute]n que se puede \ evaluar en cualquier punto y representar gr\[AAcute]ficamente. Tiene la forma \ correspondiente al polinomio de interpolaci\[OAcute]n de Newton con \ diferencias divididas. La forma b\[AAcute]sica de este comando es la \ siguiente:\n\tInterpolatingPolynomial[datos, var]. ", StyleBox[" ", FontFamily->"Courier New", FontSize->10] }], "Text", CellChangeTimes->{{3.5075647885416555`*^9, 3.5075647931354055`*^9}}], Cell[TextData[{ "Ejemplo: Dada la siguiente tabla ,\n", Cell[BoxData[ TagBox[GridBox[{ {"\<\"\\!\\(x\\_i\\)\"\>", "0", "1", "2", "3", "4"}, {"\<\"\\!\\(f\\_i\\)\"\>", RowBox[{"-", "5"}], "1", "9", "25", "55"} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[2.0999999999999996`]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], TableForm[#, TableHeadings -> {{"\!\(x\_i\)", "\!\(f\_i\)"}, None}]& ]]], "\nSe pide: \n1\.ba.- Obtener en primer lugar el polinomio de interpolaci\ \[OAcute]n correspondiente, y representarlo junto con los datos.\n2\.ba.- \ Obtener un valor aproximado de f(1.5) mediante un polinomio de interpolaci\ \[OAcute]n de 2\.ba grado.Representar este polinomio junto con los datos.\n3\ \.ba.- Idem. para obtener un valor aproximado de f(3.5) mediante un polinomio \ de interpolaci\[OAcute]n de tercer grado ." }], "Text", TextAlignment->Left, TextJustification->0], Cell[BoxData[ RowBox[{ RowBox[{"datos", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", "5"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "25"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "55"}], "}"}]}], "}"}]}], ";", RowBox[{"TableForm", "[", RowBox[{ RowBox[{"Transpose", "[", "datos", "]"}], ",", RowBox[{"TableHeadings", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "\"\<\!\(\*SubscriptBox[\(x\), \(i\)]\)\>\"", ",", "\"\<\!\(\*SubscriptBox[\(f\), \(i\)]\)\>\""}], "}"}], ",", "None"}], "}"}]}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"datos", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", "5"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "25"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "55"}], "}"}]}], "}"}]}], ";"}]], "Input"], Cell["1\.ba.- ", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"p", "[", "x_", "]"}], "=", RowBox[{"InterpolatingPolynomial", "[", RowBox[{"datos", ",", "x"}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{"puntos", "=", RowBox[{"ListPlot", "[", RowBox[{"datos", ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"PointSize", "[", "0.02", "]"}]}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{"poli", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"p", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "4"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{"Show", "[", RowBox[{"puntos", ",", "poli"}], "]"}]], "Input"], Cell["2\.ba.- ", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"datos2", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "25"}], "}"}]}], "}"}]}], ";", RowBox[{ RowBox[{"p2", "[", "x_", "]"}], "=", RowBox[{"InterpolatingPolynomial", "[", RowBox[{"datos2", ",", "x"}], "]"}]}], ";", RowBox[{"p2", "[", "1.5", "]"}]}]], "Input"], Cell[BoxData[ RowBox[{"poli2", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"p2", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "4"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{"Show", "[", RowBox[{"puntos", ",", "poli2"}], "]"}]], "Input"], Cell["3\.ba.- ", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"datos3", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "25"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "55"}], "}"}]}], "}"}]}], ";", RowBox[{ RowBox[{"p3", "[", "x_", "]"}], "=", RowBox[{"InterpolatingPolynomial", "[", RowBox[{"datos3", ",", "x"}], "]"}]}], ";", RowBox[{"p3", "[", "3.5", "]"}]}]], "Input"], Cell[BoxData[ RowBox[{"poli3", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"p3", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "4"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{"Show", "[", RowBox[{"puntos", ",", "poli3"}], "]"}]], "Input"], Cell[CellGroupData[{ Cell["Ejercicios", "Subsection"], Cell[TextData[{ "1\.ba.- Dada la siguiente tabla de puntos ", Cell[BoxData[ TagBox[GridBox[{ {"\<\"\\!\\(x\\_i\\)\"\>", "0.3`", "0.37`", "0.41`", "0.52`"}, {"\<\"\\!\\(f\\_i\\)\"\>", "0.97741`", "0.96557`", "0.95766`", "0.93157`"} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[2.0999999999999996`]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], TableForm[#, TableHeadings -> {{"\!\(x\_i\)", "\!\(f\_i\)"}, None}]& ]]], "\nse pide:\na) Obtener el polinomio de interpolaci\[OAcute]n \ correspondiente a dicho conjunto de datos.\nb) Representar \ gr\[AAcute]ficamente dichos puntos y el polinomio de interpolaci\[OAcute]n en \ un mismo gr\[AAcute]fico.\nc) A\[NTilde]adir a la tabla el dato : f(0.47) = \ 0.94423 , y calcular el polinomio de grado 4\.ba correspondiente.\n" }], "Text", CellChangeTimes->{{3.5075647692447805`*^9, 3.5075647700729055`*^9}}, TextAlignment->Left, TextJustification->0], Cell[BoxData["\[IndentingNewLine]"], "Input", CellChangeTimes->{3.5075648027447805`*^9}], Cell[TextData[{ "2\.ba.- Calcular el polinomio de interpolaci\[OAcute]n que interpola a f(x) \ = ", Cell[BoxData[ FormBox[ FractionBox["1", RowBox[{"1", "+", SuperscriptBox["x", "2"]}]], TraditionalForm]]], " en los puntos ", Cell[BoxData[ FormBox[ SubscriptBox["x", "0"], TraditionalForm]]], "= -5, ", Cell[BoxData[ FormBox[ SubscriptBox["x", "1"], TraditionalForm]]], "= -4, ...", Cell[BoxData[ FormBox[ SubscriptBox["x", "9"], TraditionalForm]]], "= 4 y ", Cell[BoxData[ FormBox[ SubscriptBox["x", "10"], TraditionalForm]]], "= 5. Representar este polinomio junto con la funci\[OAcute]n en un mismo gr\ \[AAcute]fico para comprobar el denominado \"efecto Runge\"" }], "Text", CellChangeTimes->{{3.5075648318229055`*^9, 3.5075648325416555`*^9}}], Cell[BoxData["\[IndentingNewLine]"], "Input", CellChangeTimes->{3.5075648056822805`*^9}], Cell[TextData[{ "3\.ba.- Encontrar un valor aproximado de y(23) usando los datos de la \ siguiente tabla:\n", Cell[BoxData[ TagBox[GridBox[{ {"10", "20", "30", "40", "50", "60"}, {"0.17365`", "0.34202`", "0.5`", "0.64279`", "0.76604`", "0.86603`"} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[2.0999999999999996`]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], TableForm[#]& ]]], "\n\ta) A partir de un polinomio de primer grado.\n\tb) A partir de un \ polinomio de segundo grado.\n\tc) A partir de un polinomio de tercer grado.\n" }], "Text", CellChangeTimes->{{3.5075648350729055`*^9, 3.5075648357604055`*^9}}], Cell[BoxData["\[IndentingNewLine]"], "Input", CellChangeTimes->{3.5075648160260305`*^9}], Cell[TextData[{ "4\.ba.- Si se denota por ", Cell[BoxData[ FormBox[ SubscriptBox["P", "2"], TraditionalForm]]], "[x] al polinomio que interpola a f(x) = ", Cell[BoxData[ FormBox[ SuperscriptBox["e", "x"], TraditionalForm]]], " en los nodos : -1, -0.75, -0.5, y por ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ SubscriptBox["R", "2"], "(", "x", ")"}], " "}], TraditionalForm]]], "al error debido a la aproximaci\[OAcute]n de y = ", Cell[BoxData[ FormBox[ SuperscriptBox["e", "x"], TraditionalForm]]], " mediante el polinomio de interpolaci\[OAcute]n, obtener una cota \ m\[AAcute]xima del error cometido sabiendo que :\n\t", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["R", "n"], "(", "x", ")"}], TraditionalForm]]], " = ", Cell[BoxData[ FormBox[ RowBox[{ UnderoverscriptBox["\[Product]", RowBox[{"i", "=", "0"}], "n"], RowBox[{ RowBox[{"(", RowBox[{"x", "-", SubscriptBox["x", "i"]}], ")"}], FractionBox[ RowBox[{ SuperscriptBox["f", RowBox[{ RowBox[{"n", "+", "1"}], ")"}]], "(", "\[Xi]", ")"}], RowBox[{ RowBox[{"(", RowBox[{"n", "+", "1"}], ")"}], "!"}]]}]}], TraditionalForm]]], "\nRepresentar la funci\[OAcute]n que da el error real en [-1,-0.5] y \ comprobar que su m\[AAcute]ximo valor en dicho intervalo es inferior a la \ cota m\[AAcute]xima obtenida.\n\[DownQuestion]Qu\[EAcute] error se comete al \ aproximar la funci\[OAcute]n en x=-0.3 mediante ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["P", "2"], "(", "x", ")"}], TraditionalForm]]], "?\nRepresentar la funci\[OAcute]n error y la cota m\[AAcute]xima en el \ intervalo [-2,0].\[DownQuestion]Qu\[EAcute] se puede decir a la vista de la \ gr\[AAcute]fica?" }], "Text", CellChangeTimes->{{3.5075648391822805`*^9, 3.5075648396510305`*^9}}], Cell[BoxData["\[IndentingNewLine]"], "Input", CellChangeTimes->{3.5075648233229055`*^9}], Cell[TextData[{ "5\.ba.- Se considera la funci\[OAcute]n : f(x) = 3x", Cell[BoxData[ FormBox[ SuperscriptBox["e", "x"], TraditionalForm]]], "-2", Cell[BoxData[ FormBox[ SuperscriptBox["e", "x"], TraditionalForm]]], ". Aproximar f(1.03) utilizando el polinomio de interpolaci\[OAcute]n de \ grado \[LessEqual] 2, usando ", Cell[BoxData[ FormBox[ SubscriptBox["x", "0"], TraditionalForm]]], "=1, ", Cell[BoxData[ FormBox[ SubscriptBox["x", "1"], TraditionalForm]]], "=1.05 y ", Cell[BoxData[ FormBox[ SubscriptBox["x", "3"], TraditionalForm]]], "=1.07. Comparar el error cometido con el l\[IAcute]mite de error en la \ interpolaci\[OAcute]n." }], "Text", CellChangeTimes->{{3.5075648441666555`*^9, 3.5075648448229055`*^9}}], Cell[BoxData["\[IndentingNewLine]"], "Input", CellChangeTimes->{3.5075648267135305`*^9}] }, Open ]], Cell[CellGroupData[{ Cell["SPLINES", "Subsection"], Cell[TextData[{ "Ejemplo 1\.ba\nInterpolar f(x) = ", Cell[BoxData[ FormBox[ SuperscriptBox["x", "4"], TraditionalForm]]], " mediante la spline c\[UAcute]bica S(x), correspondiente a la partici\ \[OAcute]n : ", Cell[BoxData[ FormBox[ SubscriptBox["x", "0"], TraditionalForm]]], " = -1 , ", Cell[BoxData[ FormBox[ SubscriptBox["x", "1"], TraditionalForm]]], "=0, ", Cell[BoxData[ FormBox[ SubscriptBox["x", "2"], TraditionalForm]]], "= 1 , con las condiciones : S'(-1) = f'(-1) , y S'(1) = f'(1). Representar \ gr\[AAcute]ficamente S(x) junto con f(x). \nRepetir el ejercicio calculando \ esta vez la spline natural, Sn(x).\nFinalmente obtener la gr\[AAcute]fica de \ la spline natural utilizando el paquete ", "<Left, TextJustification->1], Cell[CellGroupData[{ Cell["La spline con condiciones de contorno", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"f", "[", "x_", "]"}], "=", RowBox[{"x", "^", "4"}]}], ";", RowBox[{ RowBox[{"s1", "[", "x_", "]"}], "=", RowBox[{"a1", "+", RowBox[{"b1", "*", RowBox[{"(", RowBox[{"x", "+", "1"}], ")"}]}], "+", RowBox[{"c1", "*", RowBox[{ RowBox[{"(", RowBox[{"x", "+", "1"}], ")"}], "^", "2"}]}], "+", RowBox[{"d1", "*", RowBox[{ RowBox[{"(", RowBox[{"x", "+", "1"}], ")"}], "^", "3"}]}]}]}], ";", RowBox[{ RowBox[{"s2", "[", "x_", "]"}], "=", RowBox[{"a2", "+", RowBox[{"b2", "*", "x"}], "+", RowBox[{"c2", "*", RowBox[{"x", "^", "2"}]}], "+", RowBox[{"d2", "*", RowBox[{"x", "^", "3"}]}]}]}], ";"}]], "Input"], Cell[BoxData[ RowBox[{"sol", "=", RowBox[{"Solve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"s1", "[", RowBox[{"-", "1"}], "]"}], "\[Equal]", RowBox[{"f", "[", RowBox[{"-", "1"}], "]"}]}], ",", RowBox[{ RowBox[{"s2", "[", "0", "]"}], "\[Equal]", RowBox[{"f", "[", "0", "]"}]}], ",", RowBox[{ RowBox[{"s2", "[", "1", "]"}], "==", RowBox[{"f", "[", "1", "]"}]}], ",", RowBox[{ RowBox[{"s1", "[", "0", "]"}], "\[Equal]", RowBox[{"s2", "[", "0", "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"s1", "'"}], "[", "0", "]"}], "\[Equal]", RowBox[{ RowBox[{"s2", "'"}], "[", "0", "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"s1", "''"}], "[", "0", "]"}], "\[Equal]", RowBox[{ RowBox[{"s2", "''"}], "[", "0", "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"s1", "'"}], "[", RowBox[{"-", "1"}], "]"}], "==", RowBox[{ RowBox[{"f", "'"}], "[", RowBox[{"-", "1"}], "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"s2", "'"}], "[", "1", "]"}], "\[Equal]", RowBox[{ RowBox[{"f", "'"}], "[", "1", "]"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{ "a1", ",", "b1", ",", "c1", ",", "d1", ",", "a2", ",", "b2", ",", "c2", ",", "d2"}], "}"}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"f1", "[", "x_", "]"}], "=", RowBox[{ RowBox[{"s1", "[", "x", "]"}], "/.", RowBox[{"sol", "[", RowBox[{"[", "1", "]"}], "]"}]}]}], ";", RowBox[{ RowBox[{"f2", "[", "x_", "]"}], "=", RowBox[{ RowBox[{"s2", "[", "x", "]"}], "/.", RowBox[{"sol", "[", RowBox[{"[", "1", "]"}], "]"}]}]}], ";"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"S", "[", "x_", "]"}], "=", RowBox[{"Piecewise", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"f1", "[", "x", "]"}], ",", RowBox[{ RowBox[{"-", "1"}], "\[LessEqual]", "x", "\[LessEqual]", "0"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"f2", "[", "x", "]"}], ",", RowBox[{"0", "\[LessEqual]", "x", "\[LessEqual]", "1"}]}], "}"}]}], "}"}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"x", "^", "4"}], ",", RowBox[{"S", "[", "x", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "1"}], ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0", ",", "1"}], "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], "}"}]}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["La spline natural:", "Subsubsection"], Cell[BoxData[ RowBox[{"sol1", "=", RowBox[{"Solve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"s1", "[", RowBox[{"-", "1"}], "]"}], "\[Equal]", RowBox[{"f", "[", RowBox[{"-", "1"}], "]"}]}], ",", RowBox[{ RowBox[{"s2", "[", "0", "]"}], "\[Equal]", RowBox[{"f", "[", "0", "]"}]}], ",", RowBox[{ RowBox[{"s2", "[", "1", "]"}], "==", RowBox[{"f", "[", "1", "]"}]}], ",", RowBox[{ RowBox[{"s1", "[", "0", "]"}], "\[Equal]", RowBox[{"s2", "[", "0", "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"s1", "'"}], "[", "0", "]"}], "\[Equal]", RowBox[{ RowBox[{"s2", "'"}], "[", "0", "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"s1", "''"}], "[", "0", "]"}], "\[Equal]", RowBox[{ RowBox[{"s2", "''"}], "[", "0", "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"s1", "''"}], "[", RowBox[{"-", "1"}], "]"}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{ RowBox[{"s2", "''"}], "[", "1", "]"}], "\[Equal]", "0"}]}], "}"}], ",", RowBox[{"{", RowBox[{ "a1", ",", "b1", ",", "c1", ",", "d1", ",", "a2", ",", "b2", ",", "c2", ",", "d2"}], "}"}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"f1", "[", "x_", "]"}], "=", RowBox[{ RowBox[{"s1", "[", "x", "]"}], "/.", RowBox[{"sol1", "[", RowBox[{"[", "1", "]"}], "]"}]}]}], ";", RowBox[{ RowBox[{"f2", "[", "x_", "]"}], "=", RowBox[{ RowBox[{"s2", "[", "x", "]"}], "/.", RowBox[{"sol1", "[", RowBox[{"[", "1", "]"}], "]"}]}]}], ";"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"Sn", "[", "x_", "]"}], "=", RowBox[{"Piecewise", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"f1", "[", "x", "]"}], ",", RowBox[{ RowBox[{"-", "1"}], "\[LessEqual]", "x", "\[LessEqual]", "0"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"f2", "[", "x", "]"}], ",", RowBox[{"0", "\[LessEqual]", "x", "\[LessEqual]", "1"}]}], "}"}]}], "}"}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{"gr1", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"x", "^", "4"}], ",", RowBox[{"Sn", "[", "x", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "1"}], ",", "1"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0", ",", "1"}], "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}]}], "}"}]}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}]], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Utilizando el paquete <\""}]], "Input", CellTags->"S5.42.1"], Cell[BoxData[ RowBox[{ RowBox[{"ptos", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}]}], "}"}]}], ";"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Show", "[", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"Hue", "[", "0.05", "]"}], ",", RowBox[{"Spline", "[", RowBox[{"ptos", ",", "Cubic"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"Axes", "\[Rule]", "True"}]}], "]"}]], "Input"], Cell[BoxData[ GraphicsBox[ {Hue[0.05], LineBox[{{-1, 1}, {-0.9166666666666666, 0.8752893518518519}, {-0.8333333333333334, 0.7523148148148148}, {-0.75, 0.6328125}, {-0.6666666666666667, 0.5185185185185185}, {-0.5833333333333334, 0.41116898148148145`}, {-0.5, 0.3125}, {-0.41666666666666674`, 0.22424768518518526`}, {-0.33333333333333337`, 0.1481481481481481}, {-0.25, 0.0859375}, {-0.16666666666666674`, 0.03935185185185175}, {-0.125, 0.0224609375}, {-0.08333333333333337, 0.01012731481481477}, {-0.04166666666666674, 0.002567997685185064}, {-0.02083333333333337, 0.0006465205439814548}, {0, 0}, {0.04166666666666652, 0.002567997685185167}, {0.08333333333333326, 0.010127314814814796`}, {0.16666666666666652`, 0.03935185185185178}, { 0.25, 0.0859375}, {0.33333333333333326`, 0.14814814814814808`}, { 0.4166666666666665, 0.22424768518518506`}, {0.5, 0.3125}, { 0.5833333333333333, 0.4111689814814814}, {0.6666666666666665, 0.5185185185185184}, {0.75, 0.6328125}, {0.8333333333333333, 0.7523148148148148}, {0.9166666666666665, 0.8752893518518514}, {1, 1}}]}, Axes->True, PlotRange->All]], "Output", CellChangeTimes->{3.50632266953125*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Ejemplo 2\.ba. Sean los puntos: f(0)=1, f(2) = 9, f(4) = 41 y f(6) = 41, a) Calcular la spline c\[UAcute]bica S(x) que verifique : S'(0) = 0 y S'(6) = \ -12 (spline con condiciones de contorno) y representarlar en negro, llamando \ al gr\[AAcute]fico g1. b) Representar la interpolaci\[OAcute]n polinomial a trozos con polinomios de \ primer grado utilizando los comandos Show, Graphics y Line en azul, llamando \ al gr\[AAcute]fico g2. c) Calcular el polinomio de interpolaci\[OAcute]n correspondiente y \ representarlo en verde, llamando al gr\[AAcute]fico g3. d) Representar gr\[AAcute]ficamente en rojo la spline natural utilizando el \ paquete <", "Subsubsection"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"s1", "[", "x_", "]"}], "=", RowBox[{"a1", "+", RowBox[{"b1", "*", "x"}], "+", RowBox[{"c1", "*", RowBox[{"x", "^", "2"}]}], "+", RowBox[{"d1", "*", RowBox[{"x", "^", "3"}]}]}]}], ";", RowBox[{ RowBox[{"s2", "[", "x_", "]"}], "=", RowBox[{"a2", "+", RowBox[{"b2", "*", RowBox[{"(", RowBox[{"x", "-", "2"}], ")"}]}], "+", RowBox[{"c2", "*", RowBox[{ RowBox[{"(", RowBox[{"x", "-", "2"}], ")"}], "^", "2"}]}], "+", RowBox[{"d2", "*", RowBox[{ RowBox[{"(", RowBox[{"x", "-", "2"}], ")"}], "^", "3"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"s3", "[", "x_", "]"}], "=", RowBox[{"a3", "+", RowBox[{"b3", "*", RowBox[{"(", RowBox[{"x", "-", "4"}], ")"}]}], "+", RowBox[{"c3", "*", RowBox[{ RowBox[{"(", RowBox[{"x", "-", "4"}], ")"}], "^", "2"}]}], "+", RowBox[{"d3", "*", RowBox[{ RowBox[{"(", RowBox[{"x", "-", "4"}], ")"}], "^", "3"}]}]}]}], ";"}]}], "Input"], Cell[BoxData[ RowBox[{"sol", "=", RowBox[{"Solve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"s1", "[", "0", "]"}], "\[Equal]", "1"}], ",", RowBox[{ RowBox[{"s2", "[", "2", "]"}], "\[Equal]", "9"}], ",", RowBox[{ RowBox[{"s3", "[", "4", "]"}], "\[Equal]", "41"}], ",", RowBox[{ RowBox[{"s3", "[", "6", "]"}], "\[Equal]", "41"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"s1", "[", "2", "]"}], "\[Equal]", RowBox[{"s2", "[", "2", "]"}]}], ",", RowBox[{ RowBox[{"s2", "[", "4", "]"}], "\[Equal]", RowBox[{"s3", "[", "4", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"s1", "'"}], "[", "2", "]"}], "\[Equal]", RowBox[{ RowBox[{"s2", "'"}], "[", "2", "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"s2", "'"}], "[", "4", "]"}], "\[Equal]", RowBox[{ RowBox[{"s3", "'"}], "[", "4", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"s1", "''"}], "[", "2", "]"}], "\[Equal]", RowBox[{ RowBox[{"s2", "''"}], "[", "2", "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"s2", "''"}], "[", "4", "]"}], "\[Equal]", RowBox[{ RowBox[{"s3", "''"}], "[", "4", "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"s1", "'"}], "[", "0", "]"}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{ RowBox[{"s3", "'"}], "[", "6", "]"}], "\[Equal]", RowBox[{"-", "12"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{ "a1", ",", "b1", ",", "c1", ",", "d1", ",", "a2", ",", "b2", ",", "c2", ",", "d2", ",", "a3", ",", "b3", ",", "c3", ",", "d3"}], "}"}]}], "]"}]}]], "Input"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"f1", "[", "x_", "]"}], "=", RowBox[{ RowBox[{"s1", "[", "x", "]"}], "/.", RowBox[{"sol", "[", RowBox[{"[", "1", "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"f2", "[", "x_", "]"}], "=", RowBox[{ RowBox[{"s2", "[", "x", "]"}], "/.", RowBox[{"sol", "[", RowBox[{"[", "1", "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"f3", "[", "x_", "]"}], "=", RowBox[{ RowBox[{"s3", "[", "x", "]"}], "/.", RowBox[{"sol", "[", RowBox[{"[", "1", "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"S", "[", "x_", "]"}], "=", RowBox[{"Piecewise", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"f1", "[", "x", "]"}], ",", RowBox[{"0", "\[LessEqual]", "x", "\[LessEqual]", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"f2", "[", "x", "]"}], ",", RowBox[{"2", "\[LessEqual]", "x", "\[LessEqual]", "4"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"f3", "[", "x", "]"}], ",", RowBox[{"4", "\[LessEqual]", "x", "\[LessEqual]", "6"}]}], "}"}]}], "}"}], "]"}]}]}], "Input"], Cell[BoxData[ RowBox[{"g1", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"S", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "6"}], "}"}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"puntos", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "41"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "41"}], "}"}]}], "}"}]}], ";"}]], "Input"], Cell["\<\ Representamos en primer lugar la interpolaci\[OAcute]n lineal a trozos en \ color azul\ \>", "Text"], Cell[BoxData[ RowBox[{"g2", "=", RowBox[{"Show", "[", " ", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0", ",", "1"}], "]"}], ",", "\n", " ", RowBox[{"Line", "[", "puntos", "]"}]}], "}"}], "]"}], ",", "\n", " ", RowBox[{"PlotRange", " ", "->", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "50"}], "}"}]}], "}"}]}], ",", RowBox[{"Axes", "\[Rule]", "True"}]}], "]"}]}]], "Input"], Cell["\<\ A continuaci\[OAcute]n se calcula el polinomio de interpolaci\[OAcute]n y se \ representa en verde\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"p3", "[", "x_", "]"}], "=", RowBox[{"InterpolatingPolynomial", "[", RowBox[{"puntos", ",", "x"}], "]"}]}], ";", RowBox[{"g3", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"p3", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "6"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "1", ",", "0"}], "]"}]}]}], "]"}]}]}]], "Input"], Cell["Finalmente representamos la spline natural en rojo", "Text"], Cell[BoxData[ RowBox[{"<<", "\"\\""}]], "Input"], Cell[BoxData[ RowBox[{"g4", "=", RowBox[{"Show", "[", " ", RowBox[{ RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", "\n", " ", RowBox[{"Spline", "[", RowBox[{"puntos", ",", "Cubic"}], "]"}]}], "}"}], "]"}], ",", "\n", " ", RowBox[{"PlotRange", " ", "->", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "50"}], "}"}]}], "}"}]}], ",", RowBox[{"Axes", "\[Rule]", "True"}]}], "]"}]}]], "Input"], Cell["\<\ Comparando los cuatro gr\[AAcute]ficos, se puede observar que el polinomio de \ interpolaci\[OAcute]n (verde) es el que m\[AAcute]s oscila en los puntos pr\ \[OAcute]ximos a los extremos. La spline natural (rojo) y la de cond. de \ contorno (negro) est\[AAcute]n muy pr\[OAcute]ximas. \ \>", "Text"], Cell[BoxData[ RowBox[{"Show", "[", RowBox[{"g1", ",", "g2", ",", "g3", ",", "g4"}], "]"}]], "Input"], Cell["Representando las dos splines", "Text"], Cell[BoxData[ RowBox[{"Show", "[", RowBox[{"g1", ",", "g4"}], "]"}]], "Input"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Ejercicios", "Subsection"], Cell[TextData[{ "Ejercicio 1\.ba\nUna spline c\[UAcute]bica viene dada por:\ns(x)= ", Cell[BoxData[ FormBox[ TagBox[ StyleBox[ RowBox[{"{", StyleBox[GridBox[{ { RowBox[{ RowBox[{"s0", "(", "x", ")"}], "=", RowBox[{ RowBox[{"1", "+", "Bx", "+", RowBox[{"2", SuperscriptBox["x", "2"]}], "-", RowBox[{"2", SuperscriptBox["x", "3"], " ", "0"}]}], "\[LessEqual]", "x", "\[LessEqual]", "1"}]}]}, { RowBox[{ RowBox[{"s1", "(", "x", ")"}], "=", RowBox[{ RowBox[{"1", "+", RowBox[{"b", "(", RowBox[{"x", "-", "1"}], ")"}], "-", RowBox[{"4", SuperscriptBox[ RowBox[{"(", RowBox[{"x", "-", "1"}], ")"}], "2"]}], "+", RowBox[{"7", SuperscriptBox[ RowBox[{"(", RowBox[{"x", "-", "1"}], ")"}], "3"], " ", "1"}]}], "\[LessEqual]", "x", "\[LessEqual]", "2"}]}]} }], ShowAutoStyles->True]}], ShowAutoStyles->False], #& ], TraditionalForm]]], " \nCalcular B y b, y representar gr\[AAcute]ficamente la spline.\nHallar \ f'(0) y f'(2).\n\[DownQuestion]Se trata de una spline natural?" }], "Text"], Cell[BoxData["\[IndentingNewLine]"], "Input", CellChangeTimes->{3.5075648698229055`*^9}], Cell[TextData[{ "Ejercicio 2\.ba.\nUna spline c\[UAcute]bica se define:\n s(x) = ", Cell[BoxData[ FormBox[ TagBox[ StyleBox[ RowBox[{"{", StyleBox[GridBox[{ { RowBox[{ RowBox[{"s0", "(", "x", ")"}], "=", RowBox[{ RowBox[{"1", "+", RowBox[{"2", "x"}], "-", RowBox[{ SuperscriptBox["x", "3"], " ", "0"}]}], "\[LessEqual]", "x", "\[LessEqual]", "1"}]}]}, { RowBox[{ RowBox[{"s1", "(", "x", ")"}], "=", RowBox[{ RowBox[{"a", "+", RowBox[{"b", "(", RowBox[{"x", "-", "1"}], ")"}], "+", SuperscriptBox[ RowBox[{"c", "(", RowBox[{"x", "-", "1"}], ")"}], "2"], "+", RowBox[{ SuperscriptBox[ RowBox[{"d", "(", RowBox[{"x", "-", "1"}], ")"}], "3"], " ", "1"}]}], "\[LessEqual]", "x", "\[LessEqual]", "2"}]}]} }], ShowAutoStyles->True]}], ShowAutoStyles->False], #& ], TraditionalForm]]], "\n \[DownQuestion]Se pueden determinar a,b,c y d de manera que se trate \ de una spline natural? Razonar la respuesta y en caso afirmativo calcular y \ representar la spline." }], "Text"], Cell["\<\ Como s0''(0) es nula, con las 3 ec. que se obtienen al imponer la continuidad \ de la spline, de su derivada primera y de su derivada segunda en x=1, m\ \[AAcute]s la ec. que se obtiene al igualar a cero la derivada segunda en \ x=2, se tienen 4 ec. con 4 inc\[OAcute]gnitas,a,b,c yd, con lo que es \ posible determinar la spline natural\ \>", "Text"], Cell[BoxData["\[IndentingNewLine]"], "Input", CellChangeTimes->{3.5075648721979055`*^9}] }, Open ]] }, Open ]] }, Open ]] }, WindowToolbars->"EditBar", WindowSize->{1672, 933}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, PrintingCopies->1, PrintingPageRange->{Automatic, Automatic}, Magnification->1.5, FrontEndVersion->"7.0 for Microsoft Windows (32-bit) (February 18, 2009)", StyleDefinitions->"Report.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{ "S5.42.1"->{ Cell[20561, 675, 82, 2, 46, "Input", CellTags->"S5.42.1"]} } *) (*CellTagsIndex CellTagsIndex->{ {"S5.42.1", 34754, 1119} } *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[567, 22, 193, 5, 71, "Title"], Cell[CellGroupData[{ Cell[785, 31, 55, 0, 98, "Section"], Cell[843, 33, 762, 13, 153, "Text"], Cell[1608, 48, 1215, 27, 190, "Text"], Cell[2826, 77, 811, 26, 74, "Input"], Cell[3640, 105, 440, 15, 46, "Input"], Cell[4083, 122, 24, 0, 38, "Text"], Cell[4110, 124, 156, 4, 46, "Input"], Cell[4269, 130, 198, 5, 46, "Input"], Cell[4470, 137, 322, 9, 46, "Input"], Cell[4795, 148, 88, 2, 46, "Input"], Cell[4886, 152, 24, 0, 38, "Text"], Cell[4913, 154, 472, 15, 74, "Input"], Cell[5388, 171, 324, 9, 46, "Input"], Cell[5715, 182, 89, 2, 46, "Input"], Cell[5807, 186, 24, 0, 38, "Text"], Cell[5834, 188, 536, 17, 101, "Input"], Cell[6373, 207, 324, 9, 46, "Input"], Cell[6700, 218, 89, 2, 46, "Input"], Cell[CellGroupData[{ Cell[6814, 224, 32, 0, 57, "Subsection"], Cell[6849, 226, 1221, 26, 170, "Text"], Cell[8073, 254, 89, 1, 74, "Input"], Cell[8165, 257, 795, 27, 75, "Text"], Cell[8963, 286, 89, 1, 74, "Input"], Cell[9055, 289, 938, 22, 190, "Text"], Cell[9996, 313, 89, 1, 74, "Input"], Cell[10088, 316, 1869, 55, 221, "Text"], Cell[11960, 373, 89, 1, 74, "Input"], Cell[12052, 376, 758, 25, 61, "Text"], Cell[12813, 403, 89, 1, 74, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[12939, 409, 29, 0, 57, "Subsection"], Cell[12971, 411, 825, 25, 129, "Subsubsection"], Cell[CellGroupData[{ Cell[13821, 440, 62, 0, 30, "Subsubsection"], Cell[13886, 442, 762, 26, 74, "Input"], Cell[14651, 470, 1439, 45, 101, "Input"], Cell[16093, 517, 390, 13, 46, "Input"], Cell[16486, 532, 493, 16, 46, "Input"], Cell[16982, 550, 569, 17, 74, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[17588, 572, 43, 0, 41, "Subsubsection"], Cell[17634, 574, 1315, 41, 101, "Input"], Cell[18952, 617, 392, 13, 46, "Input"], Cell[19347, 632, 494, 16, 46, "Input"], Cell[19844, 650, 611, 18, 74, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[20492, 673, 66, 0, 41, "Subsubsection"], Cell[20561, 675, 82, 2, 46, "Input", CellTags->"S5.42.1"], Cell[20646, 679, 311, 11, 46, "Input"], Cell[CellGroupData[{ Cell[20982, 694, 362, 10, 74, "Input"], Cell[21347, 706, 1240, 22, 334, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[22636, 734, 893, 16, 256, "Subsubsection"], Cell[23532, 752, 1117, 39, 101, "Input"], Cell[24652, 793, 1804, 52, 155, "Input"], Cell[26459, 847, 1260, 39, 128, "Input"], Cell[27722, 888, 196, 6, 46, "Input"], Cell[27921, 896, 355, 12, 46, "Input"], Cell[28279, 910, 110, 3, 38, "Text"], Cell[28392, 915, 607, 18, 101, "Input"], Cell[29002, 935, 122, 3, 38, "Text"], Cell[29127, 940, 487, 14, 74, "Input"], Cell[29617, 956, 66, 0, 38, "Text"], Cell[29686, 958, 60, 1, 46, "Input"], Cell[29749, 961, 642, 19, 101, "Input"], Cell[30394, 982, 309, 5, 61, "Text"], Cell[30706, 989, 104, 2, 46, "Input"], Cell[30813, 993, 45, 0, 38, "Text"], Cell[30861, 995, 82, 2, 46, "Input"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[30992, 1003, 32, 0, 57, "Subsection"], Cell[31027, 1005, 1393, 40, 184, "Text"], Cell[32423, 1047, 89, 1, 74, "Input"], Cell[32515, 1050, 1341, 39, 161, "Text"], Cell[33859, 1091, 362, 6, 84, "Text"], Cell[34224, 1099, 89, 1, 74, "Input"] }, Open ]] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)