SF1626 - Övning 10 - Code

Göran Andersson goeran@kth.se, 110428

9.29

ClearAll["`*"]

𝔽[x_,y_]:={2x y,(x^2)-(y^3)};

U[x,y]/.DSolve[Thread[(∂_({{x,y}}))U[x,y]==𝔽[x,y]],U,{x,y}]

9.30

ClearAll["`*"]

𝔽[x_,y_]:={(x^3)-3x (y^2),(y^3)-3(x^2)y};

U[x,y]/.DSolve[Thread[(∂_({{x,y}}))U[x,y]==𝔽[x,y]],U,{x,y}]

9.31

ClearAll["`*"]

𝔽[x_,y_]:={(((x^2)-(y^2))/((((x^2)+(y^2)))^2)),((2 x y)/((((x^2)+(y^2)))^2))};

U[x,y]/.DSolve[Thread[(∂_({{x,y}}))U[x,y]==𝔽[x,y]],U,{x,y}]

9.33

ClearAll["`*"]

P[x_,y_]:=2x y g[y];
Q[x_,y_]:=-((y^2)+3(a^2)-3(x^2))g[y]

{g}=g/.DSolve[(∂_x)Q[x,y]==(∂_y)P[x,y],g,y,GeneratedParameters->(Subscript[b,#]&)]

DSolve[Thread[(∂_({{x,y}}))U[x,y]=={P[x,y],Q[x,y]}],U,{x,y},GeneratedParameters->(Subscript[c,#]&)]

Comment: Thread writes the vector equation in component form, e.g. {f[x],g[x]}={a,b}->{f[x]=a,g[x]=b}.

9.34

ClearAll["`*"]

P[x_,y_]:=x g[x,y];
Q[x_,y_]:=y g[x,y]

DSolve[(∂_x)Q[x,y]==(∂_y)P[x,y],g,{x,y}]

10.63

ClearAll["`*"]

Needs["VectorAnalysis`"]

𝕦={(y^2)+2x z-y (z^3),(z^2)+a x y-x (z^3),2y z+(x^2)+b x y (z^2)};

a)

{{a,b}}={a,b}/.Solve[Curl[𝕦,Cartesian[x,y,z]]==0,{a,b}]

𝕦

b)

{U}=U/.DSolve[Thread[(∂_({{x,y,z}}))U[x,y,z]==𝕦],U,{x,y,z}]

c)

U[2,1,0]-U[1,0,1]

10.64

ClearAll["`*"]

Needs["VectorAnalysis`"]

𝕦=g[y]{Sin[z],x Sin[z],x Cos[z]};

de=Thread[Curl[𝕦,Cartesian[x,y,z]]=={0,0,0}]

Reduce[de]

DSolve[g[y]==g'[y],g,y]