Message Boards Message Boards

0
|
3728 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

Finding the Largest Absolute Values of A Piecewise Function

I was wondering how you'd go about evaluating a piecewise function to find it's maximum and minimum values? In this specific case, I need to find the largest absolute value of two functions.

Some background might be necessary. This is for a statics class I am currently taking. The goal is to find the shear force and moments at certain points along a loaded beam. I was able to find the equation for the shear force, V[x], and I integrated that to find the Moment, M[x]. These both are piecewise functions. I was able to construct the piecewise functions, plot them, and then evaluate them at certain distances (x values in both functions). However, the next two problems were finding the largest absolute value for shear force, V[x], and the moment, M[x]. Looking at the plots it's obvious that the absolute largest values for both occur at discontinuities. I didn't have any luck with FindMaxValue, FindMaximum (same for the minimum versions of these). There's a high chance that I'm misusing these functions or failing to use some additional information, such as limiting the range, that would allow them to work. I've asked my professor about this and she gave me an answer that had was entirely "statics" in nature, and I haven't been able to transform that into code.

So here I am, asking the good people of this forum for help. Like the title says, how do I evaluate a piecewise function to find the largest absolute values? I've attached my code for anyone to look at. I would love to find a general solution, not just a specific one for this problem. That being said, if someone has a specific solution to this problem, I'd love to see that too.

Thanks!

Attachments:
POSTED BY: Ronnie Walker

Maybe:

Maximize[{RealAbs[V[x]], 0 <= x <= d1 + d2}, x](*Maximum "Shear"*)
Maximize[{RealAbs[M[x]], 0 <= x <= d1 + d2}, x](*Maximum "Moment"*)
POSTED BY: Mariusz Iwaniuk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract