Using numerically defined functions

jsmeyer's picture

 I have been solving a system of initial value differential equations using the numeric algorithm and would like to use the resulting numerically defined function in other contexts in the worksheet; In particular I would like to use its reciprocal. The solution function is called u and I want to use 1/u in further work (plotting).  I cannot figure out how to find functions of my numerically defined function u. Is there a way to do so? And, if so, how?

pax

JS Meyer

jsmeyer's picture

In my query about using

In my query about using numerically defined functions, I left out a crucial piece of information ... I defined the function values in the system of ODEs via a matrix fill operation with 30 rows. I would like the reciprocal with the same arguments.

John MacKendrick's picture

Generally, the only solution

Generally, the only solution is to evaluate the function and then performing computations on the results.

In your specific example, you could evaulate u(matrix) and then evaluate (matrix)^{-1} to get the reciprocal of each element.

Unfortunately, using the numerically defined function in other context is not as flexible as we would like it to be.