Message Boards Message Boards

Draw the level curves defined by an implicit integral equation?

GROUPS:

Hello, I have a problem in the process of drawing characteristics of a PDE in the (tau,chi) plane. My characteristics are defined by the implicit equation [1] where I vary the parameter Gamma and I take the + equation. Note that X, v and cs are functions of (tau,chi) defined as in the code bellow.

My attempt to draw the level curves defined by this equation is:

L[X_] := X + X^2/2 ;
cs[X_] := sqrt[(L'[X])/(2*X*L''[X] + L'[X])];
g[X_] := Integrate[1/(X*cs[X]) , X]; (* Primmitive of dX/X*cs *)
v[\[Tau]_ , \[Chi]_] := - \[Chi]/\[Tau];
f1[\[Tau]_, \[Chi]_] := 
  g[(\[Tau]^2 - \[Chi]^2)/2] + 
   Log[(1 + v[\[Tau], \[Chi]])/(1 - v[\[Tau], \[Chi]])]; 
ContourPlot[
 f1[\[Tau], \[Chi]] , {\[Tau], -1.5, 1.5}, {\[Chi], -1.5, 1.5}, 
 PlotLegends -> Automatic]

My problem is that the primitive g[X] corresponding to the integral in [1] is undefined.

Do you have an idea of a solution?

Many thanks.

POSTED BY: Jonathan Crabbé
Answer
27 days ago

Capitalize Sqrt and define g with immediate Set:

cs[X_] := Sqrt[(L'[X])/(2*X*L''[X] + L'[X])];
Clear[X];
g[X_] = Integrate[1/(X*cs[X]), X];
POSTED BY: Gianluca Gorni
Answer
27 days ago

Thank you so much, it works perfectly!

POSTED BY: Jonathan Crabbé
Answer
27 days ago

Group Abstract Group Abstract