Good examples of Ansätze

6.1k Views Asked by At

Frequently, when talking to mathematicians, I have some trouble when I mention, use, or try to explain what an Ansatz is. (Apparently it is more of a physics term than a maths one, for some reason.) The Wikipedia page on it has what I think is a good definition:

an educated guess that is verified later by its results.

It also has one example which really resonates with the way I normally see the term being used, namely exponential Ansätze for the solutions of a differential equation. There one has a problem such as $$y''(x)+ay'(x)+by(x)=0,$$ and one quite nonchalantly assumes that the solution is $y(x)=e^{kx}$, leaving some leeway into not specifying $k$. This (Ansatz) is of course unjustified, and the only rigorous explanation for what one is doing is that one is blindly testing to see if a function of that form can be one particular solution.

One then, of course, goes on to show that this is indeed de case when $k$ satisfies $k^2+ak+b=0$, and this usually yields two distinct roots $k_1$ and $k_2$ with associated linearly independent solutions. The upshot of this is that one can now something very general about any solution of the original problem - i.e. that it is of the form $$y=A e^{k_1 x}+B e^{k_2x}$$ for unspecified complex coefficients $A$ and $B$ - from the original, very limited Ansatz.


While this example is nice, I can't think of other simple, strong examples of this sort of argument, where a simple and limited educated guess turns out, at the end, to encapsulate the whole generality of the problem; I would like to see more of those.

7

There are 7 best solutions below

1
On

The method that I most strongly associate with the word Ansatz (full disclosure: I'm German) is the Ritz method. In fact the Wikipedia article uses the term "Ritz ansatz function" for what is also known as a "trial wavefunction". This shows that the Wikipedia definition as "an educated guess that is verified later by its results" doesn't cover the entire concept; in this case, the wavefunction is known to be more complicated than the ansatz, and the ansatz is made not in order to be verified but to get as close as possible to the exact result.

0
On

Perhaps this example is too simple. Think about the wave equation, let's say on the real line: $$ \frac {\partial^2 u}{\partial t^2} = c^2 \frac {\partial^2 u}{\partial x^2}.$$ Let's imagine that we have derived this as the equation governing wave propagation with propagation speed $c$. Physically one expects the simplest solutions to be travelling waves. If $u$ is a wave travelling right (resp left) with speed $c$, then $u$ is a function only of $x-ct$ (resp $x+ct$). So it is meaningful to make the Ansätze $u = f(x-ct)$ and $u = g(x+ct)$ for some $C^2$ functions $f$ and $g$, and once one has the Ansatz it's easy to see that we have now completely solved the equation.

0
On

I am not a great fan of the notion of ansatz, simply because it seems magical.

One can but imagine that most ansätze are the result of whole series of unsuccessful tries, and that we only hear of the successful ones. So whenever I read «let us try the ansatz such and such» I understand «ok, I spent a couple of weeks trying stuff that did not go anywhere but, who knows how, finally managed to make it work, so let me just tell you the short story and, by the by, make myself look like I came up with this stuff out of the blue»

0
On

Separation of variables for linear partial differential equations. The ansatz is the guess that a solution can be written as a tensor product of functions that depend separately on individual coordinate values.

0
On

How about the integral $$ \int \sec x dx = \int \sec x \frac{\tan x + \sec x}{\tan x + \sec x}dx, $$ with the next step being the u-substitution $u = \tan x + \sec x$?

0
On

Solving the difference equation $$x_{n+1} = ax_n + b$$ a natural guess since the numbers are involving repeated multiplication is $a^n$. But this forces $b=0$, so we modify our ansatz with a constant $$ x_n = a^n + c. $$ This gives $$ a^{n+1} + c = a^{n+1} + ac + b,$$ so $c = b/(1-a)$.

More generally, I think they are most common when solving equations, and is used to reduce degrees of freedom! The guesses are most certainly not random, even though their motivation might have been lost.

0
On

Althought the choice of an exponential ansatz for an ODE seems magical, it follows plainly from the definition: $e^t$ is the function whose slope equals its value at any input, i.e., $\frac{d}{dt}e^t=e^t$. So, it's not surprising that $e^t$ is the solution to $\frac{d}{dx}x(t)=x(t)$, and it's should not be surprising that $e^t$ shows up in many ansatz where $x(t)$ is related to its own derivative.

Additional examples: Ansatz are just (well-informed) guesses at the answer. I like to use ansatz when teaching $u$-substitution (reversing the chain rule) and integration by parts (IBP, aka. reversing the product rule).

Ansatz to perform $u$-substitution

Given the integral $$F(x)=\int \cos(4x)dx$$ we are really asking the question: What function $F(x)$ has a derivative $F'(x)=\cos(4x)$? Since I know that cosines are related to sines by the derivative operation, you could make the ansatz that the integral is $F(x)=\sin(4x)$. Then you check the answer through differentiation: $$\frac{d}{dx}\sin(4x)=4\cos(4x)\neq \cos(4x)$$ Notice, my Ansatz was off by a factor of 4. So, I can simply adjust my ansatz by dividing that factor out, as in: $F(x)=\frac{1}{4}\sin(4x)$.

Checking by answer by differentiation yields: $$F'(x)=\frac{1}{4}\cos(4x)(4)=\cos(4x)$$

So, $F(x)=\frac{1}{4}\sin(4x)$ is indeed the correct answer.

Ansatz to perform integration by parts:

You can use ansatz to perform integration by parts, as well. In fact, the process begins exactly as above for $u$-substitution. This time, the ansatz is not a guess for the final answer, but acts more like the catalyst for obtaining the final answer.

Example: Let's find $$G(x)=\int xe^{2x}dx$$

Since the final solution includes $e^{2x}$, my ansatz should too (since $e^{2x}$ can only arise from differentiation of $e^{2x}$). However, I know that I need an $x$ times $e^{2x}$ in my final answer. So, my ansatz will be $G(x)=xe^{2x}$. Taking the derivative of $G(x)$ (using product rule), I get: $$\frac{d}{dx}[G(x)]=e^{2x}+2xe^{2x}$$ Now, my ansatz has an extra term, $e^{2x}$, but that's okay. For IBP, here's the next step: Rewrite the equation above, substituting the ansatz for $G(x)$, and then integrate both sides:

$$\int\frac{d}{dx}[xe^{2x}]=\int e^{2x}dx+\int2xe^{2x}dx$$

The integral of the derivative on the LHS will just be $xe^{2x}$, and the first integral on the RHS is easy via u-substitution: $\int e^{2x}dx=\frac{1}{2}e^{2x}$. So, the equation becomes:

$$xe^{2x}=\frac{1}{2}e^{2x}+2\int xe^{2x}dx$$

Subtracting $\frac{1}{2}e^{2x}$ from both sides and dividing everything by 2, this simplifies to:

$$\frac{1}{2}xe^{2x}-\frac{1}{4}e^{2x}=\int xe^{2x}dx$$

Notice the RHS is now exactly equal to the original integral we were trying to compute.