SetDirectory[$HomeDirectory<>"/Documents/handouts/math467/First-Order"]

Example 01

u[x_,y_]:=-Exp[4y/3]Sin[y-3x/2]

2D[u[x,y],x]+3D[u[x,y],y]-4u[x,y]//Simplify

Plot3D[u[x,y],{x,-π,π},{y,0,1},AxesLabel->{"x","y","u(x,y)"},PlotTheme->"Detailed",MeshFunctions->{(2#2-3#1)&},Ticks->{Table[π i,{i,-1,1,1/2}],Automatic,Automatic}]

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

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

Example 02

u[x_,y_]:=x Exp[y-(y^2)]

2 x y D[u[x,y],x]+D[u[x,y],y]-u[x,y]//Simplify

Plot3D[u[x,y],{x,0,5},{y,0,3},AxesLabel->{"x","y","u(x,y)"},PlotTheme->"Detailed",MeshFunctions->{(((#2)^2)-Log[#1])&}]

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

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

Constructing Characteristics

ParametricPlot3D[{x,Sin[x],0},{x,-π,π},AxesLabel->{"x","y","u"}]

Table[{s Cos[t]+Sin[s]Sin[t],Sin[s]Cos[t]-s Sin[t],-Log[1-t]},{s,-π,π,π/4}]

Show[ParametricPlot3D[{x,Sin[x],0},{x,-π,π},PlotStyle->Thick],ParametricPlot3D[Evaluate[Table[{s Cos[t]+Sin[s]Sin[t],Sin[s]Cos[t]-s Sin[t],-Log[1-t]},{s,-π,π,π/16}]],{t,-1,1/2},PlotStyle->Gray],AxesLabel->{"x","y","u"},Ticks->None]

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

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

Show[ParametricPlot3D[{x,Sin[x],0},{x,-π,π},PlotStyle->Thick],ParametricPlot3D[{s Cos[t]+Sin[s]Sin[t],Sin[s]Cos[t]-s Sin[t],-Log[1-t]},{s,-π,π},{t,-1,1/2},Mesh->None],ParametricPlot3D[Evaluate[Table[{s Cos[t]+Sin[s]Sin[t],Sin[s]Cos[t]-s Sin[t],-Log[1-t]},{s,-π,π,π/16}]],{t,-1,1/2},PlotStyle->Gray],AxesLabel->{"x","y","u"},Ticks->None]

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

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

ContourPlot3D[Sin[x Cos[1-Exp[-u]]-y Sin[1-Exp[-u]]]==y Cos[1-Exp[-u]]+x Sin[1-Exp[-u]],{x,-3,3},{y,-3,3},{u,0,3},Mesh->None,AxesLabel->{"x","y","u(x,y)"}]

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

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

Example 03

Show[ParametricPlot3D[{(s^2),Sin[s],0},{s,-π,π},PlotStyle->Directive[Black,Thick]],ParametricPlot3D[Table[{(s^2)Exp[t],Exp[t]Sin[s],ArcSin[t]},{s,-π,π,π/16}],{t,-1,1}],AxesLabel->{"x","y","u"}]

Show[ParametricPlot3D[{(s^2),Sin[s],0},{s,-2π,2π},PlotStyle->Directive[Black,Thick]],ParametricPlot3D[Table[{(s^2)Exp[t],Exp[t]Sin[s],ArcSin[t]},{s,-2π,2π,π/16}],{t,-1,1}],AxesLabel->{"x","y","u"},BoxRatios->1,PlotRange->{Automatic,Automatic,{-π,π}/2}]

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

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

Show[ParametricPlot3D[{(s^2)Exp[t],Exp[t]Sin[s],ArcSin[t]},{s,-2π,2π},{t,-1,1},PlotStyle->Opacity[1/2],Mesh->None],ParametricPlot3D[Table[{(s^2)Exp[t],Exp[t]Sin[s],ArcSin[t]},{s,-2π,2π,π/16}],{t,-1,1}],AxesLabel->{"x","y","u"},BoxRatios->1]

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

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

Example 04

DSolve[{x'[t]==1,y'[t]==u[t],u'[t]==6x[t],x[0]==0,y[0]==s,u[0]==3s},{x[t],y[t],u[t]},t]

Solve[{x==t,u==3(t^2)+3s},{s,t}]

s+3s t+(t^3)/.First[%]

Simplify[%]

Solve[y==%,u]

DSolve[{x'[t]==1,y'[t]==u[t],u'[t]==6x[t],x[0]==0,y[0]==s,u[0]==3s},{x[t],y[t],u[t]},t]

Show[ParametricPlot3D[{t,(t^3)+s(3t+1),3((t^2)+s)},{s,-2,2},{t,-2.5,2.5},PlotPoints->50,PlotStyle->Opacity[1/2],Mesh->None],ParametricPlot3D[Table[{t,(t^3)+s(3t+1),3((t^2)+s)},{s,-2,2,1/16}],{t,-2.5,2.5}],ParametricPlot3D[{0,y,3y},{y,-1,1},PlotStyle->Directive[Thick,Black]],AxesLabel->{"x","y","u"},PlotRange->1]

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

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

u[x_,y_]:=3(2(x^3)+(x^2)+y)/(3x+1)

u[0,y]

D[u[x,y],x]+u[x,y]D[u[x,y],y]-6x//Simplify