## The question about Find Zero function

Use this forum to post Vensim related questions.
kong17
Member
Posts: 38
Joined: Wed May 30, 2018 1:12 pm
Vensim version: PRO

### The question about Find Zero function

Hi, everyone

I want to achieve this equation 1111.png (8.07 KiB) Viewed 429 times
when the equation equal to zero, find the value of p.
So, I used Find Zero function to solve it.
But, when I run the model, the simulation results are incorrect 22222.png (6.45 KiB) Viewed 429 times
This is because the denominator cannot be 0.
And, when I change the initial x in Find Zero, the results also have error 3333.png (20.51 KiB) Viewed 429 times
.
The value of p in the equation must not be zero.
I was wondering how to set the equation run it in Vensim if p≠0 is satisfied.
If it can be solved, I uploaded a simple example below.
Thank you very much!

Kind regards

kong17
Member
Posts: 38
Joined: Wed May 30, 2018 1:12 pm
Vensim version: PRO

### Re: The question about Find Zero function

The simple model
Attachments
FIND ZERO.mdl

tomfid
Posts: 2938
Joined: Wed May 24, 2006 4:54 am

### Re: The question about Find Zero function

I think the immediate problem is that you have the initial guess (initial x) set to 0. If the function's first execution is invalid, it can't proceed with a search.

If you set initial x = 1, it runs, but there's no solution to the equation, so it still fails to converge.

tomfid
Posts: 2938
Joined: Wed May 24, 2006 4:54 am

### Re: The question about Find Zero function

To clarify, the equation in the model uploaded appears to differ from the one in your initial post. The model has no solution; the original equation might.

tomfid
Posts: 2938
Joined: Wed May 24, 2006 4:54 am

### Re: The question about Find Zero function

I don't know what any of this means, but with a corrected expression it works:
FIND ZERO 2.mdl

kong17
Member
Posts: 38
Joined: Wed May 30, 2018 1:12 pm
Vensim version: PRO

### Re: The question about Find Zero function

tomfid wrote:
Mon Oct 14, 2019 6:35 pm
I don't know what any of this means, but with a corrected expression it works:
FIND ZERO 2.mdl
I see. Thank you for your help.