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

learn more… | top users | synonyms

4
votes
3answers
113 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) ...
6
votes
1answer
86 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 ...
1
vote
2answers
65 views

How to define logical expressions for platonic solids?

A more general question would be: How to find logical expressions for 3D-objects described by closed polygon sets? Finally a simple question is more prolific, therefore: How to define logical ...
2
votes
1answer
102 views

RegionPlot3D run forever when plotting 3D ParametricRegion

when working with 2D, RegionPlot works fine with ParametricRegion as can be seen in this example: ...
3
votes
5answers
228 views

How to add periodicity to condition?

Is it possible to set the following function f[a], where a can be any real number? $$ f(\alpha) = \begin{cases} 1 ...
0
votes
0answers
24 views

Use WeatherData from many location [on hold]

Can anyone tell how can I predict the weather data in my location using weather data in other locations? Sort of algorithm, or equations??
-3
votes
0answers
67 views

Get the function of a scatter plot [on hold]

Considering we have a scatter plot and the best linear fit of the data, and also average error of it, how can we get the function from that plot? The plot is I get it with ...
0
votes
0answers
24 views

How to prevent function from substituting the part of the parameter name if it has a subscript? [duplicate]

I have the following problem, when defining and using a function, that's supposed to have an outside parameter xmin: A[x_] := Exp[-x/Subscript[x, min]] A[5] ...
2
votes
1answer
165 views

Finding average error of the data

Considering I have some data, and I want to fit the data to a linear fit and find the average error from the linear fit, how can I do that using Mathematica? I have ...
-2
votes
1answer
39 views

Compile Determinant [on hold]

I would like to determine the determinant of a 4x4 matrix with the entries a[i,j] being functions of $i$ and $j$. I used Compile with code: ...
5
votes
1answer
172 views

How can I make a “self-referential” replacement operation self-contained?

Fairly often I find use for replacement rules that call themselves on the right-hand side of the rule, e.g.: ...
1
vote
0answers
56 views

How do I choose only one branch of ArcTan?

I have a problem concerning ArcTan drawing a graph using ListPlot. I import a table of data: ...
2
votes
0answers
31 views

Evaluating standard functions of general quaternions symbolically

Mathematica can easily compute exponentials and logarithms of concrete quaternions: ...
2
votes
1answer
91 views

How to explain the behavior of Rule inside these functions [duplicate]

I'm trying to define a function that takes an expression and spits out a pure function involving a replacement rule of that function's variable. An example would be a function ...
0
votes
0answers
24 views

Use FindRoot solution as number in function [duplicate]

I would like to save a number that I gain with FindRoot so that I can use it in another function. I tried: ...
0
votes
0answers
9 views

on characterization of a riesz homomorphism on C(X) spase [migrated]

what is proof that:Let K be an arbitrary topological space and π : C(K) −→ R be a map with π(1) = 1. if π is a algebra homomorphism then it is an Riesz homomorphism.
1
vote
1answer
53 views

Remove curly brackets _completely_ to map a function to the elements of a list [duplicate]

Most list manipulations can be done with Flatten, Partition and Take. I didn't managed to ...
3
votes
0answers
63 views

Measuring time complexity of a method

I use ...
-1
votes
1answer
68 views

Find minimum function value in data and give coordinates of minimum

I create with Table an array containing the function value of some function and the n1and ...
0
votes
0answers
13 views

how to get Gamma function in Mathematica using Matlab [migrated]

In Mathematica, Gamma[a, z] refers to the upper incomplete Gamma function whereas in MATLAB, gammainc(z, a) refers to the regularized lower incomplete Gamma function. I want to know how can obtain the ...
-4
votes
0answers
36 views

Feynrules error messages [closed]

I ran Feynrules against ScalarDM and SM (See YetiFeynRules.pdf in google) and got error messages that contained: String or list of strings expected at position 1 in StringSplit[{{{H, 1}}, -(1/2) ...
1
vote
1answer
114 views

Finding the minimum of a function

I asked this question Mark Minimum Value in DensityPlot. Another question has come up, or better said, a task: Find the minimum of a function. I haven't been able to write the needed code for that, ...
0
votes
0answers
12 views

For nonempty sets A and B and functions f: A-> B and g: B-> A, suppose that g of f = i_A. Prove that if f is onto, then g is one-to-one [migrated]

Here is what I started, I don't think it's correct. Suppose f is onto, so then there exists an element b in B s.t. for all a that is an element of A, f(a)=b. (definition of onto). Let y,z be any ...
2
votes
1answer
55 views

How to create a numerically “equal” function?

A simple example about what I need to do. For example, I have three functions: t1[x,t] t2[x,t] t3[x,t] and, ...
2
votes
0answers
39 views

Maximizing Large Multivariable Function over Region with Parameter Constraints

Brand new Mathematica user here. I have a complicated function to maximize, and thought I would try software like Mathematica instead of taking derivatives by hand. I found some Mathematica ...
0
votes
2answers
216 views

$RecursionLimit::reclim: Recursion problem

Please, find bellow my original question. Here is all my code: ...
7
votes
3answers
277 views

Does Mathematica have Month Range and Day range?

It is known that CharacterRange["a", "z"] gives list of characters from a to z. Does Mathematica have something similar for weekdays and months of the year? ...
0
votes
1answer
56 views

Problem with Maximize

As $\{p1,p2,p3,p4,p5\}$ represents a probability distribution and $l1,l2$ are the eigenvalues of a stochastic matrix, the function $f$, as defined below, has to be maximized over a certain region. ...
2
votes
3answers
79 views

Problem with InverseFunction of Sqrt

I want to build a table of InverseFunctions, f.e.: ...
4
votes
3answers
196 views

Is it possible to specify which range that slot takes from?

consider this example: ...
3
votes
1answer
161 views

Circular membrane vibration simulation

I'm new in Mathematica and I'm trying to simulate the vibration of a circular membrane for math project but I don't even know how to start. The wave equation describes the displacement of the ...
4
votes
4answers
250 views

How can I get the number of slots in Function?

Suppose that I define f = Function[#1 + #2]; And I want to define a new function, argsNum, so that it returns a number of ...
0
votes
1answer
28 views

Why would this function work only when I make a copy of the variable? [duplicate]

Why would this function work with a copy of the function variable: ...
19
votes
2answers
407 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 ...
2
votes
1answer
77 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 the BSpline function? Using the following code: ...
1
vote
1answer
100 views

Solving a trigonometric equation with one parameter

I have the following equation: 2 a^2 k^2 Sin[b k] - 6 a (k Cos[b k] - Sin[b k]/b) == 0 I set the value of b to 1, and I want ...
10
votes
5answers
289 views

How to prevent function from passing values to slot

For the following example: {#, #} & /@ {1, 2} I am trying to find a method to hold one of the slots (or both ) so that the function do not pass the values to ...
4
votes
1answer
193 views

Use of Strassen's algorithm

Strassen's algorithm is an algorithm for matrix multiplication that is asymptotically faster than the naive one. In practice, the matrices involved have to be quite large before Strassen's algorithm ...
2
votes
1answer
74 views

How to determine Fixed Point of a function? [closed]

A function is defined as f[x_]=Sqrt[1-x^2]. How can I determine the fixed point of f? I've tried this: ...
-2
votes
4answers
161 views

Compare elements in a list

Assume that there are three different points in x-y coordinate like: p1={4, -1}; p2={5, -2}; p3={1, 5}; In order to compare these points to each other in a ...
0
votes
0answers
30 views

How can Mathematica solve 7 equations and want to find 7 variables [duplicate]

I have 7 equations as below * e1 := (1 - a) p Subscript[A, 0] Subscript[s, K ] ! *SubsuperscriptBox[(s), (L), (-a)] = (1 - b) Subscript[B, 0] (1 - Subscript[s, K]) (1 - Subscript[s, ...
0
votes
2answers
73 views

prime-palindromic number selected from a list

I want to find all prime-palindromic numbers up to 5000. Prime-palindromic numbers are numbers that themselves and their reverse digits are both primes. For example, 31 is a prime-palindromic number ...
1
vote
2answers
95 views

An argument pattern that my function can treat as Times[constant, variable]

I want to define a function of two variables, func[f_, g_], such that when it sees a general constant multiplying one of the variables, say ...
7
votes
2answers
114 views

Probable Bug in HighlightMesh with 2D Convex Hulls created via ConvexHullMesh

One nice way to view the new and exciting Mesh objects introduced in Version 10 is by utilizing the function HighlightMesh, so ...
0
votes
0answers
120 views

Speeding Up Image Processing Functions

I am working with stacks of 1024x1024 timelapse microscopy images that I am performing a series of image processing functions on to help segment each image. These functions include ...
4
votes
1answer
66 views

How do I constrain variables to a user-defined domain in ArgMax?

I am trying to ArgMax a function over x, but x is only defined between ...
3
votes
2answers
331 views

Is there a function for nearest power of 2 in Mathematica like nextpow2 in MATLAB?

I am looking for something like nextpow2 in MATLAB like this: P = nextpow2(A) returns the exponents for the smallest powers of two that satisfy $2^P \geq\left|A\right|$.
3
votes
1answer
144 views

why Level does not sort output according to their levels

Consider this example: Level[a + f[x, y^n], {0, Infinity}] (*{a, x, y, n, y^n, f[x, y^n], a + f[x, y^n]}*) Why the output is sorted in this way. why not ...
2
votes
1answer
64 views

About Compile Function

I have a function that take p as a parameter, p is a 2X3X3 list, ( a 2X3X3 list can like { {{2,3},{1,2.},{1,1.}}, {{2,3.},{1,2},{1,1}}, {{2,3},{1,2},{1,1}} } ) the function just as: ...
1
vote
1answer
111 views

Computational complexity of symbolic determinant

I'm using the Det function in Mathematica to compute the determinant of an $n\times n$ matrix $A$ with entries of the form $a+bt$ with $a,b$ integers and $t$ a variable, and I would like to know what ...