# Questions tagged [functions]

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

235 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
79 views

70 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 ...
231 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 ...
55 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 ...
80 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: ...
102 views

### DiracDelta of a function

If I have, for instance, FunctionExpand[DiracDelta[x^2+x-3]] it evaluates to ...
85 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 ...
239 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 ...
68 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 ...
99 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? ...
95 views

### Improving RationalInterpolation Result

The following code produces a {4,4} rational interpolation approximation accurate to 10^-6 or better over the range ...
467 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, ...
221 views

### RowReduce doesn't work for this matrix?

I have this matrix A={{0,1,1,w},{1,0,1,x},{-1,0,1,y},{0,1,1,z}} where w, x, y, z are arbitrary constants. This matrix should be row reduced to the form ...
61 views

### Is it possible to calculate with declarations only?

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 ...
417 views

### Expression for evaluating multiple functions?

I am constructing 3D data points for a plot and corresponding to specific conditions "manually". I define the values of five parameters [these I always have to define myself]. From those, I evaluate ...
82 views

### Distinction between 2 NETTypeInfo answers

In a NETLink application I checked all the types offered by LoadedNETTypes[] according to the following: ...
95 views

### Decapitating “explicit” and “implicit” heads

This is a follow up to this question. So far, I named "explicit" heads to those that appear explicitly in the expression. For example, f[x] has an explicit head. I ...
202 views

### parameter NDSolve

the question I need to solve is: t x'[t] == -x[t] + y[t], t y'[t] == -5 t^2/x[t]^2 + x[t] - y[t], x == 4, x[b] == 1 in order to solve the coupled ...
165 views

### CDF with numerous independent manipulate objects

I have been working on my senior project that involves the creation of a CDF with multiple Manipulateexpressions. I need to protect my code so I have been trying to ...
164 views

### Does GraphicsMeshSimplePolygonQ[] work for you?

GraphicsMeshSimplePolygonQ is an undocumented function. I'm using Mathematica 7, and when I try: ...
110 views

### Solving for vector elements in a function to which the vectors are not passed explicitly

I want to define a function which takes in two integers (indicating the lengths of 2 vectors), and solves a simple set of expressions at a set of points to find all the values in both the vectors. so ...
50 views

### Simplifying polynomial fractions with same DiracDelta` function in both denominator and numerator

I am trying to simplify an expression with multiple Diracdelta functions in both numerator and denominator. For example, ...
35 views

### Defining a function and order of operations

I feel I have a profound misunderstanding of how Mathematica works. Here's an example that confuses me: Say that for a matrix $A$ I want to extract the first $\mathrm{Tr}(A)$ normalized eigenvectors (...
43 views

### Delayed Rule right-hand-side mis-evaluation

Outline I am trying to create a rule that will give me a minus sign if the number of times A is applied on X is odd where A is some οperator and X a random quantity. Some of the configurations of ...
27 views

### Creating a special product function

I am having trouble working with lists inside functions with Mathematica. Basically, I have a list of numbers and a special way to multiply them. I want to have a function that is able to create a ...
37 views

### Get R^2 value between interpolating functions and a list of points

I am looking to compare the degree of accuracy of a theoretical model by comparing my theoretical curve to my experimental data points. My theoretical curve is an interpolating function generated ...
45 views

### Define a function including two solve solutions

I'm trying to combine the solutions coming from two NSolves and define a new function that I've to integrate. Basically I've defined two ...
19 views

### InverseFunction cannot evaluate negative arguments

I have difficulty figuring out where my code fails. I want to obtain $\textbf{ry}$ which is the inverse function of rho (see below). When I input positive values for its argument, there's no problem. ...
28 views

### Easiest way to simultaneously keep track of two values in a list

I have a bunch of functions a,b,c,... that all take in a list of images and return a list consisting of a list of transformed images, and a number (let's call it ...
76 views

### NSolve not solving my transcendental equation

Would be grateful for your help in tackling this complex polynomial where I am trying to solve for x. When I run the code below, I get the message: value x of ...
24 views

### Factor[p(x), a, b] not working in Galois theory package

I have downloaded Galois theory package from http://library.wolfram.com/infocenter/Articles/2872/ and I currently have Mathematica v 12.0. When I loaded the module (I needed to delete the blue stuff ...
35 views

80 views

### Array of polynomials

So I have a big list of 75 polynomials which I need to apply a sequence of operations to. My original program (an extract of which is below) worked fine: ...
47 views

### Function works outside For loop but not inside, and loop fails spectacularly

I'm building two lists, each to carry a different representation of the same set of objects. One list, list2, is constructed first; then the second list, ...
65 views

### How to list all the possible functions of given structure?

I can run this command : Tuples[{ Tuples[{x, y, z}, 2], {a, b, c}}] to list all combinations that looks like: ...
39 views

### Function iteration

I wrote a function in Mathematica that applies certain construction steps on the "incidence matrix" of a graph in order to obtain a new graph with certain properties. These construction steps can be ...
87 views

### Problem with fitting

So I have a very simple question related to a simple topic, but also directly related to a fitting problem. I see that my question is related to this question but I don't manage to make the bridge ...