Syntax for solving vector field equations?

Posted 1 month ago
300 Views
|
4 Replies
|
1 Total Likes
|
 I am trying as an example to solve the following vector field equation, which has two known solutions to check I am doing it correctly. However, Mathematica will not solve them. I suspect I have a syntax problem. Can someone show me the correct syntax? Much thanks! u[r_, \[CurlyPhi]_, z_] := Curl[{f[r, \[CurlyPhi], z], g[r, \[CurlyPhi], z], h[r, \[CurlyPhi], z]}, {r, \[CurlyPhi], z}, "Cylindrical"] s = DSolve[{u[r, \[CurlyPhi], z] == {-1/r, 0, 0}}, {f, g, h}, {r, \[CurlyPhi], z}] (* example of eqn. I want to solve - this one has known \ solutions *) Curl[{0, q*z/r, 0}, {r, \[CurlyPhi] , z}, "Cylindrical"] (* 1 of 2 solutions *) Curl[{0, 0, -q* \[CurlyPhi]}, {r, \[CurlyPhi] , z}, "Cylindrical"] (* 2 of 2 solutions *) Answer
4 Replies
Sort By:
Posted 1 month ago
 You are not likely to receive much help unless you include copyable code instead of a graphic image of code. You may use the first icon, at the left-hand end of the editor here, to markup code. Answer
Posted 1 month ago
 Hi - I'm new to this. I pasted in the code. Thanks! Answer
Posted 1 month ago
 I think you will need to pass a list of equations to DSolve versus a vector equation. You can accomplish this by adding Thread@@ like so s = DSolve[ Thread @@ {u[r, \[CurlyPhi], z] == {-1/r, 0, 0}}, {f, g, h}, {r, \[CurlyPhi], z}] It still does not solve, something else is needed like region, boundary specifications, or some other trick. Answer
Posted 1 month ago
 Hi Tim,The addition of the Thread syntax correctly parsed the equation into 3 in the DSolve, but, Dsolve does not solve...I will paste the code in and one may look at the output (the output when pasted looks messy): u[r_, \[CurlyPhi]_, z_] := Curl[{f[r, \[CurlyPhi], z], g[r, \[CurlyPhi], z], h[r, \[CurlyPhi], z]}, {r, \[CurlyPhi], z}, "Cylindrical"] s = DSolve[ Thread @@ {u[r, \[CurlyPhi], z] == {-1/r, 0, 0}}, {f, g, h}, {r, \[CurlyPhi], z}] (* example of eqn. I want to solve - this one has known \ solutions *) Curl[{0, q*z/r, 0}, {r, \[CurlyPhi] , z}, "Cylindrical"] (* 1 of 2 solutions *) Curl[{0, 0, -q* \[CurlyPhi]}, {r, \[CurlyPhi] , z}, "Cylindrical"] (* 2 of 2 solutions *) Answer