It's very simple: +C isn't constant. It's a locally constant function. This is true for any integral and any domain. Over connected domains, a function is constant iff locally constant. Otherwise it just has to be constant over every connected component. If we think of the motivation of +C in the first place, it's really supposed to be +"something with derivative 0". If we include +C to be the entire family of functions with a derivative of 0, this is everything a priori. Only then we may look for some theorems of calculus to characterize what a derivative of 0 tells us. Really, this discrepancy has nothing to do with logarithms or calculus, it's actually a common idea in linear and abstract algebra. The derivative is a homomorphism (linear transformation) sending some nonzero vectors (functions) to 0, so we can only define its inverse (the indefinite integral) only up to adding something with a derivative of 0.
Anytime the value of the locally constant function changes, the derivative at that point is undefined, so the only time that +C can jump to a different constant is when the original function is undefined (like things involving 1/x). is this correct?
@@aryanjoshi3342 If the definition of indefinite integral is extended in such a way that it includes cases with discontinuous domain, probably yes. Though generally I'd just avoid such cases and, if absolutely needed, consider each needed domain interval separately and use concepts such as 'derivative' and 'integral' only to such domain-restricted functions.
So if a student writes “+C+1” where your grading key has “+C”, you take off a point, right? By “you” here, I mean your grading software or just grader.
While I agree that the domain was handwaved in Calculus, this was likely done for sanity purposes rather than being correct. Can you imagine grading a Calc 1 exam w/ partial fraction decomposition where so many solutions end up being ln|x+k|, yet they would be forced to write a piecewise-defined function for each factor instead? It would be a nightmare for the students and teachers alike.
Oh absolutely. And to be clear, setting aside the clickbait title, I don't make a big deal of this point to my students either. I do like showing the example as I think it helps solidify the concepts, but for all practical purposes I use ln|x|+C like everyone else:D
@@DrTrefor I disagree with the idea that it's OK to wave hands as willy nilly as calculus books do. Why don't they at least point out that they're abusing the terminology and the notation, in favor of speed? The Higher level courses, like linear algebra, are harder to grade because no one wants to address these things before the damage is done. One of my engineering colleagues told me he had students who couldn't understand why he asked them to find the derivative of pressure with respect to temperature in the ideal gas law (Pv=NRT), because they said it doesn't depend on x (I think he actually quoted the student as saying "there's no x"). Calculus books wrongly identify expressions with functions and don't teach that that's an abuse of notation and terminology, and then almost never do they use variables other than x or t as independent variables, making it tougher to clean up that mess after it's entrenched in the students' minds. The claim then that (ax)'=a is false, but it's ubiquitous on quizzes and tests as the only correct answer. If a good student writes (ax)'=a'x+ax', the grading key says they're wrong when they're right. Without context the problem is misstated and does more harm than good.
@@DrTrefor I get this. In many situations that call for the indefinite integral you end up only needing 'an' antiderivative rather than all of them. Either because you have some initial value that lets you define what the constant C is, or because the problem eventually leads into a definite integral. So in a lot of cases the piecewise definition doesn't really bring anything useful. But even so it's still a good idea to understand when the shorthand doesn't actually include It's a bit of a convenient shorthand that is fine for most situations, but it's still a good idea to keep in mind what it's lacking. Additionally, correct me if I'm wrong, but you could likely correct for this at the end if you really wanted to be complete, by at the end adding a little piecewise definition for C depending on the which interval of the domain x is in. Sort of how like when taking a definite integral it's common to omit the +C entirely since you know it's going to cancel out, but it's still important to remember that that +C is still really there and what it means. Also, if I'm not mistaken you could correct for this at the end (or at any step) if you really wanted to, by adding a piecewise definition for C for each interval of x separated by a point of discontinuity.
Also, this issue would crop up for integrating lots of other functions: f(x)=1/x^2, f(x)=3/(x-5)^3, etc. And imagine asking for the "full" answer for the indefinite integral of tan(x).
@@justsomeboyprobablydressed9579 there are so many places where the notation seems slightly buggy. this is an interesting find. the first thing that came to mind is piecewise spline curves.
Within the theory of distributions, what is done here is adding multiples of the Heaviside step function H(x) and/or constant functions to the antiderivative: F(x) = ln |x| + A H(x) + B, where A and B are constants. The derivative is then F'(x) = 1/x + A δ(x). Here, 1/x is the principal value distribution and δ is the Dirac delta distribution. So for distributions the only antiderivatives of 1/x are ln |x| + B.
but if 1/x is undefined at x=0 and A δ(x) is only nonzero at x=0, shouldn't the A H(x) term remain in the form for the antiderivatives of 1/x, since 1/x should exactly equal 1/x + A δ(x)?
@@rarebeeph1783 A distribution isn't defined pointwise, so we cannot say that the distribution 1/x is undefined at x=0. Saying that δ = 0 on ℝ∖{0} is okay, however. Within the theory of distributions, what happens when we add A H(x) to the antiderivative, as is done in the video, is that we add terms A δ(x) to the derivative. Thus, our antiderivatives are not for 1/x but for 1/x + A δ(x). So, the only antiderivatives of (principal value) 1/x are ln |x| + B.
@@rarebeeph1783 A better way to think of it is in terms of measures. Instead of thinking of the dirac delta as a function of a real variable (because it isn't), you should think of it as a measure concentrated at zero. Moreover, the notation "δ(x)" for such a concept is wholly confusing, mathematically incorrect, and pedagogically vapid. One should denote it only as δ_0 ("delta subscript zero"), and realize that it maps measurable sets to real numbers. If the measurable set E includes the number 0, then δ_0 maps E to 1, and otherwise, it maps E to zero. That way, when one computes the integral, over the measurable set E, of the dirac delta times a real valued function f of one real variable, is either 0 or f(0), according to whether 0 is in the set E or not. For the function f given by the formula f(t)=1/t, 0 is not in the domain of f, so without a richer interpretation of integration as in Lebesgue integration or some other variants on Riemann integration and Improper Riemann integration, you cannot assign a meaning to the integral in question even in this case. A problem with the question at hand is that 0 is not in the domain of the function in question, so integrals of it against the dirac distribution don't really make sense. I guess one can (and perhaps does) extend the theory by extending the notion of these integrals to try to extend the integrand to the closure of its domain, but in this case, one still has the problem that the unboundedness of the function requires one to first extend the real number system to the extended real numbers so that both lazy 8 and its negative are members of the codomain (and perhaps of the domain). In this case, we still cannot make sense of f(0) in a way that is not seen as ad hoc, because the limit from the left and the limit from the right at 0 do not agree. One could instead use the Riemann sphere, I guess, which is the one point compactification of the complex plane, and then one does not include the negative of lazy 8 in the codomain or the domain, and one "defines" 1/0 to be lazy eight, which is the point of compactification, located at a pole of the Riemann Sphere, usually considered to be the "North Pole", diametrically opposite the pole at 0, usually considered to be the "South Pole". In this nice repair of the situation, one would be able to recover the property described for the dirac distribution for bounded functions, namely that the integral of "δ(x)/x" (abusing the notation in the sophomoric way in ODE textbooks), would be interpreted (`calculated'?) as f(0)=\infty.
thats a dam good answer, it just looks at the discontiniouty in the most elegent way possible. I went about it in a dumber way with insisting on the complex derivative to make sense as well
Certainly those are all the antiderivatives with the same domain as 1/x. But I don't love calling them the "indefinite integral" because a disconnected domain isn't useful for calculating definite integrals (or path/contour integrals). I'd personally rather say something like "indefinite integral means the antiderivatives on a connected component of the domain" and note that it just so happens that with a trick like ln|x|, you basically never have to write them piecewise in calculus.
I would also be happy with this. It slightly changes the criticism, which is then that most calc textbooks don't put the added qualifiers on what an indefinite integral means that you did here.
And of course the "trick" works because |x| is itself piecewise, or with the alternate definition of sqrt(x^2), because sqrt is not a true inverse function because of x^2 isn't 1-1.
Indefinite integral is just a confusing way of saying antiderivative. If it is defined differently, a indefinite integral of f should be all function F satisfy F(b)-F(a) equal integral of f from a to b in the domain
@@Noname-67 That is fine for continuous functions, but for other functions you have to use something more general than the Lebesgue integral if you want to recover the usual class of antiderivatives.
Nice video. In section 5.4, Stewart's Calculus with Early Transcendentals does say, "We adopt the convention that when a formula for a general indefinite integral is given, it is only valid on an interval." It goes on to say that in a sense the general anti-derivative to 1/x^2 is the piecewise defined function -1/x+C_1 for x0. I prefer the convention that when we take an antiderivative, it's always on an interval. So with this convention integral 1/x dx = ln |x| + C is a shorthand for saying that the general antiderivative of 1/x on (-infinity,0) is ln (-x) + C and the antiderivative of 1/x on (0,infinity) is ln x + C. I also like Spivak's suggestion in his Calculus book, that we could dispense the + C altogether. So instead we ca just remember that the equality sign in that context means equal up to the addition of a constant on an interval.
I'd disagree with removing the + C because then you'll abuse = notation, but I'd be in favour of getting the C to explicitly mean "the set of all functions with derivative 0 over the domain". In this case, the piecewise C and D would quallify, because it's derivative is 0 across the entire domain (since the discontinuity isn't included in the domain) This is something we implicitly do through abuse of notation, but this qualifier would make it formal. In this case the + C would always make the equality valid
I was sceptical clicking on this video due to the clickbait-y title, figuring the "trick" would be something extraneous involving non-principal branches or whatever, but instead I learned an interesting fact about a tangible consequence of dealing with disconnected domains. Fantastic. You could easily apply this logic to other piecewise defined function too with disconnected domains.
Thank you for using an actual theorem to explain a result. Most math teachers give a geometric example, which is fine, but they stop there. This made it so clear. Praise to Cauchy for his exhaustive precision.
or, as another guy said here, since you don't use indef integrals on disconnected domains (to compute definite integrals), you give two separate antiderivatives on two connected parts
I guess same story for differential equations. We always define a solution on an INTERVAL. Otherwise, we would be able to come up with many more solutions by constructing piecewise functions as shown in the video.
Indeed, integrating 1/z in the complex plane with a branch cut (say) on the positive imaginary axis, we have log(-x) = log(x) - iπ for all x > 0. So, restricting to the real axis gives an 'off-balance' antiderivative of 1/x like the one in the video.
Yes! If we take the complex result restricted to the real line, we actually know the difference between the constants on the left and right, and it's imaginary.
This was actually mentioned in Gilbert Strang's Calculus textbook, also the uniqueness thing. And this "abuse" of notation is done in many contexts, like asymptotic growth of functions (representing space or time complexity) in CS texts. I think it's alright if textbooks make it clear which many of them don't sadly
The abuse of notation in asymptotic growth is much more egregious, though. It’s insane that someone would choose “=” to represent anything that’s not equality, or even an equivalence relation.
Couldn't the same argument be made about ANY functions with discontinuity in the domains? That is, if a function is continuous on open intervals then each interval can have a unique constant and the derivative would still match the whole domain. In this sense, it's not that ln|x| is technically incorrect, but every function with discontinuity is, as well as ln|x|.
Wow, I'm a college prof. and I'm just happy to get my students to correctly state on an exam that the antider. of 1/x is ln|x|+c let alone understand that nuance. It's really not worth the effort.
@@DrTrefor all good, more so a TIL thing (not like that word comes up so often that it’s a difference we’d hear often). Thanks for the video and the response!
You have this because the real calculus indefinite integral mixes up two complex branches of the same analytic function, which is why you were able to find your 2 constant antiderivative
This sounds like making calculus complicated just for the sake of being technically correct. Wouldn't a sane person just write two integrals, one for +x and one for -x?
I think that ln(x) is a perfectly fine antiderivative to 1/x. We just let x ∈ C (it won't actually matter in the end). Now, we can use euler's identity to define -1 as e^(πi), and say that every -x = e^(πi)*x = e^(πi)*e^ln(x) = e^(πi+ln(x)), so ln(-x) = ln(e^(πi+ln(x))) = πi+ln(x) The complex πi is a constant and would be dropped during differentiation (told you it wouldn't matter), and we can say with confidence that d/dx(ln(x)) = d/dx(ln(-x)), and therefore ∫(1/x)dx = ln(x)+C, no special cases. (edit: well 0 is still not defined but I think we can let that slide)
The passing to the complex plane, with the zero removed or a ray removed, introduces a restriction that doesn’t exist on the reals with the zero removed. The continuity on this larger connected set. That is why you get a result that when restricted to the reals gives you a smaller set of solutions.
You should be careful doing this if you haven’t taken complex analysis. As the other comment stated, your perspective added restrictions that weren’t previously there, therefore you get a smaller solution set. In order to use ln in the complex plane, you need a lot to get there first
This is not only true for functions with poles, but for any function that is continuous on a disconnected domain. The antiderivative of function f(x)=x, where we restrict the domain to be the nonzero real numbers will have the same problem.
@@tracyh5751 Better yet, as I indicated in another reply, it is even reasonable to work with totally disconnected domains, like the rational number field, in which the proper way to state the corresponding theorem is the following: Theorem: Let f and g be functions with the same derivative. Then f and g differ by some pseudoconstant function. A function c is locally constant at a point p provided that there's an open neighborhood of p on which c is constant, and we say that a function c is locally constant if it is locally constant at every point in its domain. On a connected domain, every locally constant function is constant. (There's a better result available, by the way, and I'll leave it as an exercise 🙂.) We call a function h a pseudo-constant function if its derivative is zero on its domain. Not all pseudo-constant functions are locally constant, although the converse holds. In fact, Charatonik (r.i.p.) and I studied the notion of an absolute derivative, which is closely related to the notion of a derivative (and in the cases considered in this forum, are computed by finding the absolute value of the derivative), and we constructed functions on totally disconnected spaces (like the rational numbers or a cantor set) that are everywhere differentiable, have zero derivative everywhere (and so are pseudo-constants), but are nowhere locally constant, meaning that if p is a point in the domain and U is an open neighborhood of p, then such a function is not constant on U. The heat of the result is that with a base of clopen sets, one carefully constructs a sequence of functions, each of which is locally constant at less points than the previous sequence member, but approximates the previous sequence member everywhere. This does serious damage to the uniqueness theorem for differential equations, unless one phrases the uniqueness theorem in terms of equivalence classes whose members only differ by a pseudo-constant.
Great video, I'm feeling so much more confident explaining ln|x| as the integral of 1/x which I've always done with a lot of hand-waving, appeals to the nature of 1/x as an odd function but not much serious discussion. In the future I'll discuss the domain mismatch between ln(x) and 1/x. My students will appreciate this.
I simply accepted on faith that the indefinite integral of 1/x is ln|x| + C. It has been so ingrained in me. However, I’ve noticed some of my professors don’t use the absolute value occasionally. Right now I’m taking an Analysis course and the second part of my upper-division of my proof-based Linear Algebra course. Ever since Calculus, I always struggled with functions that are defined piece-wise. I don’t know why, but anytime I see one, my heart instantly drops and I immediately assumed right away, before even really understanding it, that this problem is probably going to be very difficult or I’m going to be too dense and stupid to solve it.
Just take them as the separate functions on the intervals they’re defined on, assuming they’re broken into intervals. Piecewise isn’t hard, it’s more mental struggle than actual math capability struggle. Just try to shake that thought process
I mean, depending on your analysis course, ln(x) is sometimes just defined as ln(x) = int_1^x 1/t dt for x in the domain (0, infinity), so there's no more justification really needed to show that the antiderivative of 1/x is ln|x| (or some transformation of ln|x|). From there, you can define its inverse exp(x) and find all the relevant properties of both.
@@andrewkarsten5268 I think you have just described me perfectly. It’s more of my low self-confidence in my mathematical abilities stemming from my K-12 education where I would fail most of my math classes every year and make them up in my summer. And here I am, just recently graduating with a mathematics degree..
@@ericy1817 I think you may be correct because I think that is how my professor defined, if I remember correctly. The good news is that I think I passed my analysis course. I’m still waiting for the final grades to be posted, but I think I did sufficiently well to pass with a passing grade. Honestly, even though I more than likely passed, I feel like I didn’t master the material the level I would have liked. I felt like I barely scrapped by because I didn’t have sufficient time to study or learn the material since I learn at such a slow pace given my learning disabilities. I love math, even though I consider myself to be terrible and slow at it.
For practical purposes you will be on one branch or the other. The relationship between the branches is of no consequence in all the applications that I know of. I’d be interested to hear if you can think of any. Another neat interpretation is to say that the absolute value is unnecessary if you allow natural log to be complex valued and you allow the constant of integration to be complex. Cool video.
I'd say the main "practical" point is just reinforcing the normal idea that you can't just integrate between two values, you have to check the domain first to picture you don't have some improper integral. That point is well made in normal calculus exposition, but this helps reinforce it I think.
One has to be flexible with the notation. When one writes the family of antiderivatives of 1/x as ln|x|+C, one has to recognize that since the domain of ln|x|+C is comprised of disjoint intervals, one is free to choose different values for C on each of the intervals. This is implicit in the use of the term "arbitrary" in "arbitrary constant." By and large this discussion is about notation, and how best to use it to avoid unnecessarily cumbersome presentations of families of continuous curves in R^2.
No sir there is a book by James Stewart says the same you said here all his books about math says that. The book I am using is calculus 9th ed at page 393 you can see it chapter 4 last section 4.9
frankly, asking for the antiderivative on a disconnected domain is not a well-posed question. If we were in C then we can discuss the nature of the point singularity and this basic example is already connected to such involved ideas like analytic continuation and monodromy.
And just to be clear: I can’t cut a peice of a parabola (a,b), translate it to a peicewise function, and shift the parabola by D on the interval (a,b).
Another important aspect is that these definitions should be "useful" hence if integrated in an interval (a,b) they should make sense (satisfying the fundamental theorem of integral calculus). You cannot integrate 1/x over an interval which contains 0 as an inside point, hence this is never an issue.
So I guess that an indefinite integral gives you a family of functions where the number of constants is equal to the number of connected components of the domain.
I believe this is closely related to the fact that uniqueness of solutions is broken when diff. eqs. has a singular point (Non-Lipschitz)... look the example of y'=sqrt(y) in Wiki page for Singular Solution
We can generalize this idea with what I like to call a "locally constant" function. The antiderivative of 1/x is ln|x| + C(x), where C(x) is locally constant function, that is, a function for which C'(x) = 0 at every point of its domain. For a function defined only on an interval, the locally constant functions are just the constant functions, but when the domain is disconnected, the locally constant functions may be a different constant on each connected component of the domain
So, why did you single out the ln|x| function? The things that you said about ln|x| could be said about any elementary function with a hole in the domain, such as for example tan(x), cot(x), sec(x), etc. In fact, we don't even need a hole in the domain for your argument to hold. Take for example f(x) = |x|, which is everywhere continuous, though not differentiable at x=0. The derivative of |x| is x/|x| for any non-zero x, but this is also the derivative of any piece-wise defined function such as f(x) = |x|+C1 if x>0 and f(x) = |x|+C2 if x
If I understand correctly, there's nothing about this argument that's specific to ln|x| and 1/x. You could apply it to any function with any discontinuities
Or even without discontinuities. Take for example f(x) = |x|, which is everywhere continuous, though not differentiable at x=0. The derivative of |x| is x/|x| for any non-zero x, but this is also the derivative of any piece-wise defined function such as f(x) = |x|+C1 if x>0 and f(x) = |x|+C2 if x
Not an open domain..but it's completely satisfied in the existing domain its has (-infinity, 0) or ( 0, infinity)....so that MVT is totally satisfied in specific domain intervals..all we need to specify that particular intervals when ever the question arises
Imo the complex-valued logarithm solves a lot of these problems. ln(-x) = i pi + ln(x) (principal branch) and i pi is a constant function (assuming your domain does not include zero)
I feel like it's much more sensible to define the function F only for positive (or, if necessary, nonnegative) numbers, since you can't even integrate over 0, so either way you get one or two integrals from 0 to some x, and only the sign needs to be determined.
This is an illustrative example about the need to handle calculus with care. Ignoring conditions behind methods/formulae could lead to invalid/meaningless results.
In general, whenever you have a finite number of discontinuities you can use a different C for each continuous part of the domain. If the number of discontinuities is infinite then you have an even bigger family of antiderivatives.
0:09 - Yes, I was taught this. In particular when X=cabin, the integral of an inverted cabin is a log cabin. Sorry, I was forgetting the C. Log cabin plus sea... a house boat.
As a calculus teacher, I am happy to say that this is covered in our textbook and I do talk about it in class... and then we just say +C anyway because of MVT corollary that was mentioned in this video.
Do you know of any examples of functions with vertical asymptotes and convergent integrals on both sides, whose most obvious choice for an antiderivative has a jump discontinuity? I'm trying to find a function that motivates the need to split the integral at the vertical asymptote and carry out two improper integrals. Every example I come up with, usually has continuity that is salvaged when taking the anti-derivative, and you can get away with ignoring the vertical asymptote, and still get the correct answer.
Does this really make sense? Would you do the same with 1/x^2? Or tan (x) with an infinite-parts piece-wise antiderivative function for the infinitely many real numbers at which tan(x) is not defined, and an infinite numbers of arbitrary constants, one for each part?
@@DrTrefor ... Wow, interesting. I was about to ask how you deal with calculation of areas that include the point of discontinuity (if the area remains convergent) but then I realized that you need to break the integral in the same intervals at each point of discontinuity anyway. So for example if you want the are under 1/x^2 between -2 and 3 you have to find the area between -2 and 0 plus the area between 0 and 3; you cannot do it in one step. So using different arbitrary integration constants for each segment would not affect the result.
Thanks for the video! In our lectures I distinctly remember that we were told that indefinite integral of 1/x is just ln(x) + C, without the module, and I always just assumed that this just means that x > 0 as well. However much later we were basically given the same formula for integral of 1/z and it would be just ln(z) + C in a complex plane, with no limitations except z=0. And as someone shown in the comments, it is a correct formula as the difference between ln(z) and ln(-z) is just i*PI. So I guess the moral of the story is that everyone is taught slightly differently and there aren't necessarily any problems with someone's "textbook" explanation after all...
ln(z) = ln(|z|exp(iarg(z)))= ln|z| + iarg(z) Absolute value becomes complex modulus and the phase factor is added to the constant. If you can have two different constants on the real line for the positive and negative domains, how do you ensure it's continuous when extending to the complex plane?
@@YuriyNasretdinov I mean continuous on the complex plane except z=0. If you have two different constants for x0 on the real line, there must be intermediate values when you go off the real line and into the imaginary axis.
I quite liked this video. I agree with some of the comments that very rarely will the typical restriction of the family of antiderivatives matter for practical applications; however, I think "complexifying" the answer in this case actually gives more insight as to how you should treat disconnected domains and makes the whole thing feel less hand-wavy.
The same could be done to any function. Anti derivative of f(x)=1 is then not x+C either, because you could break it up anywhere and shift the parts up or down...
But then the anti derivative won't be continuous at the point where you change constants so you won't be able to take a derivative there. This doesn't matter for integrating 1/x or any 1/x^k (k >= 1) as they're not defined at zero so do not need to be differentiable there. So as long as we have a hole to take advantage of, we can put in a split and make it so that the resulting non-differentiable point lines up with the original undefined point.
You make it sound like there's something special about ln(abs(x)) but it's really applicable to any function that isn't continous in a single point. If you integrate tan(x) you have infinite variations for every continous part of -ln(-abs(cos)) Though I hadn't heard that definition of the indefinite integral, before. That's worth checking, so thanks.
Eh, I see your point. It seems like a technicality -- which is certainly an interesting thought. But I wouldn't go as far to say I was lied to. The title is too click baity
You crossed from one branch to another. This is once again support for introducing complex variables to teach calculus. It avoids the pathologies that seem to amuse those stuck in the reals, but again, I don't know if it provides additional insight.
The whole business became much less awkward and strange when I realized that for negative real numbers ln(x) = ln(-x) + iπ. On the complex plane we can just say that the integral of 1/x is ln x + C and that strange absolute value function goes away. But restricting it to real numbers gives us another degree of freedom by splitting the domain in two.
I am a calculus professor and I admit, I have been lieing both to my students and also to myself, but no more! From here on out you have my promise that I will demand my students give full anti derivatives. This will of course include spreading the anti derivatives of every function with i discontinuities into a piece wise function, with each ith piece equipped with a new constant $C_i$. That will show those calculus students who is boss!
More general, one integrates a continuous function defined over a one-dimensional manifold with more than one connected component. The statement about the set of all antiderivatives is then individually for each connected component :) So, it is actually quite common in differential geometry to be aware of that, while I agree that this detail is often omitted in first semesters :D
You can obviously also do this to any pair of functions (f,F) where they are both undefined at zero Edit: in fact, you can do this to any pair of functions (f,F) where they are both undefined at the same x value, for any real x. You can then shift the "left" side of F and the "right" side of F by different constants, yielding the same derivative still.
I don't deny the importance of paying attention to what is happening at x = 0, but there is a distinct advantage to using the same C for both x0. Suppose the integral is from a to b and a
So instead of stating, that the anti-derivative of 1/x is the natural logarithm, we should rather state, that the anti-derivative of 1/x is the chain function of the natural logarithm and the absolute function plus C•[indicator function on (0,∞)] plus D•[indicator function on (-∞,0)]? Yeah, I guess, that's more accurate.
I was sceptical clicking on this video due to the clickbait-y title, figuring the "trick" would be something extraneous involving non-principal branches or whatever, but instead I learned an interesting fact about a tangible consequence of dealing with disconnected domains. Fantastic.
Sorry to disappoint you, but even though I studied engineering, my calculus professor, a brilliant person who's unfortunately left us (Jürgen Geicke) did explain this to me correctly, in the first course I ever had at a university. In his tests, he would often put questions of functions like these, that had singularities, and required us to write down the intervals where the solution was valid. For the integral of 1/x, the correct answer was ln x + c for (a,b) with b > a > 0 and ln(-x) + c for (a,b) with a < b < 0. That's because, for him, the antiderivative was defined as the set of all functions F(x) such that F(b)-F(a) gives the integral on the interval (a,b), and the integral of 1/x is not even defined if a < 0 < b. To be honest, at the time I was just a dumb student and got many of these questions wrong. Nevertheless, I can disprove your conjecture. At my first ever calculus course, I studied the correct version. Thanks a lot, Prof. Geicke!
The FTC proper doesn't apply to 1/x over an interval containing zero, so the hazard is brushing this under the rug. So since you shouldn't include zero anyway, the antiderivative with a single +C is fine because the two pieces aren't supposed to be connected. There's also the Cauchy principal value generalization, but this is a very fragile and finicky thing. It agrees with the result gotten by improperly evaluating the antiderivative across an interval containing zero. But the Cauchy principal value is fragile and does not play well with any sloppiness such as u-substitutions that could asymmetrically distort around the singularity. Just be really skeptical if you integrate around a singularity. Sometimes there might be a reason for it, but it's hazardous and it's not really clear that any one generalization should own the right to calling itself the right one.
Pretty much anything that has infinity is going to require you to split it there, otherwise the integral would likely just be infinity. But, if you do split it, you get a couple of improper integrals that may be finite, depending upon the specifics..
I agree this causes lots of confusion. They should really teach this as ln |x| + C[x0], demonstrating the discontinuity actually makes this behave more like two functions rather than one.
Counterpoint: I'd argue ln|x| + C already covers these extra cases. We know from algebra that f(x) = |x| can be written as a piecewise function, so it's not difficult to see that ln|x| can also be written as a piecewise function. And as is customary when splitting up the constant C, we rewrite this constant on both parts of the piecewise function as C1 and C2. They need not be equal. With this setup, you can write every kind of piecewise function whose derivative is 1/x while preserving the original notation and equation for the integral of 1/x.
@@DrTrefor Most students probably don't understand why we write the +C in the first place. They just see it as something they have to do, and will lose marks for omitting it, without understanding why. Especially when they use it for definite integrals, and can get away with omitting it. I have an example of a real life application for keeping the +C around, that you may use as you see fit. The real life function isn't necessarily sinusoidal, but it is periodic nonetheless, and the same idea applies. I made up the example with a cosine function to keep the math simple: "A battery experiences a daily cycle of loading and charging, where the power to the battery in kW at each hour of the day (t) is given by P(t) = 8*pi*cos(pi/12 * t). It is desired to keep the battery operating between 24% and 88% of its full capacity. Determine the full battery capacity and the function E(t) for the state of charge in kilowatt-hours."
This ln|x|+C form is a bit dangerous too, because it suggests that the integral from -a to a over 1/x is zero, as if integrating past zero could be somehow healed. For integration along the real axis one can't integrate past zero, and for contour integration there is a residuum, so it depends on the integration path, but there's always an imaginary offset.
I would say, when you integrate from -a to a past x = 0, since the function is undefined at the point, you must integrate -a to 0 and 0 to a separately, and you'll find that they both diverges and the integral is undefined. For some integrals, however, when you integrate over the real axis across a discontinuity, you could get a real number instead.
@@plus-sign Yes, and that's the danger here, that the ln|x| suggests you could integrate across the discontinuity as if it were converging, or as if one undefined integral would cancel the other. Depending on the context the integral arises from (i.e. when the integral is part of a solution to e.g. some other mathematical problem) it might work out perfectly fine (maybe only one of the branches is of interest anyways) or it might be misleading.
Does it have meaning to talk about the definite integral of 1/x over a span that crosses zero? If you take a definite integral to be the "area under the curve" and assume that the limits of 1/x as X->0 from each side are equal and opposite and then conclude that implies those two limits sum to zero, then I think there should be a well defined definite integral for any span that doesn't end at zero inclusive. Furthermore that definite integral can be found in the normal way by using the classic definition for the indefinite integral of 1/x.
Only when the integral converges as you approach the asymptote, does it even make sense to talk about a definite integral crossing a vertical asymptote. The integral of 1/x diverges on both sides, so you can't integrate it across the singularity. For instance, the integral of 1/(x-1)^(1/3), from 0 to 9. The indefinite integral is 3/2*(x - 1)^(2/3) + C. Or more accurately per this video, it should be 3/2*(x - 1)^(2/3) + C + D*H(x-1), where H is the Heaviside step function, and D is another arbitrary constant. Keeping it simple and using the conventional answer for the indefinite integral, you can evaluate it across the two bounds. You will get the same answer as you would if you split the integral in two segments, and add the two segments together. The reason is that the real valued versions of (x-1)^(2/3) will connect to each other with continuity on both sides of x=1, and form a cusp at x=1, instead of a vertical asymptote.
Technically this is not unique to the antiderivative of 1/x. It also applies to any reciprocal function that is asymptotic. A way to resolve this issue is to broaden the definition of +c to a “constant function”, with a derivative of 0 over the domain of the function. This allows the constant to “change values” as it passes asymptotes, to define any potential antiderivatives of f(x).
Ah, this is why I always lift the problem into the complex plane before working things out. You get a branch cut, of course, and need to skirt around it, but otherwise it generally works.
Another cool thing is the constants don't have to be real. Try -2*i*arctan(exp(ix)) and integral of sec(x) for example. Though I've been told that asking a student on an exam if the former is an antiderivative of the latter amounts to torture.
I think one's can calm their mind by adding infinity to the number line. Infinity would be similar to 0, in the sense that negative infinity equals infinity. This lets us keep many more functions fully differentiable, such as 1/x. This way, the limit at infinity of the antiderivative of 1/x *has* to be ln|x|+C, because otherwise it wouldn't be differentiable at infinity. If you read this far, you might've noticed a flaw, which is the fact I actually handwaved a completely wrong statement. This piecewise function certainly does satisfy the limits, even with infinity added! The limits work out. The more convincing approach is to show that ln|x|+C satisfies a lot of 'natural' properties, especially on the complex plane, with limits and infinity, or combining them, on a Riemann sphere.
this is also the case for integral of 1/x^2 right? We can move the pieces of the resulting -1/x similarly to how we did it here. If this reasoning doesn't hit a wall somewhere, then we have a BUNCH of functions where the anti-derivative has at least two degrees of freedom.
This is from my vague memory ... There is a sort of informal definition of logarithms (like the inverse of an exponentiation), but if has some sort of problem. So "modern" math added consistency to the log by defining log(x) = integral from 1 to x of 1/x for all x > 0. This solves incosistencies when trying to talk about log (π), for example.
ok but the function of abs(x) is defined as a piece wise function as well, so this argument fails. Also the arbitrary constant is equally applied to the family of functions just like the integral of 2x dx is x^2+c. You have to add the constant equally to the family of functions.
Why stop with the logarithm? What about the antiderivative of the tangent? Or of any rational function with a vanishing denominator that breaks up the domain of the function into disjoint intervals? Your argument appears more general. And I agree with a commenter below: For many practical considerations, we only work on an interval where the function is continuous so this concern does not introduce a serious impediment.
Oh yeah, learned this when studying differental equations in uni maths, when you have mutiple soultions to a differnetial equations, and you can split the domain, you can combine the solutions in any way you like.
People make this sort of mistake all the time and I'm glad someone's talking about how the theorem about indefinite integrals only differing by a constant is only true for a connected interval
One way to look at the problem of finding the anti-derivatives of 1/x is to compare two anti-derivatives. Suppose f'=g' on the domain of 1/x, R\{0}, then f'-g'=0, and h'=0 (where h=f-g) on R\{0}. It is then easy to see that although h is constant on each of the intervals ]-∞,0[ and ]0,∞[, these two constant values don't need to be the same. It was this perspective (solve the equation y'=0 on R\{0}) that led me to understand this issue a few years ago. One textbook that handles this issue well is J Stewart's Calculus (as someone else has already commented). The anti-derivatives of 1/x are correctly discussed, and when a table of anti-derivatives is presented with "+C" in each case, the caveat is given that each formula applies over an interval. A spectacular example of a function where multiple constants are needed to correctly describe its anti-derivatives is tan x. Here the domain consists of a countably infinite number of open intervals, so you need a countably infinite number of constants to describe its family of anti-derivatives!
I had weird encounter with constants like that when integrating cos(x)sin(x)... I can substitute u = sin(x), du=cos(x)dx... so the integral is u²/2+C=sin²(x)/2+C But I can substitute u = cos(x), du = -sin(x)dx... so the integral is -u²/2+C=-cos²(x)+C My first thought as a student is that something was wrong. But... turns out sin²(x)/2+C=(1 - cos²(x))/2+C=1/2 - cos²(x)/2+C=-cos²(x)/2 + (C +1/2)=-cos²(x)/2 + D D=C+1/2 is a constant if C is a constant So yeah, there can be more than one anti-derivative for the same function and they don't need to have the same form.
It's very simple: +C isn't constant. It's a locally constant function. This is true for any integral and any domain. Over connected domains, a function is constant iff locally constant. Otherwise it just has to be constant over every connected component.
If we think of the motivation of +C in the first place, it's really supposed to be +"something with derivative 0". If we include +C to be the entire family of functions with a derivative of 0, this is everything a priori. Only then we may look for some theorems of calculus to characterize what a derivative of 0 tells us.
Really, this discrepancy has nothing to do with logarithms or calculus, it's actually a common idea in linear and abstract algebra. The derivative is a homomorphism (linear transformation) sending some nonzero vectors (functions) to 0, so we can only define its inverse (the indefinite integral) only up to adding something with a derivative of 0.
Ye, I love it. Absolute value is piecewise defined and +C can be a piecewise defined function that has derivative zero! So the two are equivalent.
Anytime the value of the locally constant function changes, the derivative at that point is undefined, so the only time that +C can jump to a different constant is when the original function is undefined (like things involving 1/x). is this correct?
@@aryanjoshi3342 If the definition of indefinite integral is extended in such a way that it includes cases with discontinuous domain, probably yes. Though generally I'd just avoid such cases and, if absolutely needed, consider each needed domain interval separately and use concepts such as 'derivative' and 'integral' only to such domain-restricted functions.
So if a student writes “+C+1” where your grading key has “+C”, you take off a point, right? By “you” here, I mean your grading software or just grader.
While I agree that the domain was handwaved in Calculus, this was likely done for sanity purposes rather than being correct. Can you imagine grading a Calc 1 exam w/ partial fraction decomposition where so many solutions end up being ln|x+k|, yet they would be forced to write a piecewise-defined function for each factor instead? It would be a nightmare for the students and teachers alike.
Oh absolutely. And to be clear, setting aside the clickbait title, I don't make a big deal of this point to my students either. I do like showing the example as I think it helps solidify the concepts, but for all practical purposes I use ln|x|+C like everyone else:D
@@DrTrefor I disagree with the idea that it's OK to wave hands as willy nilly as calculus books do. Why don't they at least point out that they're abusing the terminology and the notation, in favor of speed? The Higher level courses, like linear algebra, are harder to grade because no one wants to address these things before the damage is done.
One of my engineering colleagues told me he had students who couldn't understand why he asked them to find the derivative of pressure with respect to temperature in the ideal gas law (Pv=NRT), because they said it doesn't depend on x (I think he actually quoted the student as saying "there's no x"). Calculus books wrongly identify expressions with functions and don't teach that that's an abuse of notation and terminology, and then almost never do they use variables other than x or t as independent variables, making it tougher to clean up that mess after it's entrenched in the students' minds.
The claim then that (ax)'=a is false, but it's ubiquitous on quizzes and tests as the only correct answer. If a good student writes (ax)'=a'x+ax', the grading key says they're wrong when they're right. Without context the problem is misstated and does more harm than good.
@@DrTrefor I get this. In many situations that call for the indefinite integral you end up only needing 'an' antiderivative rather than all of them. Either because you have some initial value that lets you define what the constant C is, or because the problem eventually leads into a definite integral. So in a lot of cases the piecewise definition doesn't really bring anything useful. But even so it's still a good idea to understand when the shorthand doesn't actually include
It's a bit of a convenient shorthand that is fine for most situations, but it's still a good idea to keep in mind what it's lacking.
Additionally, correct me if I'm wrong, but you could likely correct for this at the end if you really wanted to be complete, by at the end adding a little piecewise definition for C depending on the which interval of the domain x is in. Sort of how like when taking a definite integral it's common to omit the +C entirely since you know it's going to cancel out, but it's still important to remember that that +C is still really there and what it means.
Also, if I'm not mistaken you could correct for this at the end (or at any step) if you really wanted to, by adding a piecewise definition for C for each interval of x separated by a point of discontinuity.
Also, this issue would crop up for integrating lots of other functions:
f(x)=1/x^2, f(x)=3/(x-5)^3, etc. And imagine asking for the "full" answer for the indefinite integral of tan(x).
@@justsomeboyprobablydressed9579 there are so many places where the notation seems slightly buggy. this is an interesting find. the first thing that came to mind is piecewise spline curves.
Within the theory of distributions, what is done here is adding multiples of the Heaviside step function H(x) and/or constant functions to the antiderivative: F(x) = ln |x| + A H(x) + B, where A and B are constants. The derivative is then F'(x) = 1/x + A δ(x). Here, 1/x is the principal value distribution and δ is the Dirac delta distribution. So for distributions the only antiderivatives of 1/x are ln |x| + B.
but if 1/x is undefined at x=0 and A δ(x) is only nonzero at x=0, shouldn't the A H(x) term remain in the form for the antiderivatives of 1/x, since 1/x should exactly equal 1/x + A δ(x)?
@@rarebeeph1783 A distribution isn't defined pointwise, so we cannot say that the distribution 1/x is undefined at x=0. Saying that δ = 0 on ℝ∖{0} is okay, however.
Within the theory of distributions, what happens when we add A H(x) to the antiderivative, as is done in the video, is that we add terms A δ(x) to the derivative. Thus, our antiderivatives are not for 1/x but for 1/x + A δ(x). So, the only antiderivatives of (principal value) 1/x are ln |x| + B.
@@rarebeeph1783
A better way to think of it is in terms of measures. Instead of thinking of the dirac delta as a function of a real variable (because it isn't), you should think of it as a measure concentrated at zero. Moreover, the notation "δ(x)" for such a concept is wholly confusing, mathematically incorrect, and pedagogically vapid. One should denote it only as δ_0 ("delta subscript zero"), and realize that it maps measurable sets to real numbers. If the measurable set E includes the number 0, then δ_0 maps E to 1, and otherwise, it maps E to zero. That way, when one computes the integral, over the measurable set E, of the dirac delta times a real valued function f of one real variable, is either 0 or f(0), according to whether 0 is in the set E or not. For the function f given by the formula f(t)=1/t, 0 is not in the domain of f, so without a richer interpretation of integration as in Lebesgue integration or some other variants on Riemann integration and Improper Riemann integration, you cannot assign a meaning to the integral in question even in this case.
A problem with the question at hand is that 0 is not in the domain of the function in question, so integrals of it against the dirac distribution don't really make sense. I guess one can (and perhaps does) extend the theory by extending the notion of these integrals to try to extend the integrand to the closure of its domain, but in this case, one still has the problem that the unboundedness of the function requires one to first extend the real number system to the extended real numbers so that both lazy 8 and its negative are members of the codomain (and perhaps of the domain). In this case, we still cannot make sense of f(0) in a way that is not seen as ad hoc, because the limit from the left and the limit from the right at 0 do not agree. One could instead use the Riemann sphere, I guess, which is the one point compactification of the complex plane, and then one does not include the negative of lazy 8 in the codomain or the domain, and one "defines" 1/0 to be lazy eight, which is the point of compactification, located at a pole of the Riemann Sphere, usually considered to be the "North Pole", diametrically opposite the pole at 0, usually considered to be the "South Pole". In this nice repair of the situation, one would be able to recover the property described for the dirac distribution for bounded functions, namely that the integral of "δ(x)/x" (abusing the notation in the sophomoric way in ODE textbooks), would be interpreted (`calculated'?) as f(0)=\infty.
Is that language of gods?
thats a dam good answer, it just looks at the discontiniouty in the most elegent way possible. I went about it in a dumber way with insisting on the complex derivative to make sense as well
Certainly those are all the antiderivatives with the same domain as 1/x. But I don't love calling them the "indefinite integral" because a disconnected domain isn't useful for calculating definite integrals (or path/contour integrals). I'd personally rather say something like "indefinite integral means the antiderivatives on a connected component of the domain" and note that it just so happens that with a trick like ln|x|, you basically never have to write them piecewise in calculus.
I would also be happy with this. It slightly changes the criticism, which is then that most calc textbooks don't put the added qualifiers on what an indefinite integral means that you did here.
And of course the "trick" works because |x| is itself piecewise, or with the alternate definition of sqrt(x^2), because sqrt is not a true inverse function because of x^2 isn't 1-1.
Eh. I think the term "indefinite integral" should be retired altogether, as it is more unhelpful and confusing and misleading, than it is useful.
Indefinite integral is just a confusing way of saying antiderivative. If it is defined differently, a indefinite integral of f should be all function F satisfy F(b)-F(a) equal integral of f from a to b in the domain
@@Noname-67 That is fine for continuous functions, but for other functions you have to use something more general than the Lebesgue integral if you want to recover the usual class of antiderivatives.
Nice video.
In section 5.4, Stewart's Calculus with Early Transcendentals does say, "We adopt the convention that when a formula for a general indefinite integral is given, it is only valid on an interval." It goes on to say that in a sense the general anti-derivative to 1/x^2 is the piecewise defined function -1/x+C_1 for x0. I prefer the convention that when we take an antiderivative, it's always on an interval. So with this convention integral 1/x dx = ln |x| + C is a shorthand for saying that the general antiderivative of 1/x on (-infinity,0) is ln (-x) + C and the antiderivative of 1/x on (0,infinity) is ln x + C. I also like Spivak's suggestion in his Calculus book, that we could dispense the + C altogether. So instead we ca just remember that the equality sign in that context means equal up to the addition of a constant on an interval.
I'd disagree with removing the + C because then you'll abuse = notation, but I'd be in favour of getting the C to explicitly mean "the set of all functions with derivative 0 over the domain".
In this case, the piecewise C and D would quallify, because it's derivative is 0 across the entire domain (since the discontinuity isn't included in the domain)
This is something we implicitly do through abuse of notation, but this qualifier would make it formal. In this case the + C would always make the equality valid
I was sceptical clicking on this video due to the clickbait-y title, figuring the "trick" would be something extraneous involving non-principal branches or whatever, but instead I learned an interesting fact about a tangible consequence of dealing with disconnected domains. Fantastic. You could easily apply this logic to other piecewise defined function too with disconnected domains.
Thank you for using an actual theorem to explain a result. Most math teachers give a geometric example, which is fine, but they stop there. This made it so clear. Praise to Cauchy for his exhaustive precision.
I'm a math prof and have been making this point to my students for years; glad to see someone else is also.
or, as another guy said here, since you don't use indef integrals on disconnected domains (to compute definite integrals), you give two separate antiderivatives on two connected parts
I guess same story for differential equations. We always define a solution on an INTERVAL. Otherwise, we would be able to come up with many more solutions by constructing piecewise functions as shown in the video.
Indeed, integrating 1/z in the complex plane with a branch cut (say) on the positive imaginary axis, we have log(-x) = log(x) - iπ for all x > 0. So, restricting to the real axis gives an 'off-balance' antiderivative of 1/x like the one in the video.
Yes! If we take the complex result restricted to the real line, we actually know the difference between the constants on the left and right, and it's imaginary.
(confession: I was a graduate student doing particle physics calculations before I figured this out)
This was actually mentioned in Gilbert Strang's Calculus textbook, also the uniqueness thing. And this "abuse" of notation is done in many contexts, like asymptotic growth of functions (representing space or time complexity) in CS texts. I think it's alright if textbooks make it clear which many of them don't sadly
The abuse of notation in asymptotic growth is much more egregious, though. It’s insane that someone would choose “=” to represent anything that’s not equality, or even an equivalence relation.
Couldn't the same argument be made about ANY functions with discontinuity in the domains?
That is, if a function is continuous on open intervals then each interval can have a unique constant and the derivative would still match the whole domain.
In this sense, it's not that ln|x| is technically incorrect, but every function with discontinuity is, as well as ln|x|.
Wow, I'm a college prof. and I'm just happy to get my students to correctly state on an exam that the antider. of 1/x is ln|x|+c let alone understand that nuance. It's really not worth the effort.
Never heard corollary pronounced like that
It’s a US vs UK thing I believe (and I’m the weirdo Canadian in the middle)
@@DrTrefor all good, more so a TIL thing (not like that word comes up so often that it’s a difference we’d hear often). Thanks for the video and the response!
Great job pointing out a little subtlety that helps elucidate/remind students of what the +C was all about in the first place.
You have this because the real calculus indefinite integral mixes up two complex branches of the same analytic function, which is why you were able to find your 2 constant antiderivative
This sounds like making calculus complicated just for the sake of being technically correct. Wouldn't a sane person just write two integrals, one for +x and one for -x?
I think that ln(x) is a perfectly fine antiderivative to 1/x.
We just let x ∈ C (it won't actually matter in the end). Now, we can use euler's identity to define -1 as e^(πi),
and say that every -x
= e^(πi)*x
= e^(πi)*e^ln(x)
= e^(πi+ln(x)),
so ln(-x) = ln(e^(πi+ln(x))) = πi+ln(x)
The complex πi is a constant and would be dropped during differentiation (told you it wouldn't matter), and we can say with confidence that
d/dx(ln(x)) = d/dx(ln(-x)), and therefore
∫(1/x)dx = ln(x)+C, no special cases. (edit: well 0 is still not defined but I think we can let that slide)
The passing to the complex plane, with the zero removed or a ray removed, introduces a restriction that doesn’t exist on the reals with the zero removed. The continuity on this larger connected set. That is why you get a result that when restricted to the reals gives you a smaller set of solutions.
You should be careful doing this if you haven’t taken complex analysis. As the other comment stated, your perspective added restrictions that weren’t previously there, therefore you get a smaller solution set. In order to use ln in the complex plane, you need a lot to get there first
Correct. But this is correct for all functions who have poles. So for examples f(x) = 1/x^2 -> F(x) = {-1*x^-1 + C für x0}
Indeed!
This is not only true for functions with poles, but for any function that is continuous on a disconnected domain. The antiderivative of function f(x)=x, where we restrict the domain to be the nonzero real numbers will have the same problem.
@@tracyh5751 Better yet, as I indicated in another reply, it is even reasonable to work with totally disconnected domains, like the rational number field, in which the proper way to state the corresponding theorem is the following:
Theorem: Let f and g be functions with the same derivative. Then f and g differ by some pseudoconstant function.
A function c is locally constant at a point p provided that there's an open neighborhood of p on which c is constant, and we say that a function c is locally constant if it is locally constant at every point in its domain. On a connected domain, every locally constant function is constant. (There's a better result available, by the way, and I'll leave it as an exercise 🙂.) We call a function h a pseudo-constant function if its derivative is zero on its domain. Not all pseudo-constant functions are locally constant, although the converse holds. In fact, Charatonik (r.i.p.) and I studied the notion of an absolute derivative, which is closely related to the notion of a derivative (and in the cases considered in this forum, are computed by finding the absolute value of the derivative), and we constructed functions on totally disconnected spaces (like the rational numbers or a cantor set) that are everywhere differentiable, have zero derivative everywhere (and so are pseudo-constants), but are nowhere locally constant, meaning that if p is a point in the domain and U is an open neighborhood of p, then such a function is not constant on U. The heat of the result is that with a base of clopen sets, one carefully constructs a sequence of functions, each of which is locally constant at less points than the previous sequence member, but approximates the previous sequence member everywhere.
This does serious damage to the uniqueness theorem for differential equations, unless one phrases the uniqueness theorem in terms of equivalence classes whose members only differ by a pseudo-constant.
Great video, I'm feeling so much more confident explaining ln|x| as the integral of 1/x which I've always done with a lot of hand-waving, appeals to the nature of 1/x as an odd function but not much serious discussion. In the future I'll discuss the domain mismatch between ln(x) and 1/x. My students will appreciate this.
Awesome!
I simply accepted on faith that the indefinite integral of 1/x is ln|x| + C. It has been so ingrained in me. However, I’ve noticed some of my professors don’t use the absolute value occasionally.
Right now I’m taking an Analysis course and the second part of my upper-division of my proof-based Linear Algebra course.
Ever since Calculus, I always struggled with functions that are defined piece-wise. I don’t know why, but anytime I see one, my heart instantly drops and I immediately assumed right away, before even really understanding it, that this problem is probably going to be very difficult or I’m going to be too dense and stupid to solve it.
Just take them as the separate functions on the intervals they’re defined on, assuming they’re broken into intervals. Piecewise isn’t hard, it’s more mental struggle than actual math capability struggle. Just try to shake that thought process
I mean, depending on your analysis course, ln(x) is sometimes just defined as ln(x) = int_1^x 1/t dt for x in the domain (0, infinity), so there's no more justification really needed to show that the antiderivative of 1/x is ln|x| (or some transformation of ln|x|). From there, you can define its inverse exp(x) and find all the relevant properties of both.
@@andrewkarsten5268 I think you have just described me perfectly. It’s more of my low self-confidence in my mathematical abilities stemming from my K-12 education where I would fail most of my math classes every year and make them up in my summer. And here I am, just recently graduating with a mathematics degree..
@@ericy1817 I think you may be correct because I think that is how my professor defined, if I remember correctly.
The good news is that I think I passed my analysis course. I’m still waiting for the final grades to be posted, but I think I did sufficiently well to pass with a passing grade.
Honestly, even though I more than likely passed, I feel like I didn’t master the material the level I would have liked. I felt like I barely scrapped by because I didn’t have sufficient time to study or learn the material since I learn at such a slow pace given my learning disabilities. I love math, even though I consider myself to be terrible and slow at it.
For practical purposes you will be on one branch or the other. The relationship between the branches is of no consequence in all the applications that I know of. I’d be interested to hear if you can think of any. Another neat interpretation is to say that the absolute value is unnecessary if you allow natural log to be complex valued and you allow the constant of integration to be complex. Cool video.
I'd say the main "practical" point is just reinforcing the normal idea that you can't just integrate between two values, you have to check the domain first to picture you don't have some improper integral. That point is well made in normal calculus exposition, but this helps reinforce it I think.
Not just unnecessary, wrong. d/dz ln|z|=Re(z)/|z|^2
One has to be flexible with the notation. When one writes the family of antiderivatives of 1/x as ln|x|+C, one has to recognize that since the domain of ln|x|+C is comprised of disjoint intervals, one is free to choose different values for C on each of the intervals. This is implicit in the use of the term "arbitrary" in "arbitrary constant."
By and large this discussion is about notation, and how best to use it to avoid unnecessarily cumbersome presentations of families of continuous curves in R^2.
You can do this for *any* function with asymptotes, not just 1/x.
Calculus textbooks are fine. The antiderivative is defined on connected domains only. Indefinite integral over R without 0 is undefined.
ln(-x) is equal to ln(x) +i*pi i*pi is a constant, you don't need abs val
No sir there is a book by James Stewart says the same you said here all his books about math says that. The book I am using is calculus 9th ed at page 393 you can see it chapter 4 last section 4.9
frankly, asking for the antiderivative on a disconnected domain is not a well-posed question. If we were in C then we can discuss the nature of the point singularity and this basic example is already connected to such involved ideas like analytic continuation and monodromy.
And just to be clear: I can’t cut a peice of a parabola (a,b), translate it to a peicewise function, and shift the parabola by D on the interval (a,b).
Another important aspect is that these definitions should be "useful" hence if integrated in an interval (a,b) they should make sense (satisfying the fundamental theorem of integral calculus). You cannot integrate 1/x over an interval which contains 0 as an inside point, hence this is never an issue.
DR Trefor must be courageous to say the least.
There's need to take responsibility even in mathematics.
My favourite values of C and D are 0 and pi*i respectively
So I guess that an indefinite integral gives you a family of functions where the number of constants is equal to the number of connected components of the domain.
I believe this is closely related to the fact that uniqueness of solutions is broken when diff. eqs. has a singular point (Non-Lipschitz)... look the example of y'=sqrt(y) in Wiki page for Singular Solution
We can generalize this idea with what I like to call a "locally constant" function. The antiderivative of 1/x is ln|x| + C(x), where C(x) is locally constant function, that is, a function for which C'(x) = 0 at every point of its domain. For a function defined only on an interval, the locally constant functions are just the constant functions, but when the domain is disconnected, the locally constant functions may be a different constant on each connected component of the domain
Can the MVT be generalized to complex values of x? Taking d(artanhx)/dx=d(arcothx)/dx as a motivation.
Dude. That bugged me when I first learned Calculus. And I'm sure I was not the only one.
So, why did you single out the ln|x| function? The things that you said about ln|x| could be said about any elementary function with a hole in the domain, such as for example tan(x), cot(x), sec(x), etc. In fact, we don't even need a hole in the domain for your argument to hold. Take for example f(x) = |x|, which is everywhere continuous, though not differentiable at x=0. The derivative of |x| is x/|x| for any non-zero x, but this is also the derivative of any piece-wise defined function such as f(x) = |x|+C1 if x>0 and f(x) = |x|+C2 if x
i suppose as long as we're nitpicking, you could also define f(0) = E without changing the derivative
In this case, the function wouldn’t be differentiable at 0
@@DrTrefor yeah, so the value at 0 wouldn't affect the derivative. right?
I see why they left this out and I’m happy they did lol
Lol fair:D
The same annoyance happens every time there is a discontinuity. Get me the antiderivative of tan(x).
If I understand correctly, there's nothing about this argument that's specific to ln|x| and 1/x. You could apply it to any function with any discontinuities
Or even without discontinuities. Take for example f(x) = |x|, which is everywhere continuous, though not differentiable at x=0. The derivative of |x| is x/|x| for any non-zero x, but this is also the derivative of any piece-wise defined function such as f(x) = |x|+C1 if x>0 and f(x) = |x|+C2 if x
Not an open domain..but it's completely satisfied in the existing domain its has (-infinity, 0) or ( 0, infinity)....so that MVT is totally satisfied in specific domain intervals..all we need to specify that particular intervals when ever the question arises
You could define an indefinite integral like this for ANY piecewise defined function.
True!
Imo the complex-valued logarithm solves a lot of these problems. ln(-x) = i pi + ln(x) (principal branch) and i pi is a constant function (assuming your domain does not include zero)
6:03 - Bullshit, this is just literally how abs works, you done nothing but rewrite it another way XD
I feel like it's much more sensible to define the function F only for positive (or, if necessary, nonnegative) numbers, since you can't even integrate over 0, so either way you get one or two integrals from 0 to some x, and only the sign needs to be determined.
While it’s true you can’t do a proper integral over 0, with absolute values you can still integrate from say -2 ti -1
This is an illustrative example about the need to handle calculus with care. Ignoring conditions behind methods/formulae could lead to invalid/meaningless results.
In general, whenever you have a finite number of discontinuities you can use a different C for each continuous part of the domain. If the number of discontinuities is infinite then you have an even bigger family of antiderivatives.
Amazing! I opened the video very skeptically and my mind was blown!!!!!
0:09 - Yes, I was taught this. In particular when X=cabin, the integral of an inverted cabin is a log cabin. Sorry, I was forgetting the C. Log cabin plus sea... a house boat.
As a calculus teacher, I am happy to say that this is covered in our textbook and I do talk about it in class... and then we just say +C anyway because of MVT corollary that was mentioned in this video.
Do you know of any examples of functions with vertical asymptotes and convergent integrals on both sides, whose most obvious choice for an antiderivative has a jump discontinuity?
I'm trying to find a function that motivates the need to split the integral at the vertical asymptote and carry out two improper integrals. Every example I come up with, usually has continuity that is salvaged when taking the anti-derivative, and you can get away with ignoring the vertical asymptote, and still get the correct answer.
Does this really make sense? Would you do the same with 1/x^2?
Or tan (x) with an infinite-parts piece-wise antiderivative function for the infinitely many real numbers at which tan(x) is not defined, and an infinite numbers of arbitrary constants, one for each part?
you're spot on
Exactly. The specific choice of 1/x was just as an example, any function whose domain is a disjoint union of intervals has the same issue.
@@DrTrefor ... Wow, interesting. I was about to ask how you deal with calculation of areas that include the point of discontinuity (if the area remains convergent) but then I realized that you need to break the integral in the same intervals at each point of discontinuity anyway. So for example if you want the are under 1/x^2 between -2 and 3 you have to find the area between -2 and 0 plus the area between 0 and 3; you cannot do it in one step. So using different arbitrary integration constants for each segment would not affect the result.
I’m just a grade 10 pre-cal student pretending to understand rn
Thanks for the video!
In our lectures I distinctly remember that we were told that indefinite integral of 1/x is just ln(x) + C, without the module, and I always just assumed that this just means that x > 0 as well.
However much later we were basically given the same formula for integral of 1/z and it would be just ln(z) + C in a complex plane, with no limitations except z=0. And as someone shown in the comments, it is a correct formula as the difference between ln(z) and ln(-z) is just i*PI.
So I guess the moral of the story is that everyone is taught slightly differently and there aren't necessarily any problems with someone's "textbook" explanation after all...
ln(z) = ln(|z|exp(iarg(z)))= ln|z| + iarg(z)
Absolute value becomes complex modulus and the phase factor is added to the constant.
If you can have two different constants on the real line for the positive and negative domains, how do you ensure it's continuous when extending to the complex plane?
@@cryora it's not continuous on real plane though. The value of ln(0) is undefined, so the fact that constants are different doesn't matter
@@YuriyNasretdinov I mean continuous on the complex plane except z=0. If you have two different constants for x0 on the real line, there must be intermediate values when you go off the real line and into the imaginary axis.
I quite liked this video. I agree with some of the comments that very rarely will the typical restriction of the family of antiderivatives matter for practical applications; however, I think "complexifying" the answer in this case actually gives more insight as to how you should treat disconnected domains and makes the whole thing feel less hand-wavy.
Q: “what is \int_(-1)^(1) dx/x?”
A: “whatever you want it to be.”
(e.g. “indeterminate”)
I just graduated from UC and realized that we missed each other by one year ... Go Bearcats :)
Go bearcats!
The sum of the squares of the shorter two sides of a right angle triangle are equal to the square of the hippopotamus.
The same could be done to any function. Anti derivative of f(x)=1 is then not x+C either, because you could break it up anywhere and shift the parts up or down...
But then the anti derivative won't be continuous at the point where you change constants so you won't be able to take a derivative there. This doesn't matter for integrating 1/x or any 1/x^k (k >= 1) as they're not defined at zero so do not need to be differentiable there. So as long as we have a hole to take advantage of, we can put in a split and make it so that the resulting non-differentiable point lines up with the original undefined point.
@@sjth2497 oh right. Thanks for the correction.
You make it sound like there's something special about ln(abs(x)) but it's really applicable to any function that isn't continous in a single point. If you integrate tan(x) you have infinite variations for every continous part of -ln(-abs(cos))
Though I hadn't heard that definition of the indefinite integral, before. That's worth checking, so thanks.
Absolutely, 1/x is just the simplest example
You're a tricky guy, Trefor. A real tricky guy.
Eh, I see your point. It seems like a technicality -- which is certainly an interesting thought. But I wouldn't go as far to say I was lied to. The title is too click baity
You crossed from one branch to another. This is once again support for introducing complex variables to teach calculus. It avoids the pathologies that seem to amuse those stuck in the reals, but again, I don't know if it provides additional insight.
The whole business became much less awkward and strange when I realized that for negative real numbers ln(x) = ln(-x) + iπ. On the complex plane we can just say that the integral of 1/x is ln x + C and that strange absolute value function goes away. But restricting it to real numbers gives us another degree of freedom by splitting the domain in two.
I am a calculus professor and I admit, I have been lieing both to my students and also to myself, but no more!
From here on out you have my promise that I will demand my students give full anti derivatives. This will of course include spreading the anti derivatives of every function with i discontinuities into a piece wise function, with each ith piece equipped with a new constant $C_i$. That will show those calculus students who is boss!
Is it fair that you made professor having made this mistake yourself, and your students aren't allowed to make this mistake to pass your class?
@@cryora I think that as long as I go over it in class a few times and on some practice exam problems, than it is fair game.
More general, one integrates a continuous function defined over a one-dimensional manifold with more than one connected component. The statement about the set of all antiderivatives is then individually for each connected component :) So, it is actually quite common in differential geometry to be aware of that, while I agree that this detail is often omitted in first semesters :D
You can obviously also do this to any pair of functions (f,F) where they are both undefined at zero
Edit: in fact, you can do this to any pair of functions (f,F) where they are both undefined at the same x value, for any real x. You can then shift the "left" side of F and the "right" side of F by different constants, yielding the same derivative still.
That’s OK. I lied to him too.
Just conjoined both the pieces in the definition and a general form of every anti derivative of 1/x is ln|x|+C*sgn(x)+D
I don't deny the importance of paying attention to what is happening at x = 0, but there is a distinct advantage to using the same C for both x0. Suppose the integral is from a to b and a
So instead of stating, that the anti-derivative of 1/x is the natural logarithm, we should rather state, that the anti-derivative of 1/x is the chain function of the natural logarithm and the absolute function plus C•[indicator function on (0,∞)] plus D•[indicator function on (-∞,0)]?
Yeah, I guess, that's more accurate.
I was sceptical clicking on this video due to the clickbait-y title, figuring the "trick" would be something extraneous involving non-principal branches or whatever, but instead I learned an interesting fact about a tangible consequence of dealing with disconnected domains. Fantastic.
Sorry to disappoint you, but even though I studied engineering, my calculus professor, a brilliant person who's unfortunately left us (Jürgen Geicke) did explain this to me correctly, in the first course I ever had at a university.
In his tests, he would often put questions of functions like these, that had singularities, and required us to write down the intervals where the solution was valid. For the integral of 1/x, the correct answer was ln x + c for (a,b) with b > a > 0 and ln(-x) + c for (a,b) with a < b < 0.
That's because, for him, the antiderivative was defined as the set of all functions F(x) such that F(b)-F(a) gives the integral on the interval (a,b), and the integral of 1/x is not even defined if a < 0 < b.
To be honest, at the time I was just a dumb student and got many of these questions wrong. Nevertheless, I can disprove your conjecture. At my first ever calculus course, I studied the correct version. Thanks a lot, Prof. Geicke!
great teacher
The FTC proper doesn't apply to 1/x over an interval containing zero, so the hazard is brushing this under the rug. So since you shouldn't include zero anyway, the antiderivative with a single +C is fine because the two pieces aren't supposed to be connected.
There's also the Cauchy principal value generalization, but this is a very fragile and finicky thing. It agrees with the result gotten by improperly evaluating the antiderivative across an interval containing zero. But the Cauchy principal value is fragile and does not play well with any sloppiness such as u-substitutions that could asymmetrically distort around the singularity.
Just be really skeptical if you integrate around a singularity. Sometimes there might be a reason for it, but it's hazardous and it's not really clear that any one generalization should own the right to calling itself the right one.
So the indefinite integral of tan(x) can be written as a piecewise function composed of infinitely many unique functions?
Exactly! 1/x is just a template function here
Pretty much anything that has infinity is going to require you to split it there, otherwise the integral would likely just be infinity. But, if you do split it, you get a couple of improper integrals that may be finite, depending upon the specifics..
I agree this causes lots of confusion. They should really teach this as ln |x| + C[x0], demonstrating the discontinuity actually makes this behave more like two functions rather than one.
Counterpoint: I'd argue ln|x| + C already covers these extra cases. We know from algebra that f(x) = |x| can be written as a piecewise function, so it's not difficult to see that ln|x| can also be written as a piecewise function. And as is customary when splitting up the constant C, we rewrite this constant on both parts of the piecewise function as C1 and C2. They need not be equal. With this setup, you can write every kind of piecewise function whose derivative is 1/x while preserving the original notation and equation for the integral of 1/x.
I’m fine with this, but since most students aren’t thinking this when they write the plus C there is still something of pedagogical benefit
@@DrTrefor Most students probably don't understand why we write the +C in the first place. They just see it as something they have to do, and will lose marks for omitting it, without understanding why. Especially when they use it for definite integrals, and can get away with omitting it.
I have an example of a real life application for keeping the +C around, that you may use as you see fit. The real life function isn't necessarily sinusoidal, but it is periodic nonetheless, and the same idea applies. I made up the example with a cosine function to keep the math simple:
"A battery experiences a daily cycle of loading and charging, where the power to the battery in kW at each hour of the day (t) is given by P(t) = 8*pi*cos(pi/12 * t). It is desired to keep the battery operating between 24% and 88% of its full capacity. Determine the full battery capacity and the function E(t) for the state of charge in kilowatt-hours."
This ln|x|+C form is a bit dangerous too, because it suggests that the integral from -a to a over 1/x is zero, as if integrating past zero could be somehow healed. For integration along the real axis one can't integrate past zero, and for contour integration there is a residuum, so it depends on the integration path, but there's always an imaginary offset.
I would say, when you integrate from -a to a past x = 0, since the function is undefined at the point, you must integrate -a to 0 and 0 to a separately, and you'll find that they both diverges and the integral is undefined.
For some integrals, however, when you integrate over the real axis across a discontinuity, you could get a real number instead.
@@plus-sign Yes, and that's the danger here, that the ln|x| suggests you could integrate across the discontinuity as if it were converging, or as if one undefined integral would cancel the other.
Depending on the context the integral arises from (i.e. when the integral is part of a solution to e.g. some other mathematical problem) it might work out perfectly fine (maybe only one of the branches is of interest anyways) or it might be misleading.
Does it have meaning to talk about the definite integral of 1/x over a span that crosses zero?
If you take a definite integral to be the "area under the curve" and assume that the limits of 1/x as X->0 from each side are equal and opposite and then conclude that implies those two limits sum to zero, then I think there should be a well defined definite integral for any span that doesn't end at zero inclusive. Furthermore that definite integral can be found in the normal way by using the classic definition for the indefinite integral of 1/x.
Only when the integral converges as you approach the asymptote, does it even make sense to talk about a definite integral crossing a vertical asymptote. The integral of 1/x diverges on both sides, so you can't integrate it across the singularity.
For instance, the integral of 1/(x-1)^(1/3), from 0 to 9. The indefinite integral is 3/2*(x - 1)^(2/3) + C. Or more accurately per this video, it should be 3/2*(x - 1)^(2/3) + C + D*H(x-1), where H is the Heaviside step function, and D is another arbitrary constant.
Keeping it simple and using the conventional answer for the indefinite integral, you can evaluate it across the two bounds. You will get the same answer as you would if you split the integral in two segments, and add the two segments together. The reason is that the real valued versions of (x-1)^(2/3) will connect to each other with continuity on both sides of x=1, and form a cusp at x=1, instead of a vertical asymptote.
My teacher explained me this. And the final conclusion was that it’s better to avoid using the symbol integral without explicit boundaries.
Technically this is not unique to the antiderivative of 1/x. It also applies to any reciprocal function that is asymptotic. A way to resolve this issue is to broaden the definition of +c to a “constant function”, with a derivative of 0 over the domain of the function. This allows the constant to “change values” as it passes asymptotes, to define any potential antiderivatives of f(x).
Ah, this is why I always lift the problem into the complex plane before working things out. You get a branch cut, of course, and need to skirt around it, but otherwise it generally works.
Another cool thing is the constants don't have to be real. Try -2*i*arctan(exp(ix)) and integral of sec(x) for example. Though I've been told that asking a student on an exam if the former is an antiderivative of the latter amounts to torture.
So is it the same thing with integral of sec^2(x) where instead of tan(x)+C now we have a bunch of offset tangent curves?
Exactly! 1/x is just the simplest example
I just assume everybody is lying to me, anyway. I'm rarely pleasantly surprised and wrong. 🤔
Well, thats 10 mins of my life I will never get back.
That’s why the absolute value sign is present…
I think one's can calm their mind by adding infinity to the number line.
Infinity would be similar to 0, in the sense that negative infinity equals infinity.
This lets us keep many more functions fully differentiable, such as 1/x.
This way, the limit at infinity of the antiderivative of 1/x *has* to be ln|x|+C, because otherwise it wouldn't be differentiable at infinity.
If you read this far, you might've noticed a flaw, which is the fact I actually handwaved a completely wrong statement.
This piecewise function certainly does satisfy the limits, even with infinity added! The limits work out.
The more convincing approach is to show that ln|x|+C satisfies a lot of 'natural' properties, especially on the complex plane, with limits and infinity, or combining them, on a Riemann sphere.
this is also the case for integral of 1/x^2 right? We can move the pieces of the resulting -1/x similarly to how we did it here. If this reasoning doesn't hit a wall somewhere, then we have a BUNCH of functions where the anti-derivative has at least two degrees of freedom.
exactly! Any time the domain is disconnected like this it works
This is from my vague memory ... There is a sort of informal definition of logarithms (like the inverse of an exponentiation), but if has some sort of problem. So "modern" math added consistency to the log by defining log(x) = integral from 1 to x of 1/x for all x > 0. This solves incosistencies when trying to talk about log (π), for example.
That’s right!
ok but the function of abs(x) is defined as a piece wise function as well, so this argument fails. Also the arbitrary constant is equally applied to the family of functions just like the integral of 2x dx is x^2+c. You have to add the constant equally to the family of functions.
Really found this video helpful. Keep making such content, these are a great help to us
6:23 that is basically what absolute value means and is defined.
Same for the integral 1/x^2, you can use a different C for positive and negative values of x.
Why stop with the logarithm? What about the antiderivative of the tangent? Or of any rational function with a vanishing denominator that breaks up the domain of the function into disjoint intervals? Your argument appears more general. And I agree with a commenter below: For many practical considerations, we only work on an interval where the function is continuous so this concern does not introduce a serious impediment.
Oh yeah, learned this when studying differental equations in uni maths, when you have mutiple soultions to a differnetial equations, and you can split the domain, you can combine the solutions in any way you like.
People make this sort of mistake all the time and I'm glad someone's talking about how the theorem about indefinite integrals only differing by a constant is only true for a connected interval
When I see |x| I have to wonder if there is a inequality involved somehow
One way to look at the problem of finding the anti-derivatives of 1/x is to compare two anti-derivatives. Suppose f'=g' on the domain of 1/x, R\{0}, then f'-g'=0, and h'=0 (where h=f-g) on R\{0}. It is then easy to see that although h is constant on each of the intervals ]-∞,0[ and ]0,∞[, these two constant values don't need to be the same. It was this perspective (solve the equation y'=0 on R\{0}) that led me to understand this issue a few years ago.
One textbook that handles this issue well is J Stewart's Calculus (as someone else has already commented). The anti-derivatives of 1/x are correctly discussed, and when a table of anti-derivatives is presented with "+C" in each case, the caveat is given that each formula applies over an interval.
A spectacular example of a function where multiple constants are needed to correctly describe its anti-derivatives is tan x. Here the domain consists of a countably infinite number of open intervals, so you need a countably infinite number of constants to describe its family of anti-derivatives!
I had weird encounter with constants like that when integrating cos(x)sin(x)...
I can substitute u = sin(x), du=cos(x)dx... so the integral is u²/2+C=sin²(x)/2+C
But I can substitute u = cos(x), du = -sin(x)dx... so the integral is -u²/2+C=-cos²(x)+C
My first thought as a student is that something was wrong.
But... turns out
sin²(x)/2+C=(1 - cos²(x))/2+C=1/2 - cos²(x)/2+C=-cos²(x)/2 + (C +1/2)=-cos²(x)/2 + D
D=C+1/2 is a constant if C is a constant
So yeah, there can be more than one anti-derivative for the same function and they don't need to have the same form.