(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 4.0, MathReader 4.0, or any compatible application. 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[ 7159, 199]*) (*NotebookOutlinePosition[ 7833, 223]*) (* CellTagsIndexPosition[ 7789, 219]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["\<\ Funkcija koja racuna singletska, dubletska i tripletska rjesenja KdV \ jednadzbe\ \>", "Title"], Cell["Klaus Brauer", "Subtitle"], Cell[TextData[{ "Funkcija uzima kao argument listu od jedne, dvije ili tri brzine (za 1 do \ 3 solitona), i, u ovisnosti o broju zadanih brzina, daje singletsko, \ dubletsko ili tripletsko rjesenje KdV jednadzbe.\n(Preuzeto iz clanka ", StyleBox[ButtonBox["The Korteweg-de Vries Equation: History, Exact \ Solutions, and Graphical Representation", ButtonData:>{ URL[ "http://www.usf.uni-osnabrueck.de/~kbrauer/solitons/KdV.zip "], None}, ButtonStyle->"Hyperlink"], FontSlant->"Italic"], ButtonBox[", Klaus Brauer, maj 2000", ButtonData:>{ URL[ "http://www.usf.uni-osnabrueck.de/~kbrauer/solitons/KdV.zip "], None}, ButtonStyle->"Hyperlink"], ".)" }], "Text"], Cell[BoxData[ \(KdV[bval_, x_, t_] := Block[{vv, v, w, superpos2, superpos3, \[Phi]Irr, \[Phi]Reg, Solution}, \[IndentingNewLine]Clear[x, t]; \[IndentingNewLine]v[xx_, tt_, \[Beta]_] := \(\@\(2 \[Beta]\)\) Tanh[\(\@\(\[Beta]\/2\)\) \((xx - 2 \[Beta]\ tt)\)]; \[IndentingNewLine]w[xx_, tt_, \[Beta]_] := \(\@\(2 \[Beta]\)\) Coth[\(\@\(\[Beta]\/2\)\) \((xx - 2 \[Beta]\ tt)\)]; \[IndentingNewLine]superpos2[xx_, tt_, \[Beta]1_, \[Beta]2_] := \(2 \((\[Beta]1 - \ \[Beta]2)\)\)\/\(v[xx, tt, \[Beta]1] - w[xx, tt, \[Beta]2]\); \ \[IndentingNewLine]\[Phi]Irr[xx_, tt_, \[Beta]2_, \[Beta]_] := \(2 \((\[Beta]2 - \ \[Beta])\)\)\/\(v[xx, tt, \[Beta]2] - v[xx, tt, \[Beta]]\); \ \[IndentingNewLine]\[Phi]Reg[xx_, tt_, \[Beta]1_, \[Beta]_] := \(2 \((\[Beta] - \ \[Beta]1)\)\)\/\(v[xx, tt, \[Beta]] - w[xx, tt, \[Beta]1]\); \ \[IndentingNewLine]superpos3[xx_, tt_, \[Beta]_, \[Beta]1_, \[Beta]2_] := v[xx, tt, \[Beta]] + \(2 \((\[Beta]1 - \ \[Beta]2)\)\)\/\(\[Phi]Reg[xx, tt, \[Beta]1, \[Beta]] - \[Phi]Irr[xx, tt, \ \[Beta]2, \[Beta]]\); \[IndentingNewLine]vv = Sort[bval]; \[IndentingNewLine]If\ [Length[bval] == 1, \ Solution = \[PartialD]\_x\ v[x, t, vv\[LeftDoubleBracket]1\[RightDoubleBracket]], \ \[IndentingNewLine]If[Length[bval] == 2, Solution = \[PartialD]\_x\ superpos2[x, t, vv\[LeftDoubleBracket]1\[RightDoubleBracket], vv\[LeftDoubleBracket]2\[RightDoubleBracket]], \ \[IndentingNewLine]Solution = \[PartialD]\_x\ superpos3[x, t, vv\[LeftDoubleBracket]1\[RightDoubleBracket], vv\[LeftDoubleBracket]2\[RightDoubleBracket], vv\[LeftDoubleBracket]3\[RightDoubleBracket]]]]]\)], "Input"], Cell["KdV operator:", "Text"], Cell[BoxData[ \(KdVOp[u_] := \[PartialD]\_t\ u + 6 u \[PartialD]\_x\ u + \[PartialD]\_{x, 3}\ u\)], "Input"], Cell[CellGroupData[{ Cell["Singlet", "Section"], Cell[CellGroupData[{ Cell[BoxData[ \(one = KdV[{\[Beta]1}, x, t]\)], "Input"], Cell[BoxData[ \(\[Beta]1\ Sech[\(\@\[Beta]1\ \((x - 2\ t\ \[Beta]1)\)\)\/\@2]\^2\)], \ "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Simplify[KdVOp[one]]\)], "Input"], Cell[BoxData[ \(0\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Dublet", "Section"], Cell[CellGroupData[{ Cell[BoxData[ \(two = KdV[{\[Beta]1, \[Beta]2}, x, t]\)], "Input"], Cell[BoxData[ \(\(-\(\(2\ \((\[Beta]1 - \[Beta]2)\)\ \((\[Beta]2\ Csch[\(\@\[Beta]2\ \ \((x - 2\ t\ \[Beta]2)\)\)\/\@2]\^2 + \[Beta]1\ Sech[\(\@\[Beta]1\ \((x - 2\ \ t\ \[Beta]1)\)\)\/\@2]\^2)\)\)\/\((\(-\@2\)\ \@\[Beta]2\ Coth[\(\@\[Beta]2\ \ \((x - 2\ t\ \[Beta]2)\)\)\/\@2] + \@2\ \@\[Beta]1\ Tanh[\(\@\[Beta]1\ \((x - \ 2\ t\ \[Beta]1)\)\)\/\@2])\)\^2\)\)\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Simplify[KdVOp[two]]\)], "Input"], Cell[BoxData[ \(0\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Triplet", "Section"], Cell[CellGroupData[{ Cell[BoxData[ \(three = KdV[{\[Beta]1, \[Beta]2, \[Beta]3}, x, t]\)], "Input"], Cell[BoxData[ \(\[Beta]1\ Sech[\(\@\[Beta]1\ \((x - 2\ t\ \[Beta]1)\)\)\/\@2]\^2 - \((2\ \ \((\[Beta]2 - \[Beta]3)\)\ \((\(-\(\(2\ \((\[Beta]1 - \[Beta]2)\)\ \((\ \[Beta]2\ Csch[\(\@\[Beta]2\ \((x - 2\ t\ \[Beta]2)\)\)\/\@2]\^2 + \[Beta]1\ \ Sech[\(\@\[Beta]1\ \((x - 2\ t\ \[Beta]1)\)\)\/\@2]\^2)\)\)\/\((\(-\@2\)\ \@\ \[Beta]2\ Coth[\(\@\[Beta]2\ \((x - 2\ t\ \[Beta]2)\)\)\/\@2] + \@2\ \ \@\[Beta]1\ Tanh[\(\@\[Beta]1\ \((x - 2\ t\ \[Beta]1)\)\)\/\@2])\)\^2\)\) + \ \(2\ \((\(-\[Beta]1\) + \[Beta]3)\)\ \((\(-\[Beta]1\)\ Sech[\(\@\[Beta]1\ \ \((x - 2\ t\ \[Beta]1)\)\)\/\@2]\^2 + \[Beta]3\ Sech[\(\@\[Beta]3\ \((x - 2\ \ t\ \[Beta]3)\)\)\/\@2]\^2)\)\)\/\((\(-\@2\)\ \@\[Beta]1\ Tanh[\(\@\[Beta]1\ \ \((x - 2\ t\ \[Beta]1)\)\)\/\@2] + \@2\ \@\[Beta]3\ Tanh[\(\@\[Beta]3\ \((x - \ 2\ t\ \[Beta]3)\)\)\/\@2])\)\^2)\))\)/\((\(2\ \((\[Beta]1 - \[Beta]2)\)\)\/\(\ \(-\@2\)\ \@\[Beta]2\ Coth[\(\@\[Beta]2\ \((x - 2\ t\ \[Beta]2)\)\)\/\@2] + \ \@2\ \@\[Beta]1\ Tanh[\(\@\[Beta]1\ \((x - 2\ t\ \[Beta]1)\)\)\/\@2]\) - \(2\ \ \((\(-\[Beta]1\) + \[Beta]3)\)\)\/\(\(-\@2\)\ \@\[Beta]1\ Tanh[\(\@\[Beta]1\ \ \((x - 2\ t\ \[Beta]1)\)\)\/\@2] + \@2\ \@\[Beta]3\ Tanh[\(\@\[Beta]3\ \((x - \ 2\ t\ \[Beta]3)\)\)\/\@2]\))\)^2\)], "Output"] }, Open ]] }, Open ]] }, Open ]] }, FrontEndVersion->"4.0 for Microsoft Windows", ScreenRectangle->{{0, 1152}, {0, 781}}, WindowSize->{1144, 747}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, Magnification->1.5 ] (*********************************************************************** 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[CellGroupData[{ Cell[1739, 51, 105, 3, 285, "Title"], Cell[1847, 56, 32, 0, 95, "Subtitle"], Cell[1882, 58, 712, 17, 99, "Text"], Cell[2597, 77, 1908, 33, 546, "Input"], Cell[4508, 112, 29, 0, 47, "Text"], Cell[4540, 114, 122, 2, 43, "Input"], Cell[CellGroupData[{ Cell[4687, 120, 26, 0, 79, "Section"], Cell[CellGroupData[{ Cell[4738, 124, 60, 1, 42, "Input"], Cell[4801, 127, 100, 2, 72, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[4938, 134, 53, 1, 42, "Input"], Cell[4994, 137, 35, 1, 41, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[5078, 144, 25, 0, 79, "Section"], Cell[CellGroupData[{ Cell[5128, 148, 70, 1, 42, "Input"], Cell[5201, 151, 377, 5, 104, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[5615, 161, 53, 1, 42, "Input"], Cell[5671, 164, 35, 1, 41, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[5755, 171, 26, 0, 79, "Section"], Cell[CellGroupData[{ Cell[5806, 175, 82, 1, 42, "Input"], Cell[5891, 178, 1228, 16, 466, "Output"] }, Open ]] }, Open ]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)