This notebook has been saved with all outputs deleted.  To recreate the output keyboard Alt+v o; and wait until the notebook has been evaluated (20 seconds on my office PC).

Example 1

Solve the following PDE 

t((∂u)/(∂x))+3((∂u)/(∂t))=-u,  u(x,0)=f(x). 

The vector field defined by this equation is  <t,3,-z>.  Let us picture this field

VectorPlot3D[ChVecFiBE[{x,t,z}],{x,-2,2},{t,0,2},{z,0,1.5},
VectorColorFunction->(RGBColor[0,0.5,0.5]&),VectorColorFunctionScaling->False,VectorStyle->{Opacity[0.75],Thickness[0.006],"Arrow3D"},VectorMarkers->Placed["Arrow","Start"],VectorPoints->{8,12,8} ,VectorScale->{0.07,Scaled[0.6]},BoxRatios->{2,2,1},PlotRange->{{-2,2},{0,2},{0,1.5}},ImageSize->600,ViewPoint-> Dynamic[VPbe]]

vecs1=VectorPlot3D[{t,3,-z},{x,-2Pi,2Pi},{t,0,10},{z,-1.1,1.1},VectorColorFunction->(RGBColor[0,0.5,0.5]&),VectorColorFunctionScaling->False,VectorStyle->{Opacity[0.75],Thickness[0.006],"Arrow3D"},VectorMarkers->Placed["Arrow","Start"],VectorPoints->{8,12,8} ,VectorScale->{0.07,Scaled[0.6]},BoxRatios->{2,2,1},PlotRange->{{-2Pi,2Pi},{0,10},{-1.1,1.1}},ImageSize->600]

Clear[sol1];

sol1[s_,ξ_]=FullSimplify[{x[s],t[s],z[s]}/.DSolve[{x'[s]==t[s],t'[s]==3,z'[s]==-z[s],x[0]==ξ,t[0]==0,z[0]==Cos[ξ]},{x[s],t[s],z[s]},s][[1]]]

ParametricPlot[Evaluate[Table[sol1[s,ξ][[{1,2}]],{ξ,-10,10,.2}]],{s,0,10},PlotRange->{{-2 Pi,2 Pi},{0,10}},ImageSize->500]

Simplify[Solve[{x==sol1[s,ξ][[1]],t==sol1[s,ξ][[2]]},{s,ξ}][[1]]]

ξ=-Pi; pac=ParametricPlot3D[Evaluate[sol1[s,ξ]],{s,0,15},PlotStyle->({Thickness[0.01],Blue}),BoxRatios->{2,2,1},PlotRange->{{-2Pi,2Pi},{0,10},{-1.1,1.1}}];
ics=ParametricPlot3D[Evaluate[{x0,0,Cos[x0]}],{x0,-7,7},PlotStyle->({Thickness[0.01],Green}),BoxRatios->{2,2,1},PlotRange->{{-2Pi,2Pi},{0,10},{-1.1,1.1}}];ic=Graphics3D[{PointSize[0.025],Green,Point[{ξ,0,Cos[ξ]}]}];Show[vecs1,pac,ics,ic]

ξ=-Pi/2;pts=Table[sol1[s,ξ],{s,0,15,.2}];
 lvecs=Graphics3D[{Thickness[0.007],
Arrow[{#,#+(1/1.6){#[[2]],3,-#[[3]]}}]&/@pts},BoxRatios->{2,2,1},PlotRange->{{-2Pi,2Pi},{0,10},{-1.1,1.1}}
];
pac=ParametricPlot3D[Evaluate[sol1[s,ξ]],{s,0,15},PlotStyle->({Thickness[0.01],Blue}),BoxRatios->{2,2,1},PlotRange->{{-2Pi,2Pi},{0,10},{-1.1,1.1}}];
ics=ParametricPlot3D[Evaluate[{x0,0,Cos[x0]}],{x0,-7,7},PlotStyle->({Thickness[0.01],Green}),BoxRatios->{2,2,1},PlotRange->{{-2Pi,2Pi},{0,10},{-1.1,1.1}}];ic=Graphics3D[{PointSize[0.025],Green,Point[{ξ,0,Cos[ξ]}]}];Show[pac,lvecs,ics,ic]

Clear[ξ];
Manipulate[ pts=Table[sol1[s,ξ],{s,0,15,.2}];
 lvecs=Graphics3D[{Thickness[0.007],
Arrow[{#,#+(1/1.6){#[[2]],3,-#[[3]]}}]&/@pts},BoxRatios->{2,2,1},PlotRange->{{-2Pi,2Pi},{0,10},{-1.1,1.1}}
];pac=ParametricPlot3D[Evaluate[sol1[s,ξ]],{s,0,15},PlotStyle->({Thickness[0.01],Blue}),BoxRatios->{2,2,1},PlotRange->{{-2Pi,2Pi},{0,10},{-1.1,1.1}}];
ics=ParametricPlot3D[Evaluate[{x0,0,Cos[x0]}],{x0,-7,7},PlotStyle->({Thickness[0.01],Green}),BoxRatios->{2,2,1},PlotRange->{{-2Pi,2Pi},{0,10},{-1.1,1.1}}];ic=Graphics3D[{PointSize[0.025],Green,Point[{ξ,0,Cos[ξ]}]}];Show[pac,lvecs,ics,ic],{ξ,-2 Pi,2 Pi,.1}]

Clear[ξ];
Manipulate[ pacm=ParametricPlot3D[Evaluate[Table[sol1[s,rr],{rr,-2Pi,ξ,.2}]],{s,0,15},PlotStyle->{{Thickness[0.005],Blue}},BoxRatios->{2,2,1},PlotRange->{{-2Pi,2Pi},{0,10},{-1.1,1.1}}];
ics=ParametricPlot3D[Evaluate[{x0,0,Cos[x0]}],{x0,-7,7},PlotStyle->({Thickness[0.01],Green}),BoxRatios->{2,2,1},PlotRange->{{-2Pi,2Pi},{0,10},{-1.1,1.1}}];ic=Graphics3D[{PointSize[0.025],Green,Point[{ξ,0,Cos[ξ]}]}];Show[pacm,ics,ic],{ξ,-2 Pi,2 Pi,.1}]

pic=ParametricPlot3D[Evaluate[Table[sol1[s,ξ],{ξ,-15,7,.2}]],{s,0,5},PlotStyle->({Thickness[0.01],#}&/@ColorData[3,"ColorList"]),BoxRatios->{2,2,1},PlotRange->{{-2Pi,2Pi},{0,10},{-1.1,1.1}}];Show[pic,ics]

uu1[x_,t_]=FullSimplify[(sol1[s,r][[3]])/.Solve[{x==sol1[s,r][[1]],t==sol1[s,r][[2]]},{s,r}]][[1]]

Simplify[{D[uu1[x,t],x],D[uu1[x,t],t],-1}.{t,3,-uu1[x,t]}]

gra1=Plot3D[uu1[x,t],{x,-2Pi,2Pi},{t,0,10},PlotStyle->Opacity[0.5],PlotRange->{-1.1,1.1},ClippingStyle->False,PlotPoints->100]

Show[vecs1,gra1]

Clear[ξ];
Manipulate[ pac=ParametricPlot3D[Evaluate[sol1[s,ξ]],{s,0,15},PlotStyle->({Thickness[0.01],Blue}),BoxRatios->{2,2,1},PlotRange->{{-2Pi,2Pi},{0,10},{-1.1,1.1}}];
ics=ParametricPlot3D[Evaluate[{x0,0,Cos[x0]}],{x0,-7,7},PlotStyle->({Thickness[0.01],Green}),BoxRatios->{2,2,1},PlotRange->{{-2Pi,2Pi},{0,10},{-1.1,1.1}}];ic=Graphics3D[{PointSize[0.025],Green,Point[{ξ,0,Cos[ξ]}]}];Show[gra1,pac,ics,ic],{ξ,-2 Pi,2 Pi,.1}]

Manipulate[Plot[uu1[x,t],{x,-2 Pi,2 Pi},PlotRange-> {{-2 Pi,2 Pi},{-1.1,1.1}}],{t,0,10,.1}]

Example 3 ()

Solve the following PDE 

u((∂u)/(∂x))+((∂u)/(∂t))=0,  u(x,0)=f(x).

f(x)=arctan x,  f(x)=-arctan x,  f(x)= (e^(-(x^2))).

The vector field defined by this equation is  <z,1,0>.  Let us picture this field

vecs3=VectorPlot3D[{z,1,0},{x,-2,2},{t,0,10},{z,-1.1,1.1},BoxRatios->{2,2,1},PlotRange->{{-2,2},{0,4},{-1.1,1.1}}]

ArcTan[x]

Clear[sol3];

sol3[s_,r_]=FullSimplify[{x[s],t[s],z[s]}/.DSolve[{x'[s]==z[s],t'[s]==1,z'[s]==0,x[0]==r,t[0]==0,z[0]==ArcTan[r]},{x[s],t[s],z[s]},s][[1]]]

ParametricPlot[Evaluate[Table[sol3[s,r][[{1,2}]],{r,-10,10,.1}]],{s,-4,10},PlotRange->{{-2Pi,2Pi},{-1,6}},AspectRatio->Automatic]

ParametricPlot3D[Evaluate[sol3[s,r]],{s,0,4},{r,-4,4},BoxRatios->{2,2,1},PlotRange->{{-4,4},{0,4},{-2.1,2.1}}]

Solve[{x==sol3[s,r][[1]],y==sol3[s,r][[2]]},{s,r}]

Manipulate[
ParametricPlot[sol3[s,r][[{1,3}]],{r,-2Pi,2 Pi},PlotRange->{{-4,4},{-2,2}}],
{s,0,4,.1}]

-ArcTan[x]

Clear[sol1a];

sol3a[s_,r_]=FullSimplify[{x[s],t[s],z[s]}/.DSolve[{x'[s]==z[s],t'[s]==1,z'[s]==0,x[0]==r,t[0]==0,z[0]==-ArcTan[r]},{x[s],t[s],z[s]},s][[1]]]

ParametricPlot[Evaluate[Table[sol3a[s,r][[{1,2}]],{r,-10,10,.1}]],{s,0,10},PlotRange->{{-3,3},{0,3}},AspectRatio->1/GoldenRatio]

ParametricPlot3D[Evaluate[sol3a[s,r]],{s,0,6},{r,-4 ,4},BoxRatios->{2,2,1},PlotRange->{{-3,3},{0,3},{-2,2}}]

Manipulate[
ParametricPlot[sol3a[s,r][[{1,3}]],{r,-10,10},PlotRange->{{-3,3},{-Pi/2,Pi/2}}],
{s,0,2,.1}]

sol3a[s,r][[{1,3}]]

D[sol3a[s,r][[{1,3}]],r]

D[sol3a[s,r][[{1,3}]],r]/.{r->0}

ParametricPlot3D[Evaluate[sol3a[s,r]],{s,0,1},{r,-4,4},BoxRatios->{2,2,1},PlotRange->{{-3,3},{0,1},{-Pi/2,Pi/2}},PlotPoints->{100,100}]

Exp[-(x^2)]

Clear[sol3b];

sol3b[s_,r_]=FullSimplify[{x[s],t[s],z[s]}/.DSolve[{x'[s]==z[s],t'[s]==1,z'[s]==0,x[0]==r,t[0]==0,z[0]==Exp[-(r^2)]},{x[s],t[s],z[s]},s][[1]]]

ParametricPlot[Evaluate[Table[sol3b[s,r][[{1,2}]],{r,-4,4,.1}]],{s,0,3},PlotRange->{{-3,3},{0,2}},AspectRatio->1/GoldenRatio]

ParametricPlot3D[Evaluate[sol3b[s,r]],{s,0,3},{r,-3 ,3},BoxRatios->{2,2,1},PlotRange->{{-3,3},{0,3},{0,1.2}},PlotPoints->{100,100}]

Manipulate[
ParametricPlot[sol3b[s,r][[{1,3}]],{r,-3,3},PlotRange->{{-3,3},{0,1.2}}],
{s,0,3,.1}]

sol3b[s,r][[{1,3}]]

D[sol3b[s,r][[{1,3}]],r]

When is 1-2 (e^(-(r^2))) r s=0?

When is 2 (e^(-(r^2))) r s=1?

Explore the family of functions 2 (e^(-(r^2))) r s, where s is a parameter.

Manipulate[Plot[2 (E^(-(r^2))) r s,{r,-3,3},PlotRange->{-2,2}],{s,0,2}]

FullSimplify[D[2 (E^(-(r^2))) r s,r]]

Thus 2 (e^(-(r^2))) r s has the maximum at r= 1/(Sqrt[2]). What is the maximum?

(2 (E^(-(r^2))) r s)/.{r->(1/(Sqrt[2]))}

When will (Sqrt[(2/e)]) s=1?

Clearly for  s=(Sqrt[(e/2)]).

ParametricPlot3D[Evaluate[sol3b[s,r]],{s,0,2},{r,-3,3},BoxRatios->{2,2,1},PlotRange->{{-3,3},{0,(Sqrt[(E/2)])},{0,1.2}},PlotPoints->{100,100}]

Example 4

(Subscript[u, x])+(y^2)(Subscript[u, y])=2 y u + (y^2),u[0,y]=y

DSolve[{D[u[x,y],x]+(y^2) D[u[x,y],y]==2 y u[x,y] + (y^2),u[0,y]==y},u[x,y],x,y]

DSolve[{Y'[s]==((Y[s])^2),Y[0]==ξ},Y[s],s]

TeXForm[(ξ/(1-s ξ))]

DSolve[{Z'[s]==((2 ξ)/(1-ξ s))Z[s]+((((ξ/(1-ξ s))))^2),Z[0]==ξ},Z[s],s]

TeXForm[((ξ+s (ξ^2))/(((1-s ξ))^2))]

This can be solved “by hand” as we multiply

(((1-ξ s))^2)Z'[s]==2 ξ(1-ξ s)Z[s]+(((ξ))^2)

(((1-ξ s))^2)Z'[s]-2 ξ(1-ξ s)Z[s]==(((ξ))^2)

((((1-ξ s))^2)Z[s])'==(((ξ))^2)

(((1-ξ s))^2)Z[s]==s (ξ^2)+C

(((1-ξ s))^2)Z[s]==s (ξ^2)+ξ

Z[s]==((s (ξ^2)+ξ)/(((1-ξ s))^2))

DSolve[{X'[s]==1,Y'[s]==((Y[s])^2),Z'[s]==((2 ξ)/(1-ξ s))Z[s]+((((ξ/(1-ξ s))))^2),X[0]==0,Y[0]==ξ,Z[0]==ξ},{X[s],Y[s],Z[s]},s]

Solve[{x==s,y==-(ξ/(-1+s ξ))},{s,ξ}]

TeXForm[(y/(1+x y))]

FullSimplify[(z==(y (1+2 x y)))/.{x->s,y->-(ξ/(-1+s ξ)),z->((ξ+s (ξ^2))/(((-1+s ξ))^2))}]

Manipulate[ParametricPlot[{s,(ξ/(1-s ξ))},{s,-5,(1/ξ)},Exclusions->{1/ξ},PlotRange->{{-5,5},{-5,5}}],{ξ,0.01,5}]

Plot[(1/x),{x,-5,5},PlotPoints->{1000},PlotStyle->{Red},PlotRange->{{-5,5},{-5,5}},AspectRatio->Automatic]

{s,(ξ/(1-s ξ)),((ξ+s (ξ^2))/(((1-s ξ))^2))}

Manipulate[Show[{ParametricPlot3D[{x,-1/x,1/x},{x,-5,5},PlotStyle->{Orange}],ParametricPlot3D[{s,(ξ/(1-s ξ)),((ξ+s (ξ^2))/(((1-s ξ))^2))},{s,-5,(1/ξ)},PlotStyle->{Blue}],(*ParametricPlot3D[{s,(ξ/(1-s ξ)),((ξ+s (ξ^2))/(((1-s ξ))^2))},{s,(1/ξ),15},PlotStyle->{Blue}],*)ParametricPlot3D[{s,((-ξ)/(1-s (-ξ))),((-ξ+s (ξ^2))/(((1-s (-ξ)))^2))},{s,-(1/ξ),5},PlotStyle->{Red}],(* ParametricPlot3D[{s,((-ξ)/(1-s (-ξ))),((-ξ+s (ξ^2))/(((1-s (-ξ)))^2))},{s,-15,-(1/ξ)},PlotStyle->{Red}],*)ParametricPlot3D[{0,y,y},{y,-5,5},PlotStyle->{Green}],Plot3D[y+2 x (y^2),{x,-5,5},{y,-5,5}]},PlotRange->{{-2,2},{-2,2},{-5,5}},BoxRatios->{1, 1, 2},AxesLabel->{x,y,z}],{ξ,0.01,9}]

(y+2 x (y^2))/.{y->-1/x}

plo=Plot[-(1/x),{x,-15,15},PlotPoints->{1000},PlotStyle->{Orange},PlotRange->{{-5,5},{-5,5}},AspectRatio->Automatic]

Manipulate[Show[{plo,ParametricPlot[{s,(ξ/(1-s ξ))},{s,-15,(1/ξ)},PlotStyle->{Blue}],ParametricPlot[{s,(ξ/(1-s ξ))},{s,(1/ξ),15},PlotStyle->{Blue}],ParametricPlot[{s,((-ξ)/(1-s (-ξ)))},{s,-(1/ξ),15},PlotStyle->{Red}],ParametricPlot[{s,((-ξ)/(1-s (-ξ)))},{s,-15,-(1/ξ)},PlotStyle->{Red}]},PlotRange->{{-5,5},{-5,5}},AspectRatio->Automatic,AxesLabel->{x,y}],{ξ,0.01,15}]

Manipulate[Plot[y+2 x (y^2),{y,-5,5},PlotRange->{{-5,5},{-5,5}}],{{x,0},-5,5}]