0

In a fluid dynamics problem appears a stream function $f(x,y)$ which is defined by the following system

$\frac{\partial f}{\partial x}=\frac{g'(x)f(x,y)-a_1}{1-g(x)}$

and

$\frac{\partial f}{\partial y}=\frac{a_2}{1-g(x)}$

where $a_1$ and $a_2$ are constants and $g(x)$ some arbitrary function of $x$. I would like to find a general procedure in order to express $f(x,y)$ in terms of the arbitrary function $g(x)$ and the variable $y$.

  • In general, use DSolve or NDSolve. Please edit your question to provide your equations in Mathematica format and to provide an example for g[x]. – bbgodfrey Jan 05 '16 at 16:11
  • $g[x]$ may be an arbitrary function with continuous first derivative. for example $g(x)=x^n$ where $n$ some integer. – SpaceChild Jan 05 '16 at 16:39

1 Answers1

2

To begin, note that attempting to use DSolve on both equations simultaneously

DSolve[{D[f[x, y], x] == (g'[x] f[x, y] - a1)/(1 - g[x]), 
    D[f[x, y], y] == a2/(1 - g[x])}, f[x, y], {x, y}]

returns unevaluated. So, use it to solve each separately.

DSolve[D[f[x, y], y] == a2/(1 - g[x]), f[x, y], {x, y}, 
    GeneratedParameters -> B] // First
(* {f[x, y] -> -((a2 y)/(-1 + g[x])) + B[1][x]} *)
DSolve[D[f[x, y], x] == (g'[x] f[x, y] - a1)/(1 - g[x]), f[x, y], {x, y}, 
    GeneratedParameters -> A] // First
(* {f[x, y] -> (a1 x)/(-1 + g[x]) + A[1][y]/(-1 + g[x])} *)

Of course, these solutions must be equal. Therefore, by inspection, the solution is

s = f[x, y] -> (a1 x)/(-1 + g[x]) - (a2 y)/(-1 + g[x])

To verify this result, substitute s back into the two equations.

(Unevaluated[D[f[x, y], x] == (g'[x] f[x, y] - a1)/(1 - g[x])] /. s) // Simplify
(* True *)
(Unevaluated[D[f[x, y], y] == a2/(1 - g[x])] /. s) // Simplify
(* True *)
bbgodfrey
  • 258