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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Trial and error method in mathcad

kshaikh
1-Visitor

Trial and error method in mathcad

Hi,

The following is the equation in which , the value "f" should be zero, but the integration limit has to change with the y1 value,

i.e if y1<z1 the equation will be same as shown,

if z1<y1<z2 , then y1 must be in the P2(z) integration limit ,

also if z2<y1,then y1 must be in the P3(z) integration limit


Keeping the fact that using trial and error "f "must be zero and the equation must change the integration limit as per the "y1" value.




                                                                                                                                                                                      

y1  =3.26Solve   by trial & error until f = 0Q    =1192   KN
z1z2y1
f  =   Q -     ∫(P1(z,ϕ1)dz -   ∫(P2(z,ϕ2)dz   -   ∫(P3(z,ϕ3)dz
z1z2
f  =0.00

Trial and error.jpg

2 REPLIES 2

There are two "If" statements.

One is programmed if   xxx if Boolean test

                                      else   xxxx

The second is a function "if" very similar to EXCEL:   if([Boolean test], if true, if false)

Either could be used to develop your statements f(y):=if(y<z1first expression, if(y<z2,second expression, third expression))

kshaikh
1-Visitor
(To:kshaikh)

Thank you Fred for the quick reply,

In addition to this the value of "f" should also "zero" using trial and error assuming a specific value of "y1".


i.e if y1<z1, the equation must change its integration value and solve for f=0 , until "f=0" , "y1" should increase from "0 to z2".and the equation changes accordingly.


Example no. 1. (when y1<z1, the value of y is increased till 2.3680 from 0 , till "f=0"

Trial and error (1).jpg

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Similarly,

Example no. 2. (when y1<z3, the value of y is increased till 3.8482 from 0 , till "f=0",and the equation changes accordingly.


Trial and error (2).jpg


Thanks you.

Announcements

Top Tags