(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 11.3' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 14843, 375] NotebookOptionsPosition[ 13538, 347] NotebookOutlinePosition[ 13971, 364] CellTagsIndexPosition[ 13928, 361] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ StyleBox[ RowBox[{"(*", RowBox[{"Exercise", " ", "03"}], "*)"}], FontSize->24], "\[IndentingNewLine]", RowBox[{ RowBox[{"ClearAll", "[", RowBox[{"tmp", ",", "sol1", ",", "sol2"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"mon", "=", RowBox[{"Table", "[", RowBox[{"i", ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "13"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"tmp", "=", RowBox[{"{", RowBox[{ "33", ",", "30", ",", "31", ",", "32", ",", "33", ",", "33", ",", "32", ",", "32", ",", "32", ",", "31", ",", "32", ",", "33", ",", "33"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Calculation", " ", "Part"}], "*)"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Part", " ", "1"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"montmp", "=", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"mon", ",", "tmp"}], "}"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"gmontmp", "=", RowBox[{"ListPlot", "[", RowBox[{"montmp", ",", RowBox[{"PlotStyle", "\[Rule]", "Red"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}]}], ",", RowBox[{"PlotLabel", "\[Rule]", "\"\\""}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Part", " ", "2"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"fmontmp", "=", RowBox[{"Fit", "[", RowBox[{"montmp", ",", RowBox[{"{", RowBox[{"t", ",", "1"}], "}"}], ",", "t"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"gfmontmp", "=", RowBox[{"Plot", "[", RowBox[{"fmontmp", ",", RowBox[{"{", RowBox[{"t", ",", RowBox[{"mon", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"Last", "[", "mon", "]"}]}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Part", " ", "3"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sol1", "=", RowBox[{"fmontmp", "/.", RowBox[{"t", "\[Rule]", RowBox[{"{", RowBox[{"14", ",", "15"}], "}"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Part", " ", "4"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sol2", "=", RowBox[{"fmontmp", "/.", RowBox[{"t", "\[Rule]", "69"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Output", " ", "Part"}], "*)"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Bold"}], "]"}], "]"}], "\[IndentingNewLine]", "gmontmp", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Bold"}], "]"}], "]"}], "\[IndentingNewLine]", "fmontmp", "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{"{", RowBox[{"gmontmp", ",", "gfmontmp"}], "}"}], "]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Bold"}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ "\"\\"", ",", RowBox[{"sol1", "[", RowBox[{"[", "1", "]"}], "]"}], ",", "\"\< and \>\"", ",", RowBox[{"sol1", "[", RowBox[{"[", "2", "]"}], "]"}], ",", "\"\< respectively.\>\""}], "]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Bold"}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ "\"\\"", ",", "sol2"}], "]"}]}]}]], "Input", CellChangeTimes->{{3.963961693648715*^9, 3.9639618003928237`*^9}, { 3.963961849252329*^9, 3.9639619386311817`*^9}, {3.9639620132595997`*^9, 3.963962193132303*^9}, {3.963962426340275*^9, 3.963962501287297*^9}, { 3.9639625401961823`*^9, 3.963962868908248*^9}, {3.96397263393431*^9, 3.963972718439295*^9}, {3.972649095316325*^9, 3.9726490979981885`*^9}},ExpressionUUID->"94251afd-8c89-4c6a-814e-\ 5820e2ed20d9"], Cell[BoxData[ StyleBox["\<\"Exercise 3-part (1)\"\>", StripOnInput->False, FontWeight->Bold]], "Print", CellChangeTimes->{{3.963962741514065*^9, 3.9639627663528833`*^9}, { 3.9639628373019915`*^9, 3.963962869783239*^9}, 3.9639727347354517`*^9}, CellLabel-> "During evaluation of \ In[799]:=",ExpressionUUID->"d92c5ca8-08f4-4898-9e9c-8e7e6eeb1872"], Cell[BoxData[ GraphicsBox[{{}, {{}, {RGBColor[1, 0, 0], PointSize[0.012833333333333334`], AbsoluteThickness[ 1.6], PointBox[{{1., 33.}, {2., 30.}, {3., 31.}, {4., 32.}, {5., 33.}, { 6., 33.}, {7., 32.}, {8., 32.}, {9., 32.}, {10., 31.}, {11., 32.}, {12., 33.}, {13., 33.}}]}, {}}, {}, {}, {}, {}}, AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], Axes->{True, True}, AxesLabel->{ FormBox["\"Time(Month)\"", TraditionalForm], FormBox["\"Temperature\"", TraditionalForm]}, AxesOrigin->{0, 29.85}, DisplayFunction->Identity, Frame->{{False, False}, {False, False}}, FrameLabel->{{None, None}, {None, None}}, FrameTicks->{{Automatic, Automatic}, {Automatic, Automatic}}, GridLines->{None, None}, GridLinesStyle->Directive[ GrayLevel[0.5, 0.4]], ImagePadding->All, Method->{"CoordinatesToolOptions" -> {"DisplayFunction" -> ({ (Identity[#]& )[ Part[#, 1]], (Identity[#]& )[ Part[#, 2]]}& ), "CopiedValueFunction" -> ({ (Identity[#]& )[ Part[#, 1]], (Identity[#]& )[ Part[#, 2]]}& )}}, PlotLabel->FormBox["\"Temperature vs Time\"", TraditionalForm], PlotRange->{{0, 13.}, {30., 33.}}, PlotRangeClipping->True, PlotRangePadding->{{ Scaled[0.02], Scaled[0.02]}, { Scaled[0.05], Scaled[0.05]}}, Ticks->{Automatic, Automatic}]], "Output", CellChangeTimes->{ 3.963961939355939*^9, {3.9639624274119234`*^9, 3.9639624814630156`*^9}, { 3.9639627415160694`*^9, 3.9639627663528833`*^9}, {3.963962837305002*^9, 3.963962869783239*^9}, 3.9639727347400255`*^9}, CellLabel-> "Out[809]=",ExpressionUUID->"d7a3c4f8-8541-4dbd-acce-87b004b821e3"], Cell[BoxData[ StyleBox["\<\"Exercise 3-part (2)\"\>", StripOnInput->False, FontWeight->Bold]], "Print", CellChangeTimes->{{3.963962741514065*^9, 3.9639627663528833`*^9}, { 3.9639628373019915`*^9, 3.963962869783239*^9}, 3.9639727347400255`*^9}, CellLabel-> "During evaluation of \ In[799]:=",ExpressionUUID->"26438e69-d8a5-4da8-9d3d-7747971d2676"], Cell[BoxData[ RowBox[{"31.57692307692307`", "\[VeryThinSpace]", "+", RowBox[{"0.07142857142857145`", " ", "t"}]}]], "Output", CellChangeTimes->{ 3.963961939355939*^9, {3.9639624274119234`*^9, 3.9639624814630156`*^9}, { 3.9639627415160694`*^9, 3.9639627663528833`*^9}, {3.963962837305002*^9, 3.963962869783239*^9}, 3.9639727347400255`*^9}, CellLabel-> "Out[811]=",ExpressionUUID->"6c113b58-7e65-4fcf-8ab6-82dccdfd23d5"], Cell[BoxData[ GraphicsBox[{{{}, {{}, {RGBColor[1, 0, 0], PointSize[0.012833333333333334`], AbsoluteThickness[ 1.6], PointBox[{{1., 33.}, {2., 30.}, {3., 31.}, {4., 32.}, {5., 33.}, { 6., 33.}, {7., 32.}, {8., 32.}, {9., 32.}, {10., 31.}, {11., 32.}, { 12., 33.}, {13., 33.}}]}, {}}, {}, {}, {}, {}}, {{{}, {}, TagBox[ {RGBColor[0.368417, 0.506779, 0.709798], AbsoluteThickness[1.6], Opacity[1.], LineBox[CompressedData[" 1:eJwV03881HccB/BL7e6QZM4RksMdH5Tlx3SJz4t6WFbWj0d+RJQfIf26atnF I/NzSl0Pv1ouW6SFDhUqKnQTujZnm2nSqCbVWNOpprqy23d/vB+vx/Ov1+Px ejzegtjd67fqsVisYOb+z5SANn8WS0N7rSY3a89SNJqWJJoaayj7y60nDaso no8my0Q2GkpHBvutGSflWQyuXqahF2o6gijjiJ59ErlUQwu8SjxyGNNQ53L3 SQ1dv8abM6eagpt84n38yCQdyDp4XlBDIS/c03y78yV9MKY/vVJBkZU55H/t 3muq/sVs46vzFFU3LnZE1L6jVaE+6WubKIZbGyf6knTUpHJn+9fNFDvrL5tf vT4D4ZziNnErxeEzgU1bKmYiX78vV6Zk+sbdB8vqP4BcOMvIr4vCZO6V/oAG DsTc5Rfu3qbwHt75o3+RPrryyiwdeimU2ozV/WWGWCh4uqKnjyLxhkrVnmWE zLDVS4QDFKVx1ZZmW4yRsKE9MOl3Cn6dJE3XOBeO2+153IfMPm8dEyu+M0G/ TaUifJRC+3y2xRHFh4h+Zspij1H8ENLWVFtrCmlGkeTbvymcjLnB0jIe0huc FY8nKVokGbXHys0Q8/5yZf4UxW/CYs66Ij7cRiPiH2opRNm/OkXJzXHv8YvR Ih2Fz9oHnuVlFjAcWKU01wMeSHL9ZEfnoVy/dq/fLOCSeKNRV6ElbG9n5xSz AYvQW4M1uVawCBvTKrmA/wirsONza2xceSf9kQFQxk8yEknnI697aaynEZBz alueV7INXEwXKqKMgfLe0u5jkgVof1a67rIJQJuD3swR20JOjrD1eMDUR7yj rg22GPc0sHXkA13p+/V2ewhA1HryVAtg09SZLzj1Atz3OJRSZQncES4ZWepg h6Hp4phb1kAiiXMrPmsH1YZ5dfwFgDI0Ms3fxh4k1SXSTwC4h4+f4522xwHX 5m0l9sD27MABXysH+NX/NNQhBPISuNoZxQ4ILtwV9cQRaJ0foxvnCRGkl+e7 xBlo+fermc7HhLju75oV6wqom5aPy0xEsJ6zSnR9EdBpm9B9tEiELl/NAHcx kN0ccvoPA0c88rGbWOQBRNoNRUfKHKHpVsdlewHaK25WLhwn7LNl+130BtJm jvUcT3cCHe4U9okBMwdxjJBF8EY0vcNuGZCyK/SVwQECJ9phscoPsPo4XiVK I2ipPNK6gbFyes83AQcJgtghW6IZG8hkK1IzCZLVT6v3MD5V21kydpigPtLI u5Rx15/uXqqTBO7S8JDHjHlxxim5rQS+DROFX1LgqvP8T0+3E/TyWrwOM45+ 4WzTpiSIlmYOFjGuyQzsftVJkEF5AuZd4VNxkB+vJuhQiy/2MI4d/utKwH2C T8ZzeucB4Jx9mx/9kOBu8Gd7mflRt4OzOXWEYFuDOX8h46l3dpzGJwT5UkUU Q+RbRoQJnhOo2T8/S2DsNpLo4jtJEJUsL5Aw7j+3Xxf+kmBCHeuZythGXFhd 8JrA+Pg/aTLGN1nlaXVvCSretC84wThJVbdG9Y5g8aZDNysYzy64Zj86TfD9 jXWJCsYNYarXOh3Bensrw0uM/wNFSwfx "]]}, Annotation[#, "Charting`Private`Tag$19908#1"]& ]}, {}, {}}}, AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], Axes->{True, True}, AxesLabel->{ FormBox["\"Time(Month)\"", TraditionalForm], FormBox["\"Temperature\"", TraditionalForm]}, AxesOrigin->{0, 29.85}, DisplayFunction->Identity, Frame->{{False, False}, {False, False}}, FrameLabel->{{None, None}, {None, None}}, FrameTicks->{{Automatic, Automatic}, {Automatic, Automatic}}, GridLines->{None, None}, GridLinesStyle->Directive[ GrayLevel[0.5, 0.4]], ImagePadding->All, Method->{"CoordinatesToolOptions" -> {"DisplayFunction" -> ({ (Identity[#]& )[ Part[#, 1]], (Identity[#]& )[ Part[#, 2]]}& ), "CopiedValueFunction" -> ({ (Identity[#]& )[ Part[#, 1]], (Identity[#]& )[ Part[#, 2]]}& )}}, PlotLabel->FormBox["\"Temperature vs Time\"", TraditionalForm], PlotRange->{{0, 13.}, {30., 33.}}, PlotRangeClipping->True, PlotRangePadding->{{ Scaled[0.02], Scaled[0.02]}, { Scaled[0.05], Scaled[0.05]}}, Ticks->{Automatic, Automatic}]], "Output", CellChangeTimes->{ 3.963961939355939*^9, {3.9639624274119234`*^9, 3.9639624814630156`*^9}, { 3.9639627415160694`*^9, 3.9639627663528833`*^9}, {3.963962837305002*^9, 3.963962869783239*^9}, 3.9639727347512536`*^9}, CellLabel-> "Out[812]=",ExpressionUUID->"d54124ba-35b4-405b-a7a3-4d4042616b91"], Cell[CellGroupData[{ Cell[BoxData[ StyleBox["\<\"Exercise 3-part (3)\"\>", StripOnInput->False, FontWeight->Bold]], "Print", CellChangeTimes->{{3.963962741514065*^9, 3.9639627663528833`*^9}, { 3.9639628373019915`*^9, 3.963962869783239*^9}, 3.9639727347512536`*^9}, CellLabel-> "During evaluation of \ In[799]:=",ExpressionUUID->"7db96787-3668-445c-817a-2c5c9c88730e"], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"The avergae tempertaure in the months, June 2020 and July 2020 \ are \"\>", "\[InvisibleSpace]", "32.57692307692307`", "\[InvisibleSpace]", "\<\" and \"\>", "\[InvisibleSpace]", "32.64835164835164`", "\[InvisibleSpace]", "\<\" respectively.\"\>"}], SequenceForm[ "The avergae tempertaure in the months, June 2020 and July 2020 are ", 32.57692307692307, " and ", 32.64835164835164, " respectively."], Editable->False]], "Print", CellChangeTimes->{{3.963962741514065*^9, 3.9639627663528833`*^9}, { 3.9639628373019915`*^9, 3.963962869783239*^9}, 3.9639727347512536`*^9}, CellLabel-> "During evaluation of \ In[799]:=",ExpressionUUID->"58ddc8d8-aba0-444d-8ff8-2fd2093eb17f"], Cell[BoxData[ StyleBox["\<\"Exercise 3-part (4)\"\>", StripOnInput->False, FontWeight->Bold]], "Print", CellChangeTimes->{{3.963962741514065*^9, 3.9639627663528833`*^9}, { 3.9639628373019915`*^9, 3.963962869783239*^9}, 3.9639727347512536`*^9}, CellLabel-> "During evaluation of \ In[799]:=",ExpressionUUID->"913f2fcc-0946-4c1f-b998-278a6db045c8"], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"The avergae tempertaure in the month January 2025 is \"\>", "\[InvisibleSpace]", "36.5054945054945`"}], SequenceForm[ "The avergae tempertaure in the month January 2025 is ", 36.5054945054945], Editable->False]], "Print", CellChangeTimes->{{3.963962741514065*^9, 3.9639627663528833`*^9}, { 3.9639628373019915`*^9, 3.963962869783239*^9}, 3.9639727347512536`*^9}, CellLabel-> "During evaluation of \ In[799]:=",ExpressionUUID->"d7bfbc4b-e358-45f9-a174-9f892efed81c"] }, Open ]] }, Open ]] }, WindowSize->{951., 477.75}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, Magnification:>1.4 Inherited, FrontEndVersion->"13.2 for Microsoft Windows (64-bit) (January 30, 2023)", StyleDefinitions->"Default.nb", ExpressionUUID->"54f4d68e-ed08-460f-8fe6-110e26497df3" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 4478, 118, 744, "Input",ExpressionUUID->"94251afd-8c89-4c6a-814e-5820e2ed20d9"], Cell[5061, 142, 358, 8, 30, "Print",ExpressionUUID->"d92c5ca8-08f4-4898-9e9c-8e7e6eeb1872"], Cell[5422, 152, 1707, 43, 323, "Output",ExpressionUUID->"d7a3c4f8-8541-4dbd-acce-87b004b821e3"], Cell[7132, 197, 358, 8, 30, "Print",ExpressionUUID->"26438e69-d8a5-4da8-9d3d-7747971d2676"], Cell[7493, 207, 435, 8, 45, "Output",ExpressionUUID->"6c113b58-7e65-4fcf-8ab6-82dccdfd23d5"], Cell[7931, 217, 3555, 75, 323, "Output",ExpressionUUID->"d54124ba-35b4-405b-a7a3-4d4042616b91"], Cell[CellGroupData[{ Cell[11511, 296, 358, 8, 30, "Print",ExpressionUUID->"7db96787-3668-445c-817a-2c5c9c88730e"], Cell[11872, 306, 744, 14, 56, "Print",ExpressionUUID->"58ddc8d8-aba0-444d-8ff8-2fd2093eb17f"], Cell[12619, 322, 358, 8, 30, "Print",ExpressionUUID->"913f2fcc-0946-4c1f-b998-278a6db045c8"], Cell[12980, 332, 530, 11, 30, "Print",ExpressionUUID->"d7bfbc4b-e358-45f9-a174-9f892efed81c"] }, Open ]] }, Open ]] } ] *)