SetDirectory[$HomeDirectory<>"/Documents/handouts/math467/LegendrePolynomials"]

Legendre Polynomials

Plot[Evaluate[Table[LegendreP[p,x],{p,0,6,1}]],{x,-1,1},AxesLabel->{"\!\(\*TemplateBox[<|"boxes" -> FormBox[
StyleBox["x", "TI"], TraditionalForm], "errors" -> {}, "input" -> "x", "state" -> "Boxes"|>,"TeXAssistantTemplate"]\)","\!\(\*TemplateBox[<|"boxes" -> FormBox[
StyleBox["y", "TI"], TraditionalForm], "errors" -> {}, "input" -> "y", "state" -> "Boxes"|>,"TeXAssistantTemplate"]\)"},Epilog->{Text["\!\(\*TemplateBox[<|"boxes" -> FormBox[
RowBox[{
SubscriptBox[
StyleBox["P", "TI"], "0"], "(", 
StyleBox["x", "TI"], ")"}], TraditionalForm], "errors" -> {}, "input" -> "P_{0}(x)", "state" -> "Boxes"|>,"TeXAssistantTemplate"]\)",{-0.5,1},Background->White],Text["\!\(\*TemplateBox[<|"boxes" -> FormBox[
RowBox[{
SubscriptBox[
StyleBox["P", "TI"], "1"], "(", 
StyleBox["x", "TI"], ")"}], TraditionalForm], "errors" -> {}, "input" -> "P_{1}(x)", "state" -> "Boxes"|>,"TeXAssistantTemplate"]\)",{0.5,0.5},Background->White],Text["\!\(\*TemplateBox[<|"boxes" -> FormBox[
RowBox[{
SubscriptBox[
StyleBox["P", "TI"], "2"], "(", 
StyleBox["x", "TI"], ")"}], TraditionalForm], "errors" -> {}, "input" -> "P_{2}(x)", "state" -> "Boxes"|>,"TeXAssistantTemplate"]\)",{-0.85,0.6},Background->White],Text["\!\(\*TemplateBox[<|"boxes" -> FormBox[
RowBox[{
SubscriptBox[
StyleBox["P", "TI"], "3"], "(", 
StyleBox["x", "TI"], ")"}], TraditionalForm], "errors" -> {}, "input" -> "P_{3}(x)", "state" -> "Boxes"|>,"TeXAssistantTemplate"]\)",{0.45,-0.45},Background->White],Text["\!\(\*TemplateBox[<|"boxes" -> FormBox[
RowBox[{
SubscriptBox[
StyleBox["P", "TI"], "4"], "(", 
StyleBox["x", "TI"], ")"}], TraditionalForm], "errors" -> {}, "input" -> "P_{4}(x)", "state" -> "Boxes"|>,"TeXAssistantTemplate"]\)",{-0.5,-0.35},Background->White],Text["\!\(\*TemplateBox[<|"boxes" -> FormBox[
RowBox[{
SubscriptBox[
StyleBox["P", "TI"], "5"], "(", 
StyleBox["x", "TI"], ")"}], TraditionalForm], "errors" -> {}, "input" -> "P_{5}(x)", "state" -> "Boxes"|>,"TeXAssistantTemplate"]\)",{0.5,0.15},Background->White],Text["\!\(\*TemplateBox[<|"boxes" -> FormBox[
RowBox[{
SubscriptBox[
StyleBox["P", "TI"], "6"], "(", 
StyleBox["x", "TI"], ")"}], TraditionalForm], "errors" -> {}, "input" -> "P_{6}(x)", "state" -> "Boxes"|>,"TeXAssistantTemplate"]\)",{-0.7,-0.20},Background->White]},AspectRatio->1/2,BaseStyle->FontSize->12]

Export["legendreps.eps",%,"EPS"]

Export["legendreps.pdf",%%,"PDF"]