# Questions tagged [functions]

Questions about the use of built-in Mathematica functions, including pure functions.

296 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
80 views

### Using While properly

I am trying to make While[] work with function results and evaluate them at the same time. ...
34 views

### Convolve[…] behaves differently to that of Integrate[…] when numerically integrating the result

I am performing a convolution between two functions, and then I want to numerically integrate the result. If I go: ...
115 views

### Help! SystemException[“MemoryAllocationFailure”]

I am trying to run this code: ...
38 views

### Calculate with general discrete probability functions?

I would like to work with a discrete probability function $P[x\_]$ that only has the property that it is defined for $x\geq0$, such that Sum[P[x],{x,0,Infinity}] ...
36 views

### Problem in importing function in NDSolveValue

I have a code for solving a system of 2 differential equations (sol1). Given that what's inside is a bit heavy, I define functions so that I can call them. My issue is that when I write everything ...
72 views

140 views

My code is: ...
76 views

...
77 views

### Possible bugs with InverseFunction in version 11.2

See these two examples ...
48 views

### How to handle functions with varying number of arguments

Suppose I have a function that depends on variables $x_1, ... , x_n$. For concreteness I may have $f(x) = v \cdot x$, with $v$ a certain vector. Now I want to do certain operation with this function, ...
86 views

### Mathematica can't evaluate the function at the point where it is smooth

Suppose the function ...
80 views

82 views

726 views

### Polar to Cartesian and Cartesian to Polar Transformation

I have noticed some odd behavior when converting from Polar < -- > Cartesian. For example; https://math.stackexchange.com/questions/290209/diff-eq-transformation-polar-coordinates We want to ...
78 views

### The wire frame from a Plot3D gives a jumbled mess for a wire frame

Some time ago I found a post that turned the triangles of a mesh into polygons. I have spent 2 hours looking for that post and can not find it. The problem: Plotting ...
259 views

### How to get user input using FormPage

I am designing a user interface for a word-ladder game using CloudDeploy, CloudExpression and FormPage and I am having trouble with receiving the user input from the form. What I basically need is a ...
56 views

### Is there any point to using a variable as a function parameter?

Normally one only sees patterns as function parameters: fun1[x_]:=x^2 Is there any point to using a variable in a function definition: ...
38 views

### Function with many lines that takes image as parameter not returning same result as if I run the same lines of code

Running the exact same lines of code in a function produces just a return of the original image without any points identified, whereas when I run the exact body of the function line by line it works ...
83 views

### Finding correct combination of functions

I am trying to write code where I have an array $S$ or numbers in any order [5,4,2,1,....] Then I have a specific set of functions that I can write. ...
191 views

### Help with calculating a complicated integral

Edit: The question is solved : )) Thank you for your attention ! I am sorry for mass questions, but the question bothers me a lot. So I would like to ask this question here. This problem arises when ...
51 views

### When evaluating this integral Mathematica returns two different answers

When evaluating this integral in Mathematica 10.3 Student Edition: ...
46 views

### Defining an object which is function in some variables and tensor in some other indices

I am trying to define an object which function in some variable and tensor in other indices. My attempt at it was: ...
106 views

### DiracDelta of a function

If I have, for instance, FunctionExpand[DiracDelta[x^2+x-3]] it evaluates to ...
87 views

### Which method to use for finding maximum without actually computing optimization function explicitly?

I am new to Mathematica and I am currently working on an optimization problem. The optimization function that I have easy to calculate for some assignment of variable but it is very difficult to ...
258 views

### How to simplify an expression with a radical sign nesting in a radical sign

Is there a function can simplify an expression with a radical sign nesting in a radical sign in Mathematica? I use V9. RatDenmon is a function that can ...
74 views

### Input Reduce[Mod[a + x, l] == 0, x]' and output x == -a + kl`?

Reduce[a + x == k l && k > 0, x] (* k > 0 && x == -a + k l *) I think a + x == k l and ...
100 views

### What are the differences between these functions when used for NMaximize?

In short, the question is how to construct the function you want to optimize? ...
100 views

### Improving RationalInterpolation Result

The following code produces a {4,4} rational interpolation approximation accurate to 10^-6 or better over the range ...
493 views

### Crosscorrelation for nonperiodic signals

I want to detect patterns (of an absorption spectrum which is nonperiodic) with Mathematica automaticly. I have found CorrelationFuncion but as far as I understand, ...
simple Example: maximize $u(x), x$ solution would show constraints: $\frac{\partial u(x)}{\partial x} = 0$ $\frac{\partial^2 u(x)}{\partial x} < 0$ etc... or do I always have to explicitly ...