Skip to main content
10-Marble
December 5, 2025
Solved

Ploting from solved non linear equations

  • December 5, 2025
  • 1 reply
  • 445 views

Dear ptc community,

 

I am trying to plot a solved parameter of nonlinear equations (J) vs x (a variable that can range from 0 to 0.5. I have tried to plot it, but I got only a point rather than a continuous line plot. Can you please help me with it? I have attached my Mathcad  (7.0.0.0) file for your reference.
Thanks in advance.

Kind regards,
Tadele

Best answer by Werner_E

x hast a constant value of 0.001 and J has the constant value 0.00001695 calculated by the solve block.

So when you plot J over G you are asking Prime to plot the single point (0.0001 / 0.00001695) and that is what you get.

 

If you want to vary the value of x you have to setup the solve block as a function of x and then define a function for J.

Werner_E_0-1764940512547.png

The calculation may take some time as for each x-value (with the range for xx i used that's 101 values) the solve block has to be evaluated.

You may consider setting CTOL to a more sensible larger value - IMHO 10^-10 may be too small.

 

1 reply

Werner_E25-Diamond IAnswer
25-Diamond I
December 5, 2025

x hast a constant value of 0.001 and J has the constant value 0.00001695 calculated by the solve block.

So when you plot J over G you are asking Prime to plot the single point (0.0001 / 0.00001695) and that is what you get.

 

If you want to vary the value of x you have to setup the solve block as a function of x and then define a function for J.

Werner_E_0-1764940512547.png

The calculation may take some time as for each x-value (with the range for xx i used that's 101 values) the solve block has to be evaluated.

You may consider setting CTOL to a more sensible larger value - IMHO 10^-10 may be too small.

 

Lenin10-MarbleAuthor
10-Marble
December 5, 2025

Thank you very much, Werner.
It works perfectly for the plot. I can now also plot epsilon as a function of x, using the way you showed me.

Just one related question I was trying to replace this equation in the constraint part of the solver (first equation for J)

Lenin_1-1764943119119.png

 

with the equation below which I can't rewrite in a form of J(x)=...as J(x) is found in both the numerator as a form of J(X)^2 and in the integral J(x)dx form 0 to x. Is there a way to do this which you can help me. I even can't start it. I will help if you/or any other kind person have any idea.

Lenin_0-1764943086539.png

Kind regards,

Lenin

25-Diamond I
December 5, 2025

Thats a complete change as now (in the solve block) J is not a  constant variable but a function.

I don't think that Prime can solve integral equations.