Example1 - Content-type application/mathematica Wolfram...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
(* 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[ 9866, 258] NotebookOptionsPosition[ 9235, 231] NotebookOutlinePosition[ 9580, 246] CellTagsIndexPosition[ 9537, 243] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell["\<\ !!!!!!! This shows how to solve and plot ODEs in Mathematica. You may use whatever software you like for you homework.\ \>", "Text", CellChangeTimes->{{3.464046966234375*^9, 3.46404702696875*^9}}, FontSize->16], Cell[CellGroupData[{ Cell[TextData[StyleBox["Solving an ODE with initial conditions numerically:", FontColor->RGBColor[1, 0, 0]]], "Subsection", CellChangeTimes->{{3.463944415*^9, 3.463944455609375*^9}, { 3.46401686409375*^9, 3.4640168645*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"ysol", "[", "x_", "]"}], "=", RowBox[{ RowBox[{"y", "[", "x", "]"}], "/.", RowBox[{ RowBox[{"NDSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"y", "'"}], "[", "x", "]"}], "\[Equal]", RowBox[{"y", "[", "x", "]"}]}], ",", RowBox[{ RowBox[{"y", "[", "0", "]"}], "\[Equal]", "1"}]}], "}"}], ",", RowBox[{"y", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "3"}], "}"}]}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{"ysol", "[", "x", "]"}], "}"}], ",",
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
RowBox[{"{", RowBox[{"x", ",", "0", ",", "3"}], "}"}]}], "]"}]}], "Input", CellChangeTimes->{{3.46394109225*^9, 3.46394113809375*^9}, { 3.4639416061875*^9, 3.46394163953125*^9}, {3.463941691484375*^9, 3.46394173428125*^9}, 3.463941859671875*^9, {3.463941922125*^9, 3.463941987828125*^9}, {3.46394202646875*^9, 3.46394210296875*^9}, { 3.463942241265625*^9, 3.46394235140625*^9}, {3.463942386171875*^9, 3.46394238846875*^9}, {3.463942549328125*^9, 3.46394256409375*^9}, { 3.46394309534375*^9, 3.463943212484375*^9}, {3.463943370890625*^9, 3.46394338978125*^9}, {3.463943475078125*^9, 3.463943753703125*^9}, { 3.463944320890625*^9, 3.46394440609375*^9}, {3.46401688*^9, 3.46401691403125*^9}}], Cell[BoxData[
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

Example1 - Content-type application/mathematica Wolfram...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online