Message Boards Message Boards

Plot the solution of a differential equation

Posted 8 months ago
POSTED BY: Ian P
7 Replies

Your differential equation is easily solved, and it means that e(w)=c*w for some constant c. You are looking for solutions of the very complicated nonlinear equation toBeZero ==0 that are straight lines through the origin. Are you sure that there is such a straight line? I tried for a while, and could not find it.

POSTED BY: Gianluca Gorni
Posted 8 months ago

Thanks! But another equation of the system is missing if you code which is: $\frac{\partial e}{\partial w}=\frac{e}{w}$. By the way, the $e$ function here, $e=e(w)$, is obtained from the first equation, $\frac{1}{(1-e)^2 w}=v-z$.

POSTED BY: Ian P
POSTED BY: Gianluca Gorni
Posted 8 months ago

Thanks for the comment. In fact, the code is exactly the same as the code suggested in Michael E2's answer to the linked post except for the equation in myEQ. And that code worked just fine. This is just for your information. In any case, I was trying to following your comments but failed. May I ask if you could provide a full code to work? I would really appreciate that. Thank you so much for your help.

POSTED BY: Ian P
Posted 8 months ago

From the following plot

myTwoEQs = Block[{n = 1, W = 60, i = 1/10, b = 6/10, a = 1/2},
      {#, Dt[#, w]} &@myEQ] /.
      {e -> e[w]} /. {e'[w] -> e[w]/w} /. {e[w] -> e};
ContourPlot[myTwoEQs, {e, 0, 1}, {w, 0, 2}, PlotPoints -> 200, 
 ContourStyle -> {Directive[Blue, Thickness[.01], Opacity[.2]], 
   Directive[Darker@Red, Thin]}]

it would seem that the system of the two equations has infinitely many solutions, along a whole line (near the left side of the plot). If this is correct, then the command

icEQ = myTwoEQs /. Equal -> Subtract;
icSOL = NSolve[icEQ == 0 && 0 < e < 1 && 0 < w < 2, {e, w}]

cannot possibly work. I would rather give a fixed value for w, for example w==1.

A closer look suggests that the situation is complicated:

Plot[Evaluate[
  myTwoEQs[[1]] /. Equal -> Subtract /. w -> 1], {e, .0191, .0192}, 
 PlotRange -> 10 {-1, 1}]
POSTED BY: Updating Name
Posted 8 months ago

Thanks for catching it. beta was a typo. I corrected it to b. Can you please help what I can do then? Thank!

POSTED BY: Ian P
POSTED BY: Gianluca Gorni
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