Message Boards Message Boards

Syntax for solving vector field equations?

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 *)
POSTED BY: Rand Dannenberg
4 Replies

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.

POSTED BY: Murray Eisenberg

Hi - I'm new to this. I pasted in the code. Thanks!

POSTED BY: Rand Dannenberg

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.

POSTED BY: Tim Laska

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 *)
POSTED BY: Rand Dannenberg
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract