The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [functions]

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

234 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
587 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 ...
122 views

Which functions automatically generate new functions?

In his video http://www.wolfram.com/broadcast/video.php?channel=362&video=1643, Wolfram gives the following example: the output from dict = Nearest[WordData[]] ...
128 views

Find eigenvalues without filling the matrix

Is it possible to find eigenvalues of a matrix without filling it? The matrix elements are given by a known function f[p1,p2]. This is relevant for a matrix too ...
91 views

Complicated output from simple Eigenvalues problem

I have code that uses Eigenvalues on matrices of various sizes. But the output of what should be a very simple problem, namely finding the eigenvalue of a 1x1 matrix, is overly complicated. ...
72 views

Panel size undesired behaviour

This is next question from the series: better avoid Panel if you care about details. previous about FrameMargins In the ...
143 views

Are there some other ways to solve a second PDE except DSolve?

I have a partial differential equation as follows: $$\frac{\partial p(x,t)}{\partial t}=\text{Dp} \frac{\partial ^2p(x,t)}{\partial x^2}-\frac{p(x,t)-\text{p0}}{\tau }$$ What I try to do was to get ...
451 views

Positive integrand giving negative answer

I'm integrating a positive function f(t) times sin(t) from 0 to pi/5 and get -38. Actually f is slightly negative for a short time (smallest value ~ -0.0005), but far from enough to explain this. ...
70 views

If someone would want to think about the question: mathematical-optimization “Banknote”

I solved the puzzle of IBM Ponder This September 2019 by my code written with mathematica. I would like to share this code after the solution that will come as soon, and discuss it. In the meantime, ...
34 views

How to speed up the evaluation of a sum of incomplete Gamma functions?

We need to do a ContourPlot for the following function $H[x,y,n]$: ...
59 views

How to get ReplaceAll to happen before function call

I have a problem I am attempting to solve with NMinimize. I have a scoring function, which will give me a final score. The problem has many variables, so instead of having them as parameters, they ...
93 views

73 views

Using While properly

I am trying to make While[] work with function results and evaluate them at the same time. ...
24 views

Convolve[…] behaves differently to that of Integrate[…] when numerically integrating the result

I am performing a convolution between two functions, and then I want to numerically integrate the result. If I go: ...
39 views

Determine sign of the remainder for Taylor expansion

Consider the following function $\rho(x)$ (which we define using intermediary variables and functions) for $0 < u, v < 1/4$ and $x$ some positive number ...
36 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}] ...
33 views

Problem in importing function in NDSolveValue

I have a code for solving a system of 2 differential equations (sol1). Given that what's inside is a bit heavy, I define functions so that I can call them. My issue is that when I write everything ...
52 views

114 views

My code is: ...
72 views

...
73 views

Possible bugs with InverseFunction in version 11.2

See these two examples ...
47 views

How to handle functions with varying number of arguments

Suppose I have a function that depends on variables $x_1, ... , x_n$. For concreteness I may have $f(x) = v \cdot x$, with $v$ a certain vector. Now I want to do certain operation with this function, ...
81 views

Mathematica can't evaluate the function at the point where it is smooth

Suppose the function ...