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

learn more… | top users | synonyms

13
votes
5answers
11k views

Calling Correct Function for Plotting DiracDelta

I am wondering what is the correct function in Mathematica to plot the true impulse function, better known as the DiracDelta[] function. When using this inside of a ...
18
votes
1answer
386 views

Is the renaming mechanism of `With` flawed?

I'm confused about the renaming mechanism of With: ...
5
votes
1answer
110 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 ...
6
votes
3answers
149 views

What function superseded SpaceForm?

In older versions of Mathematica you could use SpaceForm to leave a certain amount of spaces when writing to a file. For example, if we have the following data: <...
1
vote
2answers
51 views

Passing each element of a list as an argument to a single parameter function [on hold]

Consider a single parameter function: g[w_] := w^2 +1; Consider a list: slist= Range[0, 100, 1]; Now when I apply function ...
0
votes
1answer
151 views

Check an inequality if one condition holds

A = Abs[-1 + 1/(1 + β)] + Abs[-((1 + 2 α + Sqrt[1 + 4 α + 4 α β])/(2 α + 2 α β))] Is A <1 if ...
0
votes
1answer
34 views

Defining a variable inside a function to reference it in the function

I am trying to define a variable and use it inside a function. However, I am having troubles calling the variable. For instance, I define the function ...
0
votes
0answers
65 views

Watched a Livestream with Christopher Wolfram, he used an operator that I can't find [duplicate]

I understand /., /@, /; and documentation exists in the normal way for all of those but I can find nothing on /*
0
votes
1answer
65 views

Intercept in the ARProcess

In the ARProcess help file I don't understand whether an intercept is included or not. How would I add one? I am using version 9 of Mathematica.
3
votes
1answer
246 views

Reduce a complex inequality

Reduce[Abs[1/(1 + I/Sqrt[α])] < 0.5, {α}] It is taking long time to run. Can any one help me to get the reduced condition in terms of $\alpha$ or its modulus. ...
1
vote
1answer
58 views

Mathematica Empty Plot FourierSinSeries function

I'm trying to get a plot of different order Fourier series of the function x-1, why does Mathematica give me an empty plot? ...
0
votes
1answer
59 views

Why is FindRoot failing to evaluate this function? [closed]

I have a (somewhat long) script which runs cleanly until the very last stage. Here, I'm using FindRoot to attempt to parameterize implicit curves in the zero set ...
14
votes
4answers
260 views

Distributing function arguments with function compositions. How to compute $(f + g^2)(x) = f(x) + g(x)^2$?

Suppose I have two functions f and g. To compute $f + g$ evaluated at a point $x$, I know that one can use ...
0
votes
1answer
53 views

How to plot a level set of a function $f(x,y)$ on Plot3D?

Suppose I have used Plot3D command to plot some surface $f(x,y)$. On this plot, I would like to clearly identify some level set of $f(x,y)$, let's say $f(x,y)=0$, and if possible, find the relevant ...
1
vote
1answer
83 views

How to define a function which takes another function as input in Module

Let $f$ be a function of $n$. I would like to define a function $A$ with module which takes $f[n]$ as input. So for example: ...
0
votes
1answer
62 views

Mapping a simple 2 variable function

Quick Question: What is the best way to map this function so it performs seperately for 102 different values of x? ...
0
votes
0answers
31 views

Basic Question on function of $n$ when it shift to $n-1$ [duplicate]

This question is basic, but I do not know what is wrong. Clear[a0,a] a0=n; a[n_]:=a0 But when I evaluate a[n-1] the output ...
3
votes
2answers
4k views

Nested If statements

When I do this: Apply[(If[#2 == what, "yay", If[#2 == whoops, "nay"]]) &, {-5, what}] I get: yay But when I do this: <...
5
votes
1answer
134 views

Evaluating standard functions of general quaternions symbolically

Mathematica can easily compute exponentials and logarithms of concrete quaternions: ...
2
votes
2answers
97 views

Analytic differential of an inverse transcendental function

I have the following function: $$ y(x)=\frac{Ax}{Bx^{1/4}\sinh{(\frac{Bx^{1/4}}{2})}}\left(\cosh{(\frac{Bx^{1/4}}{2})}-1 \right), $$ where $A=112.941$ and $B=18.6588$. I want to find the differential ...
1
vote
1answer
62 views

Finding a maximum of a Bézier function

Suppose I have a Bézier function $f:\mathbb{R}^2\to\mathbb{R}$ with random coefficients: ...
0
votes
1answer
59 views

How to draw a contour line that intersects with a specified line (perpendecular to xy plane)?

Assuming I have the 2D scalar field $f(x,y)$ and I want the contour line of $f$ that intersects with the line $x=2,y=3$. How can I do that? At further steps I want the equation for that contour line....
3
votes
2answers
134 views

Integrate on a contour in the complex plane

I want to integrate the function f[z]= z + Conjugate[z] over a circle of radius 2 centered at the origin. For the sake of stating something that I have tried: <...
0
votes
1answer
96 views

Find the equation of the parabola and sketch the graph [closed]

Consider the following information: A quadratic function with equation $f(x) = ax^2+ bx + c$ passes through three points, $A(-1,-1), B(1,-7)$ and $C(3,3)$.
1
vote
2answers
133 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, ...
8
votes
1answer
516 views

RootSum result manipulation/simplification

Consider the sum sum1 = Sum[ k/( k^7 - 2 k + 3), {k, Infinity}] ...
3
votes
4answers
198 views

Plotting the solution of $\sin(x)\sin(y)$ + elliptic cylinder

I have a problem with one of my school project :( I need to add function: $\sin(x)\sin(y)$ to elliptic cylinder $\left(\frac x a\right)^2+ \left(\frac y b\right)^2 = 1$ After few hours, only this ...
15
votes
2answers
497 views

Function with custom Options and modified Options for built-in Symbols

I couldn't find a more descriptive title, but I guess an example will explain my problem. I set up some customized Grid function including some additional ...
120
votes
8answers
11k views

List of compilable functions

Is there somewhere a list on the functions that Compile can compile, or the cases in which a particular function can be compiled that I haven't found? I'd be glad ...
4
votes
0answers
91 views

Argument attributes for pure functions [duplicate]

In his book, Leonid Shifrin says: One important limitation of the # - & notation for the pure functions is that it is ...
0
votes
1answer
60 views

How to use part specification as a function [closed]

I need to define elements of a matrix as functions; For instance the element "Q_nk" of the matrix "Q", to be defined as: Part[Q, n_, k_] := ... So, I cannot do that and receive the error message "n_ ...
0
votes
0answers
58 views

Solving a system of equations with conditional functions

With your help i am getting closer to the solution of my problem. I know that the code is long but most of it is boring definition. At the beginning i am just defining function, which works at the ...
10
votes
1answer
103 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: ...
-1
votes
2answers
137 views

How does one check a function monotonicity? [closed]

http://i.stack.imgur.com/JOS9o.png the question is to analyze $f(x)$ for monotonicity. I know I need to use D[f[x], x] and check if it is less than or greater to ...
0
votes
0answers
20 views

domain of an input variable

Suppose I have a function called Exercise which is called in this way: Exercise[Gamma[x]+x*n,x] How can I indicate that n is a positive integer?
1
vote
0answers
21 views

Express anonymous with formal parameters [duplicate]

I'd like to express the function F = Function[{#2[[1]] + #1[[2]]/#1[[1]], #2[[2]] + 1/#1[[1]]}] using explicit formal parameters. I've tried ...
0
votes
2answers
44 views

How to replace the argument of a function?

For the following expression, b'[x y/z]+z b''[x y/z] I want to replace the argument of b such that the above expression becomes ...
0
votes
1answer
53 views

How to Write a code to automatically generate the planckian locus in (u,v) space [duplicate]

in the CIE XYZ color space the three coordinates defining an electromagnetic spectrum are given by XT=∫x( λ ) M( λ , T )dλ, YT=∫y( λ ) M( λ ,T )...
1
vote
1answer
38 views

How to call a function with an arbitrary list as its arguments inside a functional? [duplicate]

I have the following functional defined (i.e. a function of another function) where variableList contains the variable (arguments if you wish) of the ...
3
votes
2answers
464 views

Permanently rounding numbers/values to a given number of significant figures

I am searching for a simple way of rounding and setting an input to a desired number of significant figures. There are a vast number of posts that discuss similar problems, but none address this issue....
0
votes
1answer
37 views

Replace argument of delayed function before it evaluates [duplicate]

How should I use replace so that f[x_] := x^2 Replace[f[3], 3 -> 1] OUT = 9 evaluates to 1, instead of 9? This way, the replacement of the argument is done ...
32
votes
2answers
2k views

Scan vs. Map vs. Apply

I cannot understand the difference between Apply, Scan, and Map. I have tried to play with ...
4
votes
1answer
122 views

What is wrong with my code so it neither produces a correct plot nor an error message?

I am trying to define some initial functions and then using them to define my secondary functions and then plot the secondary functions. I am supposed to get two curves with a finite width ...
1
vote
0answers
38 views

finding list by expresion [closed]

Well Im new to mathematica. I have list of x which contain {1,23,45,6,43}. And I get expression from g = Fit[t, {1, v, v^2}, v] how can apply list x to g to ...
5
votes
2answers
242 views

Symbolically Expanding One-Variable $q$-hypergeometric Series

In general, how do I get Mathematica to symbolically expand various infinite series to an arbitrary degree of accuracy? I deal with $q$-hypergeometric series quite frequently, and specifically want ...