# Mixing definite and indefinite integrals

If I have the differential equation

$\frac{d^2 y}{dx^2} = f(x)$

and integrate once using indefinite integrals

$\frac{d y}{dx} = c_1 + \int f(x) dx$

then apply the boundary condition $\frac{d y}{dx}\big|_{x=0} = 0$

$0 = c_1 + [\int f(x) dx]_{x=0}$

$c_1 = - \big[\int f(x) dx\big]_{x=0}$

Substitute $c_1$ back into the differential equation

$\frac{d y}{dx} = \int f(x) dx - \big[\int f(x) dx\big]_{x=0}$

Is the above equation equal to the following?

$\frac{d y}{dx} = \int_0^x f(x) dx$

It looks like the fundamental theorem of calculus $F(b)-F(a) = \int_a^b f(x)dx$ where $a=0$ and $b=x$ and $\int f(x) dx$ is essentially equal to $\big[\int f(x) dx\big]_{x=x}$.

However, if we integrate again

$y(x) = c_2 + \int\int_0^x f(x) dx dx$

we are now mixing definite and indefinite integrals which I have been told is bad. Is my thinking here correct and is mixing definite and indefinite integrals really that bad?

Thanks

• The only things I find particularly bad are the long established notation to denote a set of antiderivatives and you using $x$ with two different meanings. – Git Gud Apr 8 '15 at 19:01

Using an integration variable (the $x$ in $\int dx$) that matches one of the limits of integration runs counter to the conventions normally used. It is "bad" in the sense that you may know what you mean by it, but that meaning can get very ambiguous for all but the simplest of expressions. That is why for serious work, one uses a distinct symbol for each "dummy" integration variable.
With that in mind, let's discuss your first line: $$\frac{dy}{dx} = c_1 + \int f(x)dx$$ What is really happening is $$\frac{dy}{dx} = \int_{u=a_1}^x f(u)du$$ with arbitrary $a_1$; of course, since by sliding $a_1$ I can slide the value of that integral by any constant, the mnemonic form of $c_1 + \int f\, dx$ is clear enough.
If we now incorporate our boundary condition that $\frac{dy}{dy} = 0$ when $x=0$ that says $$0 = \int_{u=a_1}^0 f(u)du$$ which for a generic function $f$ is satisfied by $a_1 = 0$. Thus $$\frac{dy}{dx} = \int_{u=0}^x f(u)du$$ Notice how one avoids confusing integration limits with integration variables, and avoids ever using an integral with just one limit -- although in this case, since the lower limit happens to be zero, one could see what you mean when you leave it out, that path leads to ambiguities for less simple cases.
Now we integrate again, and just as before, the "$x$" in the expression becomes a dummy variable in the integral, and $x$ becomes an upper limit of integration: $$y(x) = \int_{v=a_2}^x \int_{u=0}^v f(u)du \, dv$$ which we could certainly write in shorthand as $$y = c_2 + \int\int f$$ but that really is more fuzzy. When you have a double integral like this, where one integration variable is used as a limit in the other integral, that is for example different than a double integral representing an integral over some rectangle in an $xy$ plane.
• I believe my understanding of the indefinite integral is not what it should be. Is your explanation that $c_1 + \int f(x) dx$ is the same as $\int_{u=a_1}^x f(u) du$ a standard definition of indefinite integrals? I tried to find something similar online but couldn't find anything. Do you have any suggestion where to look for a good explanation of indefinite integrals? Thanks – T Mac Apr 9 '15 at 15:52
• Also, for the case $0 = \int_{u=a_1}^0 f(u) du$, $a_1$ is clearly 0. But what if the boundary condition was not equal to 0. For example, $C = \int_{u=a_1}^0 f(u) du$. How is $a_1$ determined? – T Mac Apr 10 '15 at 14:43