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

learn more… | top users | synonyms

2
votes
0answers
71 views

Function output

I would like a function that computes Cartesian product of two sets z=(Tuples@{#1,#2}), and computes the number of elements in this set(list) ...
8
votes
0answers
86 views

Slot number cannot be filled

I got a strange message with the derivative of a two-argument function defined by a definite integral. For example if "f" is defined as: ...
0
votes
2answers
126 views

How to define a formula-less function? [closed]

How can I tell Mathematica that $f(t)$ is a function of time without providing it with a formula? I want to write an auto Lagrangian calculator. And a derivative taker is needed which writes the ...
0
votes
0answers
26 views

Find Sequence Function and Clustering

After I created the eventfinder function (see 1st question First position of incremental series), for increment 20, I found that the incremental Events Manifest at: ...
1
vote
2answers
129 views

How to show convergence to a number?

How can we show that, using either of the two equivalent functions, we converge to some number? $$\sum_{n=0}^\infty f(n)\ =\ 2.75056...$$ $$ f(n):=\frac{1}{\binom{\frac{1}{8} \left(2 (n+2) ...
0
votes
0answers
52 views

Using DeleteCases to ignore term of Product

I'd like to calculate $\int_{-\infty}^{\infty}\mathrm{d}x/(1+x^6)$ through a variation of the residue formula, which is $\int_{-\infty}^{\infty}f(x)\mathrm{d}x=2\pi i\sum \text{Res }f$ for Residues in ...
0
votes
0answers
32 views

Solving for limit of integration with a piecewise function (FindRoot vs NSolve) [duplicate]

I am trying to solve for the limits of integration using a piecewise function. I'm doing this in a loop over a list of data, mostly because I'm not well-versed enough in Mathematica to make this a ...
1
vote
2answers
124 views

How do I get Series[] as a functional, rather than as an expression (i.e. to avoid the dummy variable)?

How can I write an equivalent to Series that doesn't require a dummy variable? Note that the series should be constructed before the evaluation point is supplied, ...
1
vote
1answer
39 views

How do I convert an expression that is a function of some variables into a functional?

If I have an arbitrary f[x, y, z], how do I convert it to f[#1, #2, #3] & without messing up scopes or causing scope ...
1
vote
2answers
131 views

Express roots of quadratic equation in a specific form [closed]

By solving this equation, I got two roots as follows: Solve[1 + Subscript[a, 1]*s + Subscript[a, 2]*s^2 == 0, s] Is there a way to express it in the form below ...
5
votes
2answers
135 views

Using OddQ and EvenQ in piecewise functions: Buggy?

I was trying to evaluate a sum over a piecewise function, not unlike this example. However, my piecewise function needed to be defined differently for even and odd ...
7
votes
1answer
271 views

Branch cuts of sqrt

I was trying to plot some complex functions with branch cuts on mathematica but I have two problems. 1) The function is with z-Sqrt[z-1]*Sqrt[z+1] with z complex. Now Mathematica says that the ...
3
votes
2answers
97 views

Dealing with a sequence of function arguments that may contain lists

I have a function with multiple input parameters, Func[x1, x2, x3, ..., xm]. On occasion a subset of these parameters might be provided as a list ...
5
votes
2answers
78 views

Hiding independent variables of a function in Traditional Form

I would like to perform a computation which involves fourth-order derivatives of a composite function of four variables. I am defining my function as ...
6
votes
2answers
123 views

How to introduce two successive points inside the FixedPointList for each cycle?

If we want to draw the attraction basins of an iteration function of the following type $$x_{k+1}=x_k-\frac{f(x_k)}{\frac{f(x_k)-f(w_k)}{x_k-w_k}},$$ where $w_k=x_k+b f(x_k)$, $b\in R-\{0\}$, we can ...
0
votes
1answer
42 views

Computing approximations of exponential [closed]

I have the code f[x_] := 13 x e^-x bit = Nest[f, 1, #] & /@ Prepend[1]@Range[4, 16, 4] Which I am using to compute values of $f^{(4)}(1), f^{(8)} (1), ...
0
votes
1answer
56 views

Using Plot3D for finding trend clearly

I have a function of two positive variables $t$ and $C$ with $t$ and $C$ in a specific range as below. $0 < C < 10^{-5}$ and $0< t <4.54 \times 10^{-6}$. I want to see which variable of ...
1
vote
1answer
31 views

Iterating my function by $4$ using NestList — Syntax Confusion [duplicate]

I want to iterate my function $f(x) = 13xe^{-x}$ by $4$ multiple times. That is, $f, f^{4}, f^{8}, f^{12},\cdots$. Using Nestlist[f,x,4] I can get $f,f^{(2)}, ...
0
votes
2answers
103 views

Trouble creating a bifurcation diagram of a trajectory

I wish to create a bifurcation diagram of the trajectory made by $f(x,a) = a - x^2$ which shows the tangent bifurcation point and the period doubling point. The tangent bifurcation point occurs at ...
0
votes
0answers
28 views

Obtain a SymmetricReduction of a bivariate (symmetric) function given in Piecewise form

I would like to re-express the following bivariate (symmetric) function (defined over the unit square) ...
1
vote
0answers
48 views

Creating an indexed set of functions with the indices in the function names [duplicate]

As the titles describes, I want to create a list of functions like the following, where the indices are not in the argument slots: ...
2
votes
1answer
63 views

Create an accumulator array from a function

I am making some images for a project about the hough transform line detection, I am showing the slope-intercept form , the normal form and their accumulator arrays to show the peaks. I am kind of new ...
1
vote
1answer
52 views

Using the Nest function — Confusion on my output

I have the following code and output where the original function is $f(x,a) = a^2 - x^2$. ...
3
votes
0answers
67 views

The implementation of FunctionRange

How exactly does the FunctionRange work? What kind of algorithm does it use? I looked it up in the manual but it doesn't provide any references or even a name of ...
0
votes
0answers
25 views

Symmetric properties of KroneckerDelta under replacement

The consider the following code: ...
1
vote
0answers
49 views

Different behavior of Power between versions 9 and 10

Rather by accident I've noticed that the following trivial code produces different output in Mathematica 9 and 10: -((-1)^n) Mathematica 9: $-(-1)^n$ ...
2
votes
0answers
63 views

How do I define a collections of commands for later use? [duplicate]

Many ask me to tackle this problem by making another function(subroutine) of the lines I want to pick out, using Block,Module,etc The problem is different here.Notice that Block and Module ...
4
votes
0answers
68 views

RealDigits and functional style

So while thinking about Replacing numbers of which you only know certain digits I have faced, again, a problem that I find hard to extract from RealDigits' output ...
1
vote
1answer
47 views

Want to map over both the file data and the file names of the data source files

I have a lot of experimental datafiles I would like to plot first and check, if they can be used for further analysis or not. To avoid importing every single file I used FileNames and than mapping. ...
3
votes
1answer
73 views

plotting after solve does not display anything

I'm quite new to Mathematica language, I am trying to figure out where I am making mistakes in Plotting a specific function that depends to other variables: I want to plot ...
4
votes
5answers
314 views

Alternative to Sign

The Sign function works in a very straightforward manner: Sign[8] Sign[-8] Sign[0] ...
1
vote
2answers
76 views

Problems using a function as an argument

I made a function: f[x_]:=x^2+1 and when i use it on, for example f[5], i get the answer 26. . But when i use it on: PollardRho[a_, f_] := Module[ {}, Return[f[a]] ] And when i write ...
0
votes
1answer
44 views

Using the Solve function [closed]

I am new to using Mathematica and am attempting to find the roots of a function using the Solve[] function. I can replace $f[x]$ within Solve[] with the actual function and it will work that way, but ...
4
votes
1answer
113 views

Associations complement

So I'd like to complement two associations through shared keys... not the best description, so here's an example: ...
2
votes
2answers
151 views

Revolve a non one-to-one function about the y-axis

I am attempting to revolve $f(x)=-x(x-3)(x-2)^2$ about $x=0$. What I have come up with is that I need to redefine each interval between the relative extrema as a separate function, and then treat it ...
3
votes
2answers
104 views

How do I run 1-855 data points( imported from excel sheet) into a formula to obtain value for each data point?

I am very new to Mathematica and I just couldn't figure out the solution for the following problem. I have two columns in an Excel file. I have imported the 1st column as ...
1
vote
1answer
52 views

Define a function interactively with sum

I have to define a function which has 1e4 terms added up together. f(x1, x2) = (sum i, j, k, l from 1 to 10) (C(i) * C(j) * C(k) * C(l) * exp( (alpha(i)+alpha(j)) * x1 + (alpha(k)+alpha(l)) * x2 ...
4
votes
1answer
178 views

Computing the Caputo fractional derivative of a polynomial

In fractional calculus, the Caputo derivative of a monomial has the following form: $$\operatorname{\mathit D}_t^\alpha\,t^\beta = \frac{\Gamma(\beta+1)}{\Gamma(\beta-\alpha+1)}t^{\beta-\alpha}$$ I ...
2
votes
1answer
52 views

Simple plot but the origin is not clear [closed]

I am having problem with the simple plot below. Plot[1/(1-x), {x, 0, 1}] I got the result: As you can see the origin (0,0) is not clear. The value of the function at x = 0 is one but it is not ...
0
votes
1answer
43 views

How is the DistributionFitTest[data, dist] function actually using the dist parameter?

The first "Applications" example given for the DistributionFitTest of the Wolfram Language & System Documentation Center is: Analyze whether a dataset is drawn from a normal distribution: ...
1
vote
1answer
43 views

Having trouble taking derivative of a function and assigning it to a new function [closed]

I am trying to take the derivative of a function and assign it to a different function name, but I am getting an error message (I think). Here is my Mathematica input: ...
6
votes
1answer
125 views

P-values differ in tests for normality between Mathematica and SAS

I am testing the following data for normality, in Mathematica and SAS: ...
11
votes
6answers
435 views

Reshaping associations, generalization of GroupBy

Let's say we have a set a\of associations: ...
12
votes
1answer
889 views

Why is this 2D plot so slow?

I first do a 3D Plot of four surfaces (eigenvalues of a $4\times4$ matrix) over $kx,kz$ (setting $ky=0$ all along). And then I try to give a 2D plot along three connected particular lines in ...
4
votes
1answer
100 views

Do Any of the filter functions perform a LOESS or LOWESS filter?

From the Data Transforms and Smoothing guide there is a link to the Linear and Nonlinear Filters guide. Do any of these filter functions perform a LOESS or LOWESS filter on set of paired data? ...
1
vote
1answer
80 views

Double arguments and place of the underscore

Could someone explain me of this bit of code below is correct: Is it possible to define a function with a second bracket, see below, i.e. f[x_][y_]? And what does ...
1
vote
1answer
56 views

How to properly plot a unit pulse? [duplicate]

I am using this function to plot ...
19
votes
5answers
492 views

Partitioning a list when the cumulative sum exceeds 1

I have a long list of say 1 million Uniform(0,1) random numbers, such as: dat = {0.71, 0.685, 0.16, 0.82, 0.73, 0.44, 0.89, 0.02, 0.47, 0.65} I want to ...
1
vote
1answer
70 views

How do I write a function inside a ArgMin

I want to solve this ArgMin[NIntegrate[(Tanh[x] - Erf[x/a])^2, {x, -5, 5}], a] and it does not work, what is the correct way to do this? ...