(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 12.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 19345, 464] NotebookOptionsPosition[ 18916, 448] NotebookOutlinePosition[ 19258, 463] CellTagsIndexPosition[ 19215, 460] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"ClearAll", "[", "\"\\"", "]"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"--", RowBox[{"-", " ", RowBox[{"funkce", " ", "--"}]}]}], "-"}], "*)"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"f", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{ RowBox[{"Sin", "[", RowBox[{"3", " ", "x", " ", "y"}], "]"}], "+", RowBox[{"0.5", " ", RowBox[{"Cos", "[", "x", "]"}]}]}]}], "*)"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"f", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{"Sin", "[", RowBox[{"x", " ", "y"}], "]"}]}], "*)"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"f", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{"ArcTan", "[", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], "]"}]}], "*)"}]}], "\n", RowBox[{ RowBox[{"f", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{ RowBox[{"Log", "[", RowBox[{"1", "+", RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], "]"}], "+", RowBox[{"0.2", "*", "x", "*", "y"}]}]}], "\n", RowBox[{ RowBox[{ RowBox[{"fx", "[", RowBox[{"x_", ",", "y_"}], "]"}], "=", RowBox[{"D", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], ",", "x"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"fy", "[", RowBox[{"x_", ",", "y_"}], "]"}], "=", RowBox[{"D", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], ",", "y"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"--", RowBox[{"--", RowBox[{"-", " ", "GRAFICK\[CapitalYAcute]"}]}]}], " ", RowBox[{ RowBox[{"V\[CapitalYAcute]STUP", " ", "--"}], "--"}]}], "-"}], "*)"}]}], "\[IndentingNewLine]", RowBox[{"Manipulate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Module", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{ "z0", ",", "fxab", ",", "fyab", ",", "rovina", ",", "skutecneZ", ",", "approxZ"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"z0", "=", RowBox[{"f", "[", RowBox[{"a", ",", "b"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"fxab", "=", RowBox[{"fx", "[", RowBox[{"a", ",", "b"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"fyab", "=", RowBox[{"fy", "[", RowBox[{"a", ",", "b"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"rovina", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{"z0", "+", RowBox[{"fxab", "*", RowBox[{"(", RowBox[{"x", "-", "a"}], ")"}]}], "+", RowBox[{"fyab", "*", RowBox[{"(", RowBox[{"y", "-", "b"}], ")"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"--", RowBox[{"-", " ", "hodnota"}]}], " ", "funkce", " ", "f", " ", "v", " ", "bod\[EHacek]", " ", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"a", "+", "dx"}], ",", RowBox[{"b", "+", "dy"}]}], ")"}], "--"}]}], "-"}], "*)"}], "\[IndentingNewLine]", RowBox[{"skutecneZ", "=", RowBox[{"f", "[", RowBox[{ RowBox[{"a", "+", "dx"}], ",", RowBox[{"b", "+", "dy"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"--", RowBox[{"-", " ", "hodnota"}]}], " ", "afinn\[IAcute]", " ", "aproximace", " ", "funkce", " ", "f", " ", "v", " ", "bod\[EHacek]", " ", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"a", "+", "dx"}], ",", RowBox[{"b", "+", "dy"}]}], ")"}], "--"}]}], "-"}], "*)"}], "\[IndentingNewLine]", RowBox[{"approxZ", "=", RowBox[{"rovina", "[", RowBox[{ RowBox[{"a", "+", "dx"}], ",", RowBox[{"b", "+", "dy"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"--", RowBox[{"-", " ", "V\[YAcute]pis"}]}], " ", RowBox[{"obr\[AAcute]zk\[URing]", " ", "--"}]}], "-"}], "*)"}], "\[IndentingNewLine]", RowBox[{"Show", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Plot3D", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"a", "-", "2.5"}], ",", RowBox[{"a", "+", "2.5"}]}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", RowBox[{"b", "-", "2.5"}], ",", RowBox[{"b", "+", "2.5"}]}], "}"}], ",", RowBox[{"Mesh", "\[Rule]", "None"}], ",", RowBox[{"PlotPoints", "\[Rule]", "60"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"Directive", "[", RowBox[{"Opacity", "[", "0.7", "]"}], "]"}]}], ",", RowBox[{"Lighting", "\[Rule]", "\"\\""}], ",", RowBox[{"ColorFunction", "\[Rule]", "\"\\""}], ",", "\n", RowBox[{"ColorFunctionScaling", "\[Rule]", "True"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Plot3D", "[", RowBox[{ RowBox[{"rovina", "[", RowBox[{"x", ",", "y"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"a", "-", "2.5"}], ",", RowBox[{"a", "+", "2.5"}]}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", RowBox[{"b", "-", "2.5"}], ",", RowBox[{"b", "+", "2.5"}]}], "}"}], ",", RowBox[{"Mesh", "\[Rule]", "None"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"Directive", "[", RowBox[{ RowBox[{"Opacity", "[", "0.35", "]"}], ",", "LightGray"}], "]"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Graphics3D", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{"Black", ",", RowBox[{"AbsolutePointSize", "[", "12", "]"}], ",", RowBox[{"Point", "[", RowBox[{"{", RowBox[{"a", ",", "b", ",", "z0"}], "}"}], "]"}], ",", "\[IndentingNewLine]", "Red", ",", RowBox[{"AbsolutePointSize", "[", "12", "]"}], ",", RowBox[{"Point", "[", RowBox[{"{", RowBox[{ RowBox[{"a", "+", "dx"}], ",", RowBox[{"b", "+", "dy"}], ",", "skutecneZ"}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Darker", "[", "Green", "]"}], ",", RowBox[{"AbsolutePointSize", "[", "12", "]"}], ",", RowBox[{"Point", "[", RowBox[{"{", RowBox[{ RowBox[{"a", "+", "dx"}], ",", RowBox[{"b", "+", "dy"}], ",", "approxZ"}], "}"}], "]"}], ",", "\[IndentingNewLine]", "Thick", ",", "Red", ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"a", "+", "dx"}], ",", RowBox[{"b", "+", "dy"}], ",", "approxZ"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"a", "+", "dx"}], ",", RowBox[{"b", "+", "dy"}], ",", "skutecneZ"}], "}"}]}], "}"}], "]"}]}], "\[IndentingNewLine]", "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"ImageSize", "\[Rule]", "700"}], ",", "\[IndentingNewLine]", RowBox[{"ImagePadding", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"80", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "10"}], "}"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"BoxRatios", "\[Rule]", RowBox[{"{", RowBox[{"1", ",", "1", ",", "0.7"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"Boxed", "\[Rule]", "False"}]}], "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", RowBox[{"Row", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"Column", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"Control", "@", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"a", ",", "0", ",", "\"\\""}], "}"}], ",", RowBox[{"-", "1.5"}], ",", "1.5"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"Control", "@", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"b", ",", "0", ",", "\"\\""}], "}"}], ",", RowBox[{"-", "1.5"}], ",", "1.5"}], "}"}]}]}], "\[IndentingNewLine]", "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Spacer", "[", "50", "]"}], ",", "\[IndentingNewLine]", RowBox[{"Column", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"Control", "@", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"dx", ",", "1", ",", "\"\\""}], "}"}], ",", RowBox[{"-", "2"}], ",", "2"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"Control", "@", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"dy", ",", "1", ",", "\"\\""}], "}"}], ",", RowBox[{"-", "2"}], ",", "2"}], "}"}]}]}], "\[IndentingNewLine]", "}"}], "]"}]}], "\[IndentingNewLine]", "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"ControlPlacement", "\[Rule]", "Top"}], ",", "\[IndentingNewLine]", RowBox[{"ContinuousAction", "\[Rule]", "False"}]}], "\[IndentingNewLine]", "]"}]}], "Input", CellChangeTimes->{{3.9818899246977186`*^9, 3.981889924713566*^9}, { 3.9818900237656746`*^9, 3.981890027083038*^9}, {3.9818901165653887`*^9, 3.9818901389062357`*^9}, 3.981890199390032*^9, {3.9818903695776186`*^9, 3.981890375593974*^9}, {3.9818905066290026`*^9, 3.9818905176234493`*^9}, { 3.981890550084341*^9, 3.9818905724073496`*^9}, {3.981890603551474*^9, 3.981890647570533*^9}, {3.9818906781745353`*^9, 3.981890755528393*^9}, { 3.981890811659747*^9, 3.981890820207614*^9}, {3.981890859253578*^9, 3.9818909054671946`*^9}, {3.9818911851234713`*^9, 3.9818911864169664`*^9}, {3.9818955987509317`*^9, 3.981895780380123*^9}, { 3.9818958297638016`*^9, 3.981895845789364*^9}, {3.9818958986272287`*^9, 3.9818959840705094`*^9}, {3.981896039473668*^9, 3.9818960476827855`*^9}, { 3.981896155800395*^9, 3.9818962843966665`*^9}, {3.981897870432794*^9, 3.981898036176813*^9}, {3.981898066969376*^9, 3.981898097417966*^9}, { 3.9818981288872905`*^9, 3.981898129397653*^9}, {3.9818983853280115`*^9, 3.9818983903827133`*^9}, {3.98189845040466*^9, 3.981898461147185*^9}, 3.9818985545893593`*^9, {3.981898657589151*^9, 3.981898769553173*^9}, { 3.9818988127074413`*^9, 3.9818988222801437`*^9}, {3.9818988919885283`*^9, 3.981899016554679*^9}, {3.981900447744549*^9, 3.981900460469881*^9}}, CellLabel-> "In[498]:=",ExpressionUUID->"f51783d4-c119-415d-b86b-3389b47ac638"], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`a$$ = 0, $CellContext`b$$ = 0, $CellContext`dx$$ = 1, $CellContext`dy$$ = 1, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`a$$], 0, "a"}, -1.5, 1.5}, {{ Hold[$CellContext`b$$], 0, "b"}, -1.5, 1.5}, {{ Hold[$CellContext`dx$$], 1, "dx"}, -2, 2}, {{ Hold[$CellContext`dy$$], 1, "dy"}, -2, 2}, { Hold[ Row[{ Column[{ Manipulate`Place[1], Manipulate`Place[2]}], Spacer[50], Column[{ Manipulate`Place[3], Manipulate`Place[4]}]}]], Manipulate`Dump`ThisIsNotAControl}}, Typeset`size$$ = {700., {298., 303.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`a$171387$$ = 0, $CellContext`b$171388$$ = 0, $CellContext`dx$171389$$ = 0, $CellContext`dy$171390$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 2, StandardForm, "Variables" :> {$CellContext`a$$ = 0, $CellContext`b$$ = 0, $CellContext`dx$$ = 1, $CellContext`dy$$ = 1}, "ControllerVariables" :> { Hold[$CellContext`a$$, $CellContext`a$171387$$, 0], Hold[$CellContext`b$$, $CellContext`b$171388$$, 0], Hold[$CellContext`dx$$, $CellContext`dx$171389$$, 0], Hold[$CellContext`dy$$, $CellContext`dy$171390$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> Module[{$CellContext`z0$, $CellContext`fxab$, $CellContext`fyab$, \ $CellContext`rovina$, $CellContext`skutecneZ$, $CellContext`approxZ$}, \ $CellContext`z0$ = $CellContext`f[$CellContext`a$$, $CellContext`b$$]; \ $CellContext`fxab$ = $CellContext`fx[$CellContext`a$$, $CellContext`b$$]; \ $CellContext`fyab$ = $CellContext`fy[$CellContext`a$$, $CellContext`b$$]; \ $CellContext`rovina$[ Pattern[$CellContext`x$, Blank[]], Pattern[$CellContext`y$, Blank[]]] := $CellContext`z0$ + $CellContext`fxab$ \ ($CellContext`x$ - $CellContext`a$$) + $CellContext`fyab$ ($CellContext`y$ - \ $CellContext`b$$); $CellContext`skutecneZ$ = $CellContext`f[$CellContext`a$$ + \ $CellContext`dx$$, $CellContext`b$$ + $CellContext`dy$$]; \ $CellContext`approxZ$ = $CellContext`rovina$[$CellContext`a$$ + \ $CellContext`dx$$, $CellContext`b$$ + $CellContext`dy$$]; Show[ Plot3D[ $CellContext`f[$CellContext`x, $CellContext`y], {$CellContext`x, \ $CellContext`a$$ - 2.5, $CellContext`a$$ + 2.5}, {$CellContext`y, $CellContext`b$$ - 2.5, $CellContext`b$$ + 2.5}, Mesh -> None, PlotPoints -> 60, PlotStyle -> Directive[ Opacity[0.7]], Lighting -> "Neutral", ColorFunction -> "Rainbow", ColorFunctionScaling -> True], Plot3D[ $CellContext`rovina$[$CellContext`x, $CellContext`y], \ {$CellContext`x, $CellContext`a$$ - 2.5, $CellContext`a$$ + 2.5}, {$CellContext`y, $CellContext`b$$ - 2.5, $CellContext`b$$ + 2.5}, Mesh -> None, PlotStyle -> Directive[ Opacity[0.35], LightGray]], Graphics3D[{Black, AbsolutePointSize[12], Point[{$CellContext`a$$, $CellContext`b$$, $CellContext`z0$}], Red, AbsolutePointSize[12], Point[{$CellContext`a$$ + $CellContext`dx$$, $CellContext`b$$ + \ $CellContext`dy$$, $CellContext`skutecneZ$}], Darker[Green], AbsolutePointSize[12], Point[{$CellContext`a$$ + $CellContext`dx$$, $CellContext`b$$ + \ $CellContext`dy$$, $CellContext`approxZ$}], Thick, Red, Line[{{$CellContext`a$$ + $CellContext`dx$$, $CellContext`b$$ + \ $CellContext`dy$$, $CellContext`approxZ$}, {$CellContext`a$$ + \ $CellContext`dx$$, $CellContext`b$$ + $CellContext`dy$$, \ $CellContext`skutecneZ$}}]}], ImageSize -> 700, ImagePadding -> {{80, 10}, {10, 10}}, BoxRatios -> {1, 1, 0.7}, Boxed -> False]], "Specifications" :> {{{$CellContext`a$$, 0, "a"}, -1.5, 1.5, ControlPlacement -> 1}, {{$CellContext`b$$, 0, "b"}, -1.5, 1.5, ControlPlacement -> 2}, {{$CellContext`dx$$, 1, "dx"}, -2, 2, ControlPlacement -> 3}, {{$CellContext`dy$$, 1, "dy"}, -2, 2, ControlPlacement -> 4}, Row[{ Column[{ Manipulate`Place[1], Manipulate`Place[2]}], Spacer[50], Column[{ Manipulate`Place[3], Manipulate`Place[4]}]}]}, "Options" :> {ControlPlacement -> Top, ContinuousAction -> False}, "DefaultOptions" :> {}], ImageSizeCache->{751., {359., 365.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UndoTrackedVariables:>{Typeset`show$$, Typeset`bookmarkMode$$}, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{ 3.9818899256483355`*^9, {3.9818900246467714`*^9, 3.9818900277990913`*^9}, { 3.9818901173114142`*^9, 3.9818901400026755`*^9}, 3.9818902002726746`*^9, 3.9818903762628813`*^9, 3.9818905184829845`*^9, {3.981890550915936*^9, 3.9818905729781*^9}, {3.9818906074387727`*^9, 3.9818906113763437`*^9}, 3.981890648204673*^9, {3.9818906869068727`*^9, 3.981890756032798*^9}, { 3.981890814053353*^9, 3.981890821252036*^9}, 3.9818908732909*^9, 3.9818909060400314`*^9, 3.9818911882408066`*^9, 3.9818960965121636`*^9, { 3.9818962381511984`*^9, 3.9818962849865093`*^9}, {3.981897878366304*^9, 3.9818979030423927`*^9}, 3.9818979332989655`*^9, 3.9818979893786063`*^9, { 3.9818980206584487`*^9, 3.981898036930993*^9}, {3.981898067816976*^9, 3.98189809812536*^9}, 3.9818981300846443`*^9, {3.981898386426097*^9, 3.9818983909586315`*^9}, {3.9818984520199614`*^9, 3.9818984615070734`*^9}, 3.981898555145861*^9, {3.9818986798291903`*^9, 3.9818987595948725`*^9}, { 3.9818988144593973`*^9, 3.9818988228756933`*^9}, {3.981898991511322*^9, 3.981899017283616*^9}, 3.981900461511894*^9, 3.981901742801182*^9}, CellLabel-> "Out[502]=",ExpressionUUID->"19ae8c22-0ce7-4f2e-b6fb-a6cff91d4ba9"] }, Open ]] }, WindowSize->{1536, 773}, WindowMargins->{{-8, Automatic}, {Automatic, 0}}, FrontEndVersion->"12.0 for Microsoft Windows (64-bit) (April 8, 2019)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 11608, 290, 979, "Input",ExpressionUUID->"f51783d4-c119-415d-b86b-3389b47ac638"], Cell[12191, 314, 6709, 131, 776, "Output",ExpressionUUID->"19ae8c22-0ce7-4f2e-b6fb-a6cff91d4ba9"] }, Open ]] } ] *)