Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 175 lines (163 sloc) 5.54 KB
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 9.0' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 157, 7]
NotebookDataLength[ 5302, 165]
NotebookOptionsPosition[ 4878, 146]
NotebookOutlinePosition[ 5220, 161]
CellTagsIndexPosition[ 5177, 158]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell["\<\
Griffiths 2.7, electric field over a spherical shell.\
\>", "Text",
CellChangeTimes->{{3.6809993677971325`*^9, 3.680999388293583*^9}}],
Cell[BoxData[""], "Input",
CellChangeTimes->{{3.6809993519649324`*^9, 3.6809993751578903`*^9}}],
Cell[BoxData[{
RowBox[{
RowBox[{
RowBox[{"$Assumptions", " ", "=", " ",
RowBox[{"a", " ", ">", " ", "0"}]}], " ", ";"}], "\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{"i", " ", "=", " ",
RowBox[{"Integrate", "[", " ",
RowBox[{
RowBox[{
RowBox[{"(",
RowBox[{"1", "-", "v"}], ")"}], "/",
RowBox[{
RowBox[{"(",
RowBox[{"1", " ", "+", " ",
RowBox[{"a", "^", "2"}], " ", "-", " ",
RowBox[{"2", " ", "v"}]}], ")"}], "^",
RowBox[{"(",
RowBox[{"3", "/", "2"}], ")"}]}]}], ",", " ",
RowBox[{"{",
RowBox[{"v", ",", " ",
RowBox[{"-", "a"}], ",", " ", "a"}], "}"}]}], " ", "]"}]}],
"*)"}]}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"id", " ", "=", " ",
RowBox[{
RowBox[{"Integrate", "[", " ",
RowBox[{
RowBox[{
RowBox[{"(",
RowBox[{"a", "-", "u"}], ")"}], "/",
RowBox[{"(",
RowBox[{
RowBox[{"(",
RowBox[{
RowBox[{"a", "^", "2"}], " ", "+", " ", "1", " ", "-", " ",
RowBox[{"2", " ", "a", " ", "u"}]}], ")"}], "^",
RowBox[{"(",
RowBox[{"3", "/", "2"}], ")"}]}], ")"}]}], ",", " ",
RowBox[{"{",
RowBox[{"u", ",", " ",
RowBox[{"-", "1"}], ",", " ", "1"}], "}"}]}], "]"}], " ", "//", " ",
"HoldForm"}]}], " ", ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"i3", " ", "=", " ",
RowBox[{"id", " ", "//", " ", "ReleaseHold"}]}], " ",
";"}], "\[IndentingNewLine]"}], "Input",
CellChangeTimes->{{3.680997797833849*^9, 3.6809978619253287`*^9}, {
3.6810357709338255`*^9, 3.681035822511425*^9}, {3.681035864342109*^9,
3.6810359412982597`*^9}}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"Row", "[",
RowBox[{"{",
RowBox[{"#", ",", " ", "\"\<: \>\"", ",", " ",
RowBox[{"id", " ", "//", " ", "TraditionalForm"}], ",", " ",
"\"\< = \>\"", ",", " ",
RowBox[{"Simplify", "[",
RowBox[{"i3", ",", " ", "#"}], "]"}]}], "}"}], "]"}], " ", "&"}], "/@",
" ",
RowBox[{"{",
RowBox[{
RowBox[{"a", ">", "1"}], ",", " ",
RowBox[{"a", "<", "1"}]}], "}"}]}]}]], "Input",
CellChangeTimes->{{3.68099816577013*^9, 3.6809981895262885`*^9}, {
3.680998362500501*^9, 3.6809983670703907`*^9}, 3.6810357640185857`*^9, {
3.6810359509199004`*^9, 3.681035971179115*^9}, {3.681036041491503*^9,
3.6810360677527714`*^9}}],
Cell[BoxData[
RowBox[{"{",
RowBox[{
TemplateBox[{RowBox[{"a", ">", "1"}],"\": \"",TagBox[
FormBox[
TagBox[
RowBox[{
SubsuperscriptBox["\[Integral]",
RowBox[{"-", "1"}], "1"],
RowBox[{
FractionBox[
RowBox[{"a", "-", "u"}],
SuperscriptBox[
RowBox[{"(",
RowBox[{
SuperscriptBox["a", "2"], "+", "1", "-",
RowBox[{"2", " ", "a", " ", "u"}]}], ")"}],
RowBox[{"3", "/", "2"}]]],
RowBox[{"\[DifferentialD]", "u"}]}]}], HoldForm],
TraditionalForm], TraditionalForm, Editable -> True],"\" = \"",
FractionBox["2",
SuperscriptBox["a", "2"]]},
"RowDefault"], ",",
TemplateBox[{RowBox[{"a", "<", "1"}],"\": \"",TagBox[
FormBox[
TagBox[
RowBox[{
SubsuperscriptBox["\[Integral]",
RowBox[{"-", "1"}], "1"],
RowBox[{
FractionBox[
RowBox[{"a", "-", "u"}],
SuperscriptBox[
RowBox[{"(",
RowBox[{
SuperscriptBox["a", "2"], "+", "1", "-",
RowBox[{"2", " ", "a", " ", "u"}]}], ")"}],
RowBox[{"3", "/", "2"}]]],
RowBox[{"\[DifferentialD]", "u"}]}]}], HoldForm],
TraditionalForm], TraditionalForm, Editable -> True],"\" = \"","0"},
"RowDefault"]}], "}"}]], "Output",
CellChangeTimes->{{3.6810360437545433`*^9, 3.6810360686866136`*^9}}]
}, Open ]]
},
WindowSize->{707, 636},
WindowMargins->{{0, Automatic}, {Automatic, 0}},
FrontEndVersion->"9.0 for Microsoft Windows (64-bit) (January 25, 2013)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)
(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[557, 20, 145, 3, 40, "Text"],
Cell[705, 25, 96, 1, 39, "Input"],
Cell[804, 28, 1732, 49, 191, "Input"],
Cell[CellGroupData[{
Cell[2561, 81, 763, 19, 91, "Input"],
Cell[3327, 102, 1535, 41, 128, "Output"]
}, Open ]]
}
]
*)
(* End of internal cache information *)