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

learn more… | top users | synonyms

2
votes
1answer
143 views

How to generate specific function using BSpline command?

I want to generate an approximation function that fits a curve to points. My goal is to obtain an actual formula. Is this possible with BSplineFunction? Using the ...
-1
votes
0answers
61 views

About changing the values of global parameters within a function [on hold]

For the code below: a = 1; b = 2; f[c_, d_] =: Module[{e, f, g, h, ...}, ...]; I have references to a and ...
9
votes
2answers
292 views

Remove versus ClearAll

What is the difference between Remove and ClearAll? I thought that "not being recognized by Mathematica", which is the effect ...
2
votes
2answers
75 views

How to use NestWhileList with a function of two variables

I want to iterate a function of two variables in NestWhileList. Obviously it will need a termination condition. For example imagine I have this function: ...
2
votes
1answer
44 views

Help Compiling Vectors using Iterations

So I have a nice code that runs properly, which I include below but, in my naiveté, I'm having issues iterating my procedure. Simply put, I have a function of two real variables $f(x,y)$ and I want ...
1
vote
1answer
68 views

Weird SeriesData behavior?

I was trying to calculate the determinant of a matrix whose elements are truncated series. As a result I obtained an expression like this: ...
-1
votes
0answers
35 views

How to find vertice by two angles and side? [migrated]

I know 'alpha', 'betta', length 'c', vertices: 'A' and 'B' How can i find the 'C'?
0
votes
0answers
34 views

Transform an expression into a function [on hold]

I have a matrix of the form Mat = {{2a, 7a},{5a, 3a},{a, 2a}} (the actual matrix is a hugely complicated one of size 64x64, but the idea is exactly the same). I ...
19
votes
5answers
367 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 ...
2
votes
2answers
95 views

Union sorting after ignoring some digits

I have a list with its bellow elements: {-0.7071067811865476, -0.7071067811865475, 0.7071067811865475, 0.7071067811865476} If I use ...
1
vote
1answer
114 views

How to 3D-plot with specific ranges?

I have the following function which I want to plot using Plot3D: (-1 + w + 3 s w)/(2 (-1 + w + 4 s w)) , which is only ...
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 ...
23
votes
1answer
585 views

Is the renaming mechanism of `With` flawed?

I'm confused about the renaming mechanism of With: ...
5
votes
1answer
111 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 [closed]

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
66 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
247 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 ...
0
votes
1answer
54 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
84 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
138 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
97 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
517 views

RootSum result manipulation/simplification

Consider the sum sum1 = Sum[ k/( k^7 - 2 k + 3), {k, Infinity}] ...
3
votes
4answers
199 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
59 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
138 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 ...