cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Translate the entire conversation x

solver function

SS_14365390
2-Explorer

solver function

Hello!!

i am kind of new to the program and I have researched but still can not find the answer. I tried to create a solve block where I can get the final reult of a variable H_2 but it does not work.

I upload a PDF of the problem. I believe is not difficult but perhaps I am missing something


ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:SS_14365390)


@SS_14365390 wrote:

Thank you for your reply. Yes, the equation is s2-Delta_s2=s0. So its an equation with 2 incognitas (H_2 and S_o) s


If you really have TWO unknowns you would also need two equations, not just one! So what would be the second equation in H_2 and s_0 ??

 

But in case s_0 is known (as to seem to be the is the case in your PDF)

Werner_E_0-1761609568513.png

you could  define functions as explained by Luc

Werner_E_1-1761609597683.png

and use them either with the "root" function or in a solve block with "find":

Werner_E_2-1761609658955.png

 

BTW, I would not recommend using the symbolic “solve” facility if the only goal is to find a numerical solution. In this specific case, it could also fail due to the integral.

EDIT: Gave it a try, and  - yes - "no solution found":

Werner_E_0-1761610725163.png

 

Prime 11 sheet attached

View solution in original post

5 REPLIES 5
Werner_E
25-Diamond I
(To:SS_14365390)

Whenever possible its always better to upload the worksheet itself rather than a static picture or pdf.

And your pdf does not shoe any attempts of a solve block or the like. Its not clear which equation you want to solve for variable H2.

Maybe its the equation s2-Delta_s2=s0 ????

So please upload your worksheet and explain in more detail what you are trying to achieve.

 

BTW, instead of a solve block with "find" you can also use the "root" function in one of its two flavors.

Thank you for your reply. Yes, the equation is s2-Delta_s2=s0. So its an equation with 2 incognitas (H_2 and S_o) so I assume I have to iterate to fin H_2 until it converges.

I am going to check the root function and see.

LucMeekes
23-Emerald IV
(To:SS_14365390)

"so I assume I have to iterate":  No you don't.

You need to correct one error:  There's a q_2 in one expression which probably should be a q2.

You should refrain from evaluating definitions. That is: remove the  =  at the end of the definitions of s2 and ds2.

You should write s2 and ds2 as functions of H2, so you get:

LucMeekes_0-1761603726399.png

and

LucMeekes_1-1761603748247.png

 

And bear in mind that s2 also appears in the definition of ds2, so there it is also a function of H2.

Then finally you can solve:

s0 - s2(H2) - ds2(H2

as the function to solve for H2 in the root(), for any value of s0.

Or you could (try to) symbolically solve H2 as a function of s0.:

LucMeekes_3-1761603793097.png

(Make sure that you type a bold equals for this equation.)

 

Success!
Luc

 

 

 

Werner_E
25-Diamond I
(To:SS_14365390)


@SS_14365390 wrote:

Thank you for your reply. Yes, the equation is s2-Delta_s2=s0. So its an equation with 2 incognitas (H_2 and S_o) s


If you really have TWO unknowns you would also need two equations, not just one! So what would be the second equation in H_2 and s_0 ??

 

But in case s_0 is known (as to seem to be the is the case in your PDF)

Werner_E_0-1761609568513.png

you could  define functions as explained by Luc

Werner_E_1-1761609597683.png

and use them either with the "root" function or in a solve block with "find":

Werner_E_2-1761609658955.png

 

BTW, I would not recommend using the symbolic “solve” facility if the only goal is to find a numerical solution. In this specific case, it could also fail due to the integral.

EDIT: Gave it a try, and  - yes - "no solution found":

Werner_E_0-1761610725163.png

 

Prime 11 sheet attached

Thank you all. It worked!! 🙂

however, now I have a problem with finding for another state H3. I got the formulas from university presentation and it says is not converging to a solution. 

Announcements

Top Tags