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

learn more… | top users | synonyms

2
votes
1answer
77 views

Ted's explanation for the 3rd argument of ListCorrelate doesn't apply to the {1, -1} case?

I was reading Ted Ersek's explanation for the usage of ListCorrelate(.nb version can be found here) and noticed something confusing. It's the third example of ...
-1
votes
1answer
19 views

Iterator bounds error when defining function [on hold]

It's been a while since I've done any multi-line functions in Mathematica, so maybe I'm just missing something. I've created the following function, and I immediately get an Iterator bounds error when ...
1
vote
2answers
86 views
10
votes
2answers
134 views

Extracting the function from InterpolatingFunction object

I've used Interpolation[] to generate an InterpolatingFunction object from a list of integers. ...
4
votes
1answer
60 views

Possible bug / numerical issues with HypergeometricU — any suggestions for a fast workaround?

I've encountered some problematic behaviour with HypergeometricU. I have a probability distribution on the positive integers that takes the following form after ...
1
vote
0answers
43 views

Inconsistent linearity of inverse Fourier transform

Bug introduced in 8.0.4 or earlier and fixed in 9.0.1 or earlier I am trying to compute the inverse Fourier transform of this expression ...
0
votes
2answers
88 views

Collapsing summation

I am trying to write a command to collapse the sum of terms into an expression with summation. Something like ...
33
votes
2answers
700 views

Why is the new PositionIndex horribly slow?

This issue has largely been mitigated in 10.0.1. New timings for the final test below are: ...
2
votes
1answer
57 views

Find constants in a function? [on hold]

Let's say I have a function f[x] with n constants, e.g. f[x] = c1 * x + c2*x^2 + ... + cn *x^n I also have n conditions to find those constants, e.g ...
-1
votes
0answers
46 views

How can I eliminate “Solve::verif: Potential solution” error message from the Solve function?

I am running a Solve function with some determined variables and some updated functions. The variables with double brackets already have their own values, and the variables with single brackets are ...
4
votes
0answers
146 views

Strange behaviour of MMA in derivatives of some standard functions

There are some peculiar things to be discovered in derivatives of some standard functions in MMA: Strange behaviour Example 1: Abs We have ...
0
votes
0answers
83 views

Defining a Gaussian Distribution Fit to data

I am given a set of data and told ahead of time that the data will need to be fitted to a Gaussian Distribution. I know that Mathematica has preset functions for linear, quadratic, and cubic fits, but ...
9
votes
1answer
192 views

Limit of sequence of functions behaving strange

I'm trying to determine the limit of the sequence of functions $$f_n(x)=\left(\frac{1}{\pi}\arctan(n x) + 1/2\right)^n. $$ I define ...
0
votes
1answer
72 views

StreamPlot in Mathematica

A $2\times 2$ linear ODE system can be visualized by SteamPlot in Mathematica. For example ...
3
votes
0answers
53 views

Listable on first level

I have some function which take List as input. f[l_List]:=someActions[l] I need apply this function to a list of lists. Now I ...
1
vote
1answer
39 views

Strange behaviour of Set and Part when given a sequence

Consider this example: lis1 = {a, b, c}; lis1[[2]] = Sequence[e, f]; lis1 (*{a, e, f, c}*) lis1[[2]] (*e*) lis1[[2]] = Sequence[g, h]; lis1 (*{a, g, h, c}*) It ...
5
votes
2answers
167 views

Is there a built-in function which detects singularities in a function?

Given a function f[x] and a region M in the complex x-plane, how can I find singularities of f in this region, i.e., issue a ...
11
votes
6answers
778 views

Will Version 9 functions all work in Version 10?

Having developed a substantial code base in Mathematica 9, leads me to ask these important questions prior to downloading and installing Mathematica 10. Will any Mathematica functions from the ...
2
votes
0answers
89 views

Generating function for Newton series?

The function GeneratingFunction gives generating function for Taylor series. Is there a similar function for Newton's series? $$f(x) = \sum_{k=0}^\infty \binom{x}k \Delta^k [f]\left (0\right)$$
5
votes
2answers
150 views

Strange Behavior when making Equal Listable in Pick

While trying to make this problem more efficient I tried different methods and dabbled with making Greater and Equal ...
0
votes
3answers
45 views

Complement change order of elements

Consider this example: Complement[{a, y, c, d, e}, {a, c}, {d}] (*{e, y}*) I was expecting the result to be (*{y,e}*) why ...
1
vote
1answer
62 views

How can I export numerical data in a calculation-favorable format?

I am exporting some data into the txt file but since the values exported to this txt file expresses 10^6 to be *^6, I cannot use these numbers in calculations in other programs.. For instance, when I ...
1
vote
1answer
88 views

How do I link the txt file data sheet to mathematica and extract exact elements that I would like to use in solving for x? [closed]

I am trying to solve for a numerical solution for an equation which contains variables that evolves as index i incrreases. The actual equation that I am using to extract solution for x with an ongoing ...
3
votes
2answers
79 views

Wrapping Interval Notation for Take

I'm trying to implement the solution to a math problem in Mathematica, but my code can't handle a particular boundary case. I think that I could implement a function that would do what I want it to, ...
0
votes
0answers
19 views

System of Nonlinear equations with Gamma and Incomplete Gamma function

The next two nonlinear equations are cumulative ratios of a production system. The mathematical model includes two essential parameters (n, tau) that can be obtained by solving this system. I'm ...
0
votes
1answer
130 views

Finding real roots for an eigth-degree polynomial

The context for this problem is identical to my first question. Unfortunately my previous result for $L$ was inexact since it was a relatively simple approximation. This time I have managed to produce ...
7
votes
4answers
362 views

Solving $L=\frac{3}{2} \sqrt{4 \pi ^2 A^2+W^2}-\frac{\sqrt{5 W \sqrt{4 \pi ^2 A^2+W^2}+6 \pi ^2 A^2+3 W^2}}{\sqrt{2}}+\frac{3 W}{2}$ for $W$

When I solve the aforementioned equation for $W$ or $A$ on Mathematica I get a long and ugly equation in return, namely one of the solutions for $W$ is: (attempt to read at your own health) ...
8
votes
1answer
108 views

Why won't SparseArray let me store values with the head List?

When you attempt to define a SparseArray with elements that have the head List it complains: ...
3
votes
2answers
143 views

Get domain for a given function (including e.g. singularities)

I am new to Mathematica and this is probably a simple question, but I can't figure it out at the moment... f[x_]:=1/(x-3) Clearly the vertical asymptote is at ...
3
votes
2answers
216 views

What would be the inverse function for the following condition?

I tried the problem but i couldn't take above condition in question in terms of f(x)
12
votes
1answer
143 views

A bug in Commonest in version 10

Bug introduced in 10.0.0 m_goldberg demonstrated that in Mathematica 10 Commonest does not behave as the documentation indicates that it will. Concisely: ...
4
votes
3answers
136 views

How to Nest a Function with three Arguments?

I have two functions with three arguments $f_x(a,b,t)$ and $f_y(a,b,t)$. And i need a nesting like this ...
5
votes
4answers
536 views

Use Mathematica to calculate the area enclosed between two curves

use mathematica Hence, calculate the exact area enclosed by these curves using Mathematica. $f(x)=x^3$ and $g(x)=x^5 - 2 x^3 - 3 x$ i have got the graph...now I'm stuck with finding the area
10
votes
4answers
455 views

Set of integers not divisible by smaller set of primes

Let $p_n$ be the sequence of prime numbers, and $s(x,n)=$ the set of integers less or equal than $x$ that are not divisible by $p_1,\dots,p_n.$ I can define it as follows: ...
0
votes
0answers
83 views

Simulation of Circular plate vibrations

I'm trying to simulate the vibration of a circular plate with a free edge. The plate wave equation describes the vertical displacement of the middle surface of the plate $(\zeta)$ as a function of ...
7
votes
5answers
323 views

What is my problem with MeshFunction?

I want plot the max value in a sine plot. We can use the following code ...
10
votes
4answers
893 views

How do I plot Thomae's function in Mathematica?

I wanted to plot this function $$f(x) =\begin{cases} 1 & \text{if } x= 0 \\ \tfrac1{q} & \text{if } x = \tfrac{p}{q}\\ 0 & \text{if } x \in \mathbb{R}-\mathbb{Q} ...
8
votes
2answers
547 views

Can you apply the Cellular Automata function to a grid containing numbers?

Im attempting to simulate a simple evacuation model using cellular automata theory.My study aims to determine whether Cellular Automata can effectively represent how people would behave in a fire ...
4
votes
4answers
222 views

implement the ZOH in mathematica [closed]

well I'm trying to implement the ZOH in Mathematica, but I can't. Take a look, this is my script: ...
16
votes
5answers
5k views

How to find the domain and range of a function with Mathematica?

I'm studying calculus and in some exercises I am asked to find the domain and range of a function. Does Mathematica have already a built-in function for this? I can imagine some ways of doing so, ...
4
votes
1answer
100 views
1
vote
1answer
89 views

Horizontally compress a picture with varying compression ratio [closed]

I have a function c[x] whose domain and range are both [0,1]. And I have a picture with width W, height ...
2
votes
3answers
221 views

How can I get the function of a plotted trajectory? [closed]

I solved two ODEs, which are a function of t, numerically. The first ODE is the vertical equation of motion and the second one is the horizontal equation of that ...
1
vote
2answers
54 views

How to use the output we see of expression when this expression is inside Dynamic

Consider this example: Manipulate[status = Dynamic[If[a < b, Yes, No]], {a, 2}, {b, 5}] The output of this calculation is ...
1
vote
1answer
73 views

Attaching functions to movable locators

I'm trying to create a manipulate plot showing the electric field due to a collection of point charges. At the moment I've created such a plot which allows the x and y positions of each charge to be ...
10
votes
2answers
209 views

Why isn't Lookup treated like other symbols?

With Mathematica 10, I wanted to overload Lookup using TagSetDelayed, but it doesn't work. For instance, if I define two objects ...
21
votes
2answers
437 views

Why is Query so much slower than Part?

Time for another of these(1),(2) as yet another new-in-10 function appears to have poor performance compared to older alternatives. This time: Query appears to be ...
1
vote
1answer
145 views

How to apply a tensor to a list of arguments

The problem I have is the following: Let C be a list of coordinates, say, C = {x1, x2, ..., xn} and ...
6
votes
1answer
95 views

How to sort the functions in a Package?

Once a Package like abc` has been installed, we can use "?abc`*" to scan all the functions defined in this Package. Now I ...
2
votes
1answer
112 views

RegionPlot3D run forever when plotting 3D ParametricRegion

when working with 2D, RegionPlot works fine with ParametricRegion as can be seen in this example: ...