Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

1
vote
1answer
26 views

Iterative loop for a given list

Suppose I have the following list: ...
0
votes
0answers
32 views

Editing the function argument

I'd like to construct a function, that changes its own input. The code ...
0
votes
0answers
20 views

How to change the formulae of FeatureExtraction?

I have a feature extraction function fe, which gives me n/0.816497 as the output of fe[{1}]:- ...
1
vote
2answers
62 views

Issue with the use of Position

Reading the documentation of Position, I found there's a possible issue: Position looks for matches based on patterns, which may ...
0
votes
0answers
31 views

Laurent Expansion: Poles of Symbolic Form [on hold]

I am trying to use Mathematica in order to obtain the Laurent expansion of a function $f(z)$ the poles of which are functions of three variables, $q$, $m$ and $t$: $g(q,t,m)$. To specify, my function ...
4
votes
1answer
47 views

Solve/Reduce not working on a function with a condition/domain restriction?

I'm working with a trigonometric function, so I thought it would be convenient to set a condition to restrict the domain so I wouldn't have to specify it in the solve function each time. Here is a ...
-1
votes
0answers
24 views

How to force FeatureExtraction to extract specific number of features?

I have two FeatureExtraction functions as below:- ...
1
vote
0answers
91 views

Solve differential equation

I want to solve the next differential equation, fun = t^2*x''[t] + 4/3*t*x'[t] - 2/3*(1 - (L^2)/(6*t^(2/3))) x[t] - (2*L^2)/(45*t^(2/3)) == 0 DSolve[fun, x, t] ...
1
vote
3answers
58 views

Evaluating a function that takes numerical arguments over a given list/table

I have a given list of some numbers e.g. a = {0, 0.233, 0.65, 1.56}; I want to evaluate a function ...
1
vote
1answer
20 views

Defining dynamic limit for a list plot

Helly everybody, I will try to keep this as simple as possible. I have a function which looks like this: Min[T_, E_, D_] := Module[ ..... List = {...} ]; In ...
1
vote
0answers
68 views

inequalitysolution [closed]

I have a function for which I would like to solve an inequality and find a range of r with respect to other quantities. I am not well familiar with Mathematica, ...
0
votes
1answer
38 views

Arbitrary conditional multivariate expectation

I am interested in finding a conditional expectation of a multivariate Normal distribution. For example, let $X$ and $Y$ denote two random variables with a joint normal distribution. Let $X \sim N(\...
0
votes
1answer
54 views

Limit of a complex function - Output=input

I'm trying to compute the following limit: Limit[ (E^(I t w)) /(2 (-I + 1)), t -> Infinity] but Mathematica does not compute it. The above limit does not ...
6
votes
5answers
265 views

Does Mathematica have a twin prime equivalent of `PrimePi`?

Well, it's all there in the title! I'd like to be able to plot the number of twin primes =<x. Is there an inbuilt function that can do this?
-1
votes
0answers
101 views

Smart Replacement in Mathematica [closed]

I'm working on a project to replicate the derivation of the optical Bloch Equations in Mathematica and this part has me stumped. I'm trying to transform the solutions to the coupled ODE's into a ...
0
votes
1answer
30 views

Function of a function using SphericalPlot3D

If anyone has any idea how to turn all of that plotting stuff (hcpii4plot) into a function which takes hcpii4angfunc[θ, ϕ] as an ...
1
vote
1answer
42 views

ListPlot as a function of a variable

I was writing the following code. Now I am a bit stuck with a problem. Can anyone help? My code lies below: ...
0
votes
0answers
33 views

Functions definitions with variable arguments

How do you define a variable amount of functions with a variable amount of arguments? I don't get the reference at all : ...
3
votes
1answer
38 views

ColorFunction ranges for SphericalPlot3D

I'm not sure why ...
1
vote
0answers
20 views

Defining a symbolic function on a list of inputs [solved, but the reason is unclear] [duplicate]

The following MWE should give a symbolic function (is this the correct terminology?) f, defined on the entries of some list list....
4
votes
2answers
40 views

Why application of “Reap” in the forms of prefix and suffix does not work? [duplicate]

I have been believing in Wolfram language that several forms of application of a function are equivalent: f[a] f@a a//f a~f~b (*for more than one argument*) But ...
4
votes
1answer
39 views

Confusion with function “InverseFunction”

Run codes below InverseFunction /@ {InverseFunction, List, Reverse, RotateLeft, RotateRight, Sequence} and one is returned with ...
1
vote
1answer
29 views

Diagonal Matrix of a Piecewise Function

I have a piecewise function now I want to do a Matrix operation on it. How can I do that? For example, the Function is like below: ...
0
votes
0answers
3 views

What will be the output of the following math [migrated]

a+b=ab=a^2-b^2 (1+\sqrt{5})/2 2.(3+\sqrt{5})/2 2 /sqrt{5} not sure at all how to find the answer. I tried a=ab/b and a=(a^2-b^2)/b but after that I am lost
3
votes
3answers
157 views

InverseFunction fails to invert $e^{-x/2}-e^{x/2}$

I need to invert a function. I want to isolate the x basically. By the looks of the graphic I plotted, the function seems to be invertible, however when I call <...
1
vote
2answers
134 views

Integration of a function that oscillates rapidly (apparently)

I would like to know if you could help me solve some doubts about the integration of a function that oscillates rapidly (apparently) that depends on time and two angular variables. The parameters S ...
2
votes
3answers
74 views

Function of a function, both of a list of variables

I am trying to avoid dealing with long explicit lists of variables. What i do so far is the following: VarList={x_, y_}; ParList={x, y}; ValList={2, 3}; What ...
5
votes
1answer
189 views

Applying a Function within a Function

How do I define a function with a function? Ok, so lets take a positive integer n and output the result iteratively summing and squaring the integers from 1 to n... ...
0
votes
0answers
38 views

Help! SystemException[“MemoryAllocationFailure”]

I am trying to run this code: ...
0
votes
1answer
43 views

problem with solution of NDSolve [closed]

Consider this problem ...
0
votes
0answers
47 views
3
votes
1answer
40 views

How to retrieve values of a function from a file

I defined the following function: q5e8[z_?NumericQ] := q5e8[z?NumericQ] = NIntegrate[Sin[(2 5 10^8 - v) z]/z^5, {v, 0.1, 2 5 10^8}] As you can see, it is a ...
6
votes
2answers
114 views

How to create non-rectangular array with Array?

From the answers to this question, I learned that the recommended way to construct a symbolic sum of terms in an expression is to use Array. But I'm having a ...
0
votes
1answer
48 views

How do I apply my function to my list of arguments? [closed]

I have a list of integers l := {3, 5, 7} and a function f1[a_] := a + 1 I would like to apply ...
2
votes
1answer
78 views

How can I find the numerical value of the limit of more complex expressions?

Sometimes when trying to find the limit of a function $f(n)$ when $n\to\infty$ using Limit[f,n->Infinity], it seems that Mathematica is unable to compute it ...
1
vote
1answer
53 views

Non-neural-network version of SoftmaxLayer[]

Is there an built-in normalized exponential function (a.k.a. Softmax), equivalent to SoftmaxLayer[] but usable outside neural networks? For example, the function would go from {1, 2, 3, 4, 1, 2, 3} ...
0
votes
2answers
20 views

Numerical output using Select and FactorInteger

I have concocted a function from other peoples examples to find the powers of two in a prime decompostion, in the example below its $2^2=4$ gives {2,2}. ...
1
vote
1answer
31 views

Evaluate a function with vectors and return matrix

I have a matrix given as a function of is indices and another free parameter as follows A[x_, i_, j_] = x*i*j Now I would like to evaluate this for a given ...
1
vote
0answers
36 views
1
vote
1answer
26 views

Part of domain not being plotted in Show

I am exploring Euler's product formula for the Riemann Zeta function but I have come across a problem plotting functions with various terms of accuracy. My code is ...
7
votes
2answers
112 views

Constructing expressions using Sum vs Array[… Plus] vs Plus@@Table[…]

For constructing a sum of terms which are symbolic, I noticed that in addition to ...
0
votes
0answers
51 views

How to give a function multiple variables in a mapped and nested list?

I come from python (not advanced tho), and have been learning mathematica. I'm currently struggling with the following code: This is a basic version of what i wanted to implement: ...
1
vote
1answer
31 views

bodeplot phase in normal scale

I've the following fuction: ...
1
vote
0answers
31 views

Calculate with general discrete probability functions?

I would like to work with a discrete probability function $P[x\_]$ that only has the property that it is defined for $x\geq0$, such that Sum[P[x],{x,0,Infinity}] ...
0
votes
0answers
16 views

Plotting a function on a complex plane [duplicate]

I am new to Mathematica and I would like to know how to plot a complex function, say $f(z) = \frac{-z}{z^2 - 1}$ for $|z|<1$?
2
votes
0answers
39 views

How to store the values of a function in a file

As it is well known, it is possible to define a function that remembers its values once its evaluated, using the following code: f[x_]:=f[x]=rhs During the day I evaluate f[x], for many x's, and I ...
3
votes
0answers
40 views

Conditional application of a function (looking for a built-in solution)

Is there a built-in function which will apply a function f to x when test yields true? A ...
1
vote
1answer
26 views

Calculating a parametrized maximum, as a function of the parameter

Suppose I have the following maximization problem: Maximize[{x^2-a,0<=x<=a},{x}] The result is a function of $a$: I want to extract this function of $a$. ...
2
votes
4answers
89 views

Position in the list after a using a function

I want to generate a list after using a function. In this list the original position is important. ...
0
votes
2answers
42 views

Plotting a function while varying a variable (on the x-axis) using two formulas [duplicate]

I want to plot the following function, where Rb is the variable (that has to be on the x-axis): ...