Message Boards Message Boards

Find a function with a known gradient?

Posted 4 years ago

Hello. How do I find a function with a known gradient? The problem I am trying to solve is in the attached file.

Attachments:
POSTED BY: Meryem Aslı
6 Replies
Anonymous User
Anonymous User
Posted 4 years ago

The above is a fraction of the whole "Del f" this person has posted, and it involves many typos such as "fgSin" (instead of fgSin).

POSTED BY: Anonymous User
Posted 4 years ago
POSTED BY: Meryem Aslı
Anonymous User
Anonymous User
Posted 4 years ago
] tfSin[\[Beta]\[CurlyTheta]]))/(a^2 (1 + f^2) + 2 gf t\[Beta]^2 + 
     f^2 g^2 \[Beta]^2 + t^2 \[Beta]^2 - 
     2 (1 + f^2) agSin[\[Beta]\[CurlyTheta]] + 
     2 (1 + f^2) atCos[\[Beta]\[CurlyTheta]] + (1 + 
        f^2) t^2 Cos[\[Beta]\[CurlyTheta]]^2 + 
     2 atSin[\[Beta]\[CurlyTheta]]^2 Cos[\[Beta]\[CurlyTheta]]^2 + (1 \
+ f^2) g^2 Sin[\[Beta]\[CurlyTheta]]^2 - 
     2 (1 + f^2) Cos[\[Beta]\[CurlyTheta]] \
tgSin[\[Beta]\[CurlyTheta]])) - (-at\[Beta]^2 f - at\[Beta]^2 f^3 + 
   a\[Beta]^2 g + a\[Beta]^2 gf^2 + 2 agSin[\[Beta]\[CurlyTheta]]^2 - 
   2 atfCos[\[Beta]\[CurlyTheta]]^2 - 
   a^2 f^3 Cos[\[Beta]\[CurlyTheta]] - 
   gf^2 t\[Beta]^2 Cos[\[Beta]\[CurlyTheta]] - 
   2 f^3 g^2 \[Beta]^2 Cos[\[Beta]\[CurlyTheta]] - 
   f^3 t^2 \[Beta]^2 Cos[\[Beta]\[CurlyTheta]] + 
   2 agfSin[\[Beta]\[CurlyTheta]] Cos[\[Beta]\[CurlyTheta]] - 
   2 atSin[\[Beta]\[CurlyTheta]] Cos[\[Beta]\[CurlyTheta]] - 
   2 atf^3 Cos[\[Beta]\[CurlyTheta]]^2 - 
   f^3 t^2 Cos[\[Beta]\[CurlyTheta]]^3 - 
   a^2 fCos[\[Beta]\[CurlyTheta]] - 
   2 g^2 \[Beta]^2 fCos[\[Beta]\[CurlyTheta]] - 
   t^2 \[Beta]^2 fCos[\[Beta]\[CurlyTheta]] - 
   t^2 fCos[\[Beta]\[CurlyTheta]]^3 - 
   g^2 Cos[\[Beta]\[CurlyTheta]] fSin[\[Beta]\[CurlyTheta]]^2 - 
   t\[Beta]^2 gCos[\[Beta]\[CurlyTheta]] - 
   t\[Beta]^2 gfSin[\[Beta]\[CurlyTheta]] - 
   a^2 Sin[\[Beta]\[CurlyTheta]] - a^2 f^2 Sin[\[Beta]\[CurlyTheta]] -
    gf^3 t\[Beta]^2 Sin[\[Beta]\[CurlyTheta]] - 
   g^2 \[Beta]^2 Sin[\[Beta]\[CurlyTheta]] - 
   f^2 g^2 \[Beta]^2 Sin[\[Beta]\[CurlyTheta]] - 
   2 t^2 \[Beta]^2 Sin[\[Beta]\[CurlyTheta]] - 
   2 f^2 t^2 \[Beta]^2 Sin[\[Beta]\[CurlyTheta]] + 
   2 agf^3 Cos[\[Beta]\[CurlyTheta]] Sin[\[Beta]\[CurlyTheta]] - 
   2 atf^2 Cos[\[Beta]\[CurlyTheta]] Sin[\[Beta]\[CurlyTheta]] - 
   t^2 Cos[\[Beta]\[CurlyTheta]]^2 Sin[\[Beta]\[CurlyTheta]] - 
   f^2 t^2 Cos[\[Beta]\[CurlyTheta]]^2 Sin[\[Beta]\[CurlyTheta]] + 
   2 tgf^3 C
POSTED BY: Anonymous User
Anonymous User
Anonymous User
Posted 4 years ago

You mean F==Grad[f]

That topic is usually covered in in calculus (vector fields through stokes theorem sections).

As you said, if you have the known gradient only and want F, you have to undo the gradient, which is a partial differential equation, which - with what was posted, it would only be fair to offer a reward for solving.

POSTED BY: Anonymous User

If your gradient were not so complicated, I'd suggested converting the problem to a differential equation and solving it with DSolve. However, I don't think DSolve can handle such a complicated problem.

POSTED BY: Frank Kampas

This example give you how to solve :

ClearAll["`*"]
f[x_, y_] := Cos[x^2 - 3 y] + Sin[x^2 + y^2];
GRADf = Grad[f[x, y], {x, y}](*A Gradient*)
(*{2 x Cos[x^2 + y^2] - 2 x Sin[x^2 - 3 y], 2 y Cos[x^2 + y^2] + 3 Sin[x^2 - 3 y]} *)

f = Integrate[GRADf[[1]], x] // FullSimplify(* Yours function f *)
(* Cos[x^2 - 3 y] + Sin[x^2 + y^2] *)

Check:

Integrate[GRADf[[1]], x] - Integrate[GRADf[[2]], y] // FullSimplify(*OK*)
(* 0 *)

Integrating constant's in this case is zero !

POSTED BY: Mariusz Iwaniuk
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