# Tagged Questions

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

73 views

### Defining a function using a preceding expression

How can I automatically define a function inside my Mathematica code using a result (expression) that preceded the point of definition. For example: ...
125 views

### Quantize a real-valued function?

I'm wondering if there's a built-in way in Mathematica to take a function whose output values are continuous, and quantize it to produce a step function. For example, I have the function ...
77 views

### How to package a function for export?

I often post code for functions on Stack-Exchange, and then later find that they are unexecutable - that people can't use them because I mistakenly omitted some private functions or values that are ...
247 views

### Where is the old option TraceInternal->True?

Already at least in version 2 (I think), the function Solve calls the function Roots. At that time, I had a rather dirty trick, that still works, to verify this: ...
61 views

### Defining a function with algebraic parameters

I am trying to define and use a function to represent the eigenstates of a Quantum Harmonic Oscillator, which have the general form: \psi_{n}(x) = \frac{1}{\sqrt{2^{n} n!}}\left(\frac{m \omega}{2 ...
78 views

### Define function over expression

Suppose I have the following expression system = x + y + z And I would like to define a function that contains this function, without explicitly typing the right ...
112 views

### Defining a function which displays odd numbers? [closed]

Define a function that takes as input an integer n and returns as output the product of the first n odd numbers., i.e., 1 · 3 · 5 · · · 2n − 1. Evaluate your function at 1, 2, 3 and make sure you get ...
185 views

### Difference between Evaluation>>Quit Kernel and Quit[]

What is the difference between Evaluation >> QuitKernel and Quit[]? Both seem to quit the kernel (and clearing all ...
741 views

### How to find volume of an egg [closed]

I am a first time user of mathematica. I've been trying to figure out how to find the volume of a) f(x)=(ax^3 + bx^2 + cx + d)sqrt(1-x^2). I have been scouring the internet for a solution on how to ...
61 views

### Lists for built-in functions that can work without brackets

I just noticed that Exit and Quit can work without brackets i.e. a single Exit or ...
89 views

### FinancialData Input

What does the function FinancialData require as input for natural gas: http://finance.yahoo.com/q?s=NGG15.NYM Is it easier to export the natural gas data to ...
700 views

### Generating Random Real numbers with certain numbers not included

I'm writing a program that i need 1000 real number between -3 and 6. the code that I used for generating and saving them was l = RandomReal[{-3, 6}, 1000] But I ...
99 views

### RegionPlot fails when given function with internally redefined variables

I've just upgraded to v10, and have noticed that some of my trusty old notebooks which used RegionPlot now fail to run. I've boiled down the problem I'm having to ...
53 views

### Improving RationalInterpolation Result

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

### Composition of Multivariable function

I am trying to compose functions of xleft, maybe like xleft[xleft[f]] or even higher order. And here is my function: ...
76 views

### Diffentiating a function f with respect to x [duplicate]

I have a tabe y={10,20,30,40...} and x={62,63,64,65...} y is a function f and this function needs to be interpolated. How do I defferentiate the function f with respect to x?
269 views

### How to make a function from body with variable number of arguments?

Suppose I have an UNKNOWN function, which generates formulas with given number of x[i]. ...
49 views

### Taking function output as shown, and processing it regardless of its history

I am making some symbolical calculations for my quantum chemistry class. I am supposed to build a wave function composed of multiple other functions, each of which is also composite of some lower ...
53 views

### What is the simplest way to obtain function obect of a given function?

Suppose I have a function p of some arguments: p[x_,y_]:= (* something *) Now I with to pass this function as an object to ...
2k views

### How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc

I'm trying to expedite some quantum mechanical calculations by running them through Mathematica. Expectation values and stuff like that. When I say, for example, ...
140 views

### Why does LyapunovSolve solve non-standard form?

LyapunovSolve[A,Q] solves the equation $A P + P A^T = Q$ for $P$ whereas the standard form (wikipedia,lecture notes, p.25, linear control systems) of the Lyapunov ...
219 views

### How to define a nested function like this?

For example, I want to calculate the limit of $\frac{1}{1+\frac{2}{1+\frac{3}{1+\ldots}}}$. So I want to define: $f(1)=1$ $f(2)=\frac{1}{1+2}$ $f(3)=\frac{1}{1+\frac{2}{1+3}}$ Then I calculate ...
75 views

### Mathematica Lattice Reduce Command

I'm going through a very old copy of "Mathematica: A System for Doing Mathematics by Computer" for self practice. I'm on chapter 3, and ran into the LatticeReduce ...
210 views

### cycloid parametric [closed]

How do I enter 3 parametric equations for cycloids corresponding to circles with radii 1, 2, and 4. I have tried ...
150 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, ...
164 views

### Missing control for depth of Inner

Working on a mechanics problem, I stumbled on something peculiar: Since Inner is a generalisation of Dot, it changes its ...
50 views

### How to add a part of a list to a function?

I want to be able to add a specific portion of a list to a part of a function but this fucntion intakes 6 variables where as the list is of example: ...
30 views

### Why the same function defined by Set and SetDelayed look different? [duplicate]

I am novice to Mathematica and maybe my question looks kind of silly, but nevertheless here is it. I input two functions: ...
120 views

### Show how Eliminate arrives at reduction

Does anyone know how to get Mathematica to show how it arrives at the following result? ...
80 views

### Help creating a simple function

Can someone help me to create a function. The truth I'm new in Mathematica and I don't understand well the way functions work in I. I need a function that animate some rectangles according to a curve ...
77 views

### Integrate[] does not work when the function has an antiderivative function

This function (1 + (1 + 1/(2*Sqrt[x]))/(2*Sqrt[Sqrt[x] + x]))/(2*Sqrt[x + Sqrt[Sqrt[x] + x]]) has the antiderivative function, since ...
249 views

### Putting two functions in one manipulate plot

I have a problem that is somewhat related to this http://stackoverflow.com/questions/7727668/putting-two-plots-in-a-manipulate-whilst-keeping-the-plots-visible but I would like to plot two functions ...
216 views

### How do I override options with my own defaults?

I'm calling a function f from within a function g and would like to pass any valid options for ...
134 views

### using Module in NDSolve

I am trying to solve a set of two wave equations where solution of first equation defines initial conditions for the second one. And I would like to use Module to define those equations as a function ...
106 views

### Apply functions to functions yields slow execution speed

I'm trying to write a function that parametrizes a curve c(t) by its arc length. Technicly I'm finished but if I plot the result for an example curve like ...
616 views

### Enumerating tuples from a larger space such that all pairs of values are present at least once

I am trying to write a function that will accept a list of N lists and returns a list of N-tuples that represent all pairs of values from the original N lists at least once. To illustrate with an ...
178 views

### Manipulate - Evaluating Value of Function [closed]

I would like to visualize the properties of a threshold, which is a value of a function. Unfortunately, the value is expressed as scientific value (an approximation with 3-5 decimals would be fine) ...
37 views

### Apparent issue with derivative of FractionalPart [duplicate]

This issue came to my attention from Math.SE: http://math.stackexchange.com/questions/1015325/is-the-derivative-of-x-on-0-1-always-equal-to-1/1015342#1015342 To summarize, it appears that ...
149 views

### In there a way to derive the inverse value of CDF format MultinormalDistribution?

Is there a way to produce the inverse value of multinormal distribution function in CDF format with 0.05 significance level? I found the function called ...
123 views

### simulate a 32-bit signed integer overflow in a recurrence function

Considering the following recurring equation: which is this factorial function: I want to find the value of x where f(x) = 0. Actually, the solution is impossible with Mathematica, and it's ...
109 views

### Error: in the part assignment is not a symbol [duplicate]

I am trying to set part of a Doubly-indexed list aInitialPopulation to cNumHeg. Specifically I am trying to set the 3rd part of the list aInitialPopulatiom[[cNodeNumber]] to cNumHeg. My (attempted) ...
175 views

### What is the shortest way to switch between heads of nested functions

consider this example: f[g[x]] what is the shortest way to switch between heads of nested functions to produce. g[f[x]]
117 views

### Using Integrate to define a function

I'd like to define a function by way of the output of a definite integral with symbolic bounds. For instance, F[m_,k_] := Integrate[x,{x,m,k}] would define ...
49 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 ...
2k views

### Which Mathematica function has the longest name (by character length?)

I came across DamerauLevenshteinDistance[u,v] in the documentation center so that got me thinking: Which documented Mathematica function has the longest name? ...
44 views

### Should this be equal to Gamma function or not?

I define the following function: Nat2[s_] := InverseFourierTransform[FourierTransform[1/t, t, w] (-I w)^(s - 1), w, x]/Cos[Pi (s - 1)] /. x -> 1 I expected ...
291 views

### Why does the documentation call functions “pure”?

Clearly, functions in mathematica are not pure functions according to the definition on Wikipedia (no side effects - basically implementabe with table lookups): ...
225 views

### How can I call the R-programming packages in my Mathematica?

I am trying to call the R-programming package called highfrequency in my Mathematica so that I can use its function rCov. I ...
today I was writing a code which takes some line equation and a circle equation,finds intersection points that are on $II$ and $III$ quadrants,draw a tangent line to circle from that point and then ...