Message Boards Message Boards

0
|
2156 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

How to write a function with a conditional expression on itself?

Posted 2 years ago

How to write such a function, since it giving recursion error problem

y=33x^(3/2) UnitStep[y-1]+x^(-1)*5*E^x UnitStep[1-y]
POSTED BY: John Wick
3 Replies

PiecewiseExpand gives a logical expression, not a regular function. Inside the logical expression you get three candidate regular functions y==something. You have to choose the formula that makes sense for your problem and then use that for further processing.

POSTED BY: Gianluca Gorni

Try PiecewiseExpand:

PiecewiseExpand[
 y == 33 x^(3/2) UnitStep[y - 1] + x^(-1)*5*E^x UnitStep[1 - y]]

You will get three candidate formulas for y:

Plot[Tooltip@{(5 E^x)/x, (5 E^x)/x + 33 x^(3/2), 33 x^(3/2), 1}, {x, 
  0, 4}, PlotRange -> {0, 40}]

You may have to restrict the values of x.

POSTED BY: Gianluca Gorni
Posted 2 years ago

My problem is actually like this

T = PiecewiseExpand[ y == 33 x^(3/2) x1^7 UnitStep[y - 1] + x^(-1)*5*E^x Log[x1] UnitStep[1 - y]]
mv = 100*x^(2)*x1^(-1)*(1/T^3)

and I have to plot this function mv on x vs x1 plane. you can take mv>=10. Can anybody help me how to do that?

POSTED BY: John Wick
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