10k views

### Passing a function as an argument of another function [duplicate]

Possible Duplicate: Pass function or formula as function parameter I am trying to implement a simple Plot[]-like function, with the same synopsis; my first (and unique so far) try would be ...
297 views

### Identify the independent variable in an expression [duplicate]

Suppose that you write something like this for your students. This is just the beginning of something I would like to write to help them with the formal definition of a limit, but I am puzzled by the ...
384 views

### Duplicate the swap function

Because defining the function: swap[x_, y_] := Module[{}, t = x; x = y; y = t; Return[]] and writing: swap[x, y] {x, y} I ...
334 views

### Get unevaluated option value?

This is kind of a follow-up to this question. I want to be able to define a function that takes an option, and then, inside the function, retrieve and test the unevaluated value of the option. For ...
131 views

This works: ...
73 views

### Implementing a function so it accepts functions, function names and expressions as an argument

I'm trying to write a Mathematica function which takes an arbitrary expression as input. More concretely, I'm trying to write an integration function (utilizing the trapezoidal method), the input of ...
94 views

### Supply a function as an argument to another, and find its minimum

I would like to minimize a function, which is supplied as an argument to another function, and report back the estimates of the values of the variables that result in its minimum. In specific, I would ...
94 views

### User-defined density plotting function with a functional argument: extracting variables from the function and plotting in a circular region

I would like to customize the function DensityPlot and use it in a package as a function called MyDensityPlot: The functions ...
I have failed in adapt the methods discussed in $\qquad$Pass function or formula as function parameter to my work. I would like to know if there is a way to say the following to Mathematica: If <...