# Tagged Questions

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

27 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: ...
207 views

### The UnitStep function and Intervals

For the input UnitStep[Interval[{-4, 5}]] I get Interval[{0, 1}] Why is this not ...
53 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 ...
990 views

### How to plot several functions without jumping? (multiple eigenvalues of a system as functions of 2 parameters)

I've been working on this research problem for months with some success by no global/proper solution to the problem. So I have square, Hermitian matrices of various sizes ($8,20,38$ dimensions) with ...
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 ...
133 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 ...
40 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 leakage?...
138 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 ...
83 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 ...
292 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 ...
102 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 ...
262 views

### HistogramList is much Slower in 10.2 vs 10.1

While I was running a code I wrote using version 10.1, I noticed that in version 10.2 the running time of the same code was more than twice as long. After some digging, I figured out the culprit is <...
7k views

### What are the use cases for different scoping constructs?

Mathematica includes three functions that I know of which can be used to effectively (if not actually) define a variable and give it a value within a local scope: ...
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 ...
59 views

...
414 views

### More Ticks::ticks errors in AbsoluteOptions in v10

Bug introduced in 7.0 or earlier and persisting through 10.4 or later While the specific bug affecting Plot described in AbsoluteOptions prints error messages in ...
71 views

### LineScaledCoordinate problem for exact coordinates

Edit: Confirmed bug. CASE:2326540. Still the case in V 10.4. Solution: Wait and use N meanwhile. I've faced this problem ...
42 views

105 views

2k views

### How to completely delete the head of a function expression

Is there any way to completely remove the head of an expression function? For example, how would I remove the head Cos from ...
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) ...
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: ...
180 views

### Transform list of inequalities into matrix form $A\ x \leq b$

I have a list of linear inequalities, and I want to get it into the form $A\ x \leq b$; i.e., find the matrix $A$ and the vector $b$. Is there any function in Mathematica that can that can do this?
3k views

### Define a color function using Piecewise

How can I define a ColorFunction for my ContourPlot using Piecewise? For example, after ...
470 views

### Expansion in Basis Functions

I am trying to create an expansion of the form f[x,y]->Sum[Cn[x] y^n,{n,1,order}] To replace the function f by the ...
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 ...
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$. ...
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 ...
27 views

### Symmetric properties of KroneckerDelta under replacement

The consider the following code: ...
74 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 ...
51 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$ ...
71 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 ...
64 views

### If Statement in function does not evaluate

I've written a function that should try to simulate a "triangle-wave-signal", given a few parameters. It looks like this: ...
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. ...
252 views

### Vertex descendants subgraph

Keywords: vertex, ancestors, descendants, subgraph, directed graph, flow subtree So let's say we have a TreeGraph: ...
319 views

### Alternative to Sign

The Sign function works in a very straightforward manner: Sign[8] Sign[-8] Sign[0] ...
142 views

### Unexpected behavior from Indexed (threading and messages)

I was going to include Indexed in this answer, thinking that it operated much as a List-only ...
260 views

### What is the difference between defining a function and specifying the type of argument, versus applying a test to that argument?

Say I want to create a function that evaluates differently based on what type of argument is given. I've found two ways of doing this, ...
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 ...
2k views

### How could I define a function as the solution of equations in Mathematica?

I have posed a specific question yesterday but it may be too trivial to answer. I think the question could be asked in a more general way so it is easier to answer. Then I could solve the original ...
45 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 ...
105 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 ...
51 views

### Oddity with ToExpression [duplicate]

Is this a bug? ToExpression["3231.432"] 3231.43 I would have expected the following: 3231.432 I am using Mathematica 10.2.0
114 views

### Associations complement

So I'd like to complement two associations through shared keys... not the best description, so here's an example: ...
152 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 ...
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 ...