Ozgur

73 Reputation

8 Badges

11 years, 117 days

MaplePrimes Activity


These are answers submitted by Ozgur

Ciccarese,

 

Did you try solve? "The solve command solves one or more equations or inequalities for their unknowns."

acer and Robert,

Thanks A LOT for your time and effort.

Acer, I needed an analytical solution, and Robert's code solves the problem.

I didn't give enough background informaton I think: I am only interested in the positive quadrant (x and y are the price and quantity -and when you invert, quantity and price- of Economics). That piecewise function I gave is the monotone cubic spline fit to a given set of data, so it is necessarily one-to-one. So I knew the inverse existed but didn't know how to do it.

Now I just have to find a more automatic way of doing this because I need it for a simulation.

Best,

Ozgur Inal

Hey Mario,

Apparently, I couldn't express myself clearly:

I am trying to invert the piecewise function I wrote in 1-D math and you converted to 2-D math. I know what fsolve is for.

I used the built in procedure "solve" to invert the function, but when I compose the result and the original function I used in "solve", I don't get the identity.

Thank you casperyc but I don't quite understand; how will fsolve help me in this case?

Page 1 of 1