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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Solving for variable in piecewise integral

GH_10342329
3-Visitor

Solving for variable in piecewise integral

Hi All,

 

Relatively new to MathCAD, so apologies if there is an easy fix here.

 

I've prepared a calculation file that take some various data and creates a piecewise function using if statements.

 

The clip below shows a graph of the piecewise function, and the equation I am trying to solve.  

GH_10342329_1-1655237761791.png

M(9.575 ft) = 0.967 lbf is confirmation that the function M(d) is working properly.  I am looking to try to solve for a value of d that will provide M(d)=0.  I am getting a "Pattern Match Error" with the equation I used above.

 

I'm wondering if it would be helpful to solve this equation within a range, but I've hit a dead end on figuring out how to approach that.

 

Any help is greatly appreciated.

Thanks

 

 

 

 

ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:GH_10342329)

the solve and the right arrow are constructs that work for symbolics. You don't have that, You simply have a function M(d) where you want to find the value of d such that M(d) equals zero.

That can be simply accomplished using the root() function.

Assign a guess value to d, then call the root function. Like this:

 

d:= 9*ft

dzero:= root(M(d),d)

 

Now you can check if dzero results in an M-value of (near) zero, e.g. with:

 

M(dzero)=

 

The result should be very small.

 

Success!
Luc

View solution in original post

2 REPLIES 2
LucMeekes
23-Emerald III
(To:GH_10342329)

the solve and the right arrow are constructs that work for symbolics. You don't have that, You simply have a function M(d) where you want to find the value of d such that M(d) equals zero.

That can be simply accomplished using the root() function.

Assign a guess value to d, then call the root function. Like this:

 

d:= 9*ft

dzero:= root(M(d),d)

 

Now you can check if dzero results in an M-value of (near) zero, e.g. with:

 

M(dzero)=

 

The result should be very small.

 

Success!
Luc

Worked perfectly, thank youA

Announcements

Top Tags