# Latex skills and asking about antiderivatives

1. Jan 8, 2014

### lendav_rott

As a way of practicing my Latex skills and asking about antiderivatives.
Suppose we have
$$\int\frac{1}{x^2 + a}dx$$
a is just a constant
Now I recognize this to be
$$\int\frac{dx}{x}$$ whose antiderivative is $$\frac{\ln{|x|}}{dx} + C$$

The question is: In the first function, I could make a trigonometric substition - but do I have to ?
Is the antiderivative $$\frac{ln|x^2 + a|}{2x} + C$$ incorrect? The logic being if I only found the derivative of ln|x2+ a| I would have $$\frac{1}{x^2 + a} * \frac{d}{dx}(x^2+a)$$ so to cancel the 2nd factor I would divide the antiderivative by it.

If a=1 I could rewrite the 1st integral as
$$\int\frac{dx}{\tan^2x +1} = \int\frac{dx}{\sec^2x} = \int\cos^2xdx = \frac{1}{2}[ \sin(x) \cos(x) + x] + C$$ assuming i did my math correctly with this one.

but can it also be $$\frac{ln(x^2 + 1)}{2x} + C$$also on a side note, if there is an expression that is clearly Always positive such as x2 + 1 , do I have to use the abs value signs when I take the natural log of it?

Cheers

Last edited: Jan 8, 2014
2. Jan 8, 2014

### pwsnafu

Why? One has a linear term in the denominator. The other has a quadratic.

Why does the antiderivative have a dx in it?

Either that or arctan.

The only way to check is to differentiate it. So do it.

I have no idea what this paragraph is saying.

No.

3. Jan 8, 2014

### lendav_rott

In a more general manner. We have
$$\int\frac{dx}{f(x)}$$

can I solve this by the logic of
$$\int\frac{dx}{x}$$ and say that the antiderivative of the first is $$\frac{\ln|f(x)|}{f'(x)} + C$$

what I mean is, should I just find the derivative of $$\ln|f(x)|$$ it would be $$\frac{f'(x)}{f(x)}$$ because of the chain rule, the derivative of the total function * the derivative of the inner function.

Am I allowed to say like "ok, I don't want the f'(x) in the numerator so I would just divide the initial antiderative by the f'(x)"
The heart of the problem is what if f(x) can be Any function not just a linear one, will the same logic work?

Edit:

Actually, nevermind - I can only do that simple logic if I have to $$\int\frac{f'(x)dx}{f(x)}$$ and then it comes out purely as $$\ln|f(x)| + C$$ When I try to differentiate $$\frac{\ln|x^2 + a|}{2x}$$ I get only rubbish which, in no way, leads to the original :/

Okay, let's have another go.
$$\int\frac{dx}{x^2 + a}$$
Ok What I know is that ∫dx/(x2+1) is arctan(x) + C so to get to that I would find a way to substitute so that I would get u2 + 1 as the denominator.
$$\frac{1}{a}\int\frac{dx}{\frac{x^2}{a} + 1} | u = \frac{x}{\sqrt{a}}|du=\frac{dx}{\sqrt{a}}\Longrightarrow dx=\sqrt{a}du$$
substituting:
$$\frac{\sqrt{a}}{a}\int\frac{du}{u^2+1} =\frac{1}{\sqrt{a}} \arctan(\frac{x}{\sqrt{a}}) + C$$ok assuming I did this one right, the problem now is it only works only if a>0. If a=0 then I would simply have to find ∫x-2dx , but what happens if a<0, I can't take a square root of a negative number or can I re write any negative -a as i2*a?

About integration by parts:
$$\int x^2\sin(3x^3)dx\\ \begin{array}{cc}u=x^2&v=??\\du=2xdx&dv=\sin(3x^3)dx\end{array}$$having trouble finding the antiderivative of dv :/ One way I could let
$$\begin{array}{cc}u=x^3&du=3x^2dx\Rightarrow dx=\frac{du}{3x^2} = \frac{du}{3\sqrt[3]{u^2}} ?\end{array}$$and then find $$\frac{1}{3}\int\frac{\sin(3u)du}{\sqrt[3]{u^2}}$$ ok, this is worse, how can I solve this one?

Last edited: Jan 8, 2014
4. Jan 8, 2014

### vanhees71

I'm a bit confused what the one integral and the other have to do with each other in your opinion.

Of course, you are not forced to do a trigonometric substitution. I'd rather set $a=b^2$ and write
$$\frac{1}{x^2-b^2}=\frac{1}{(x-b)(x+b)}=\frac{1}{2b} \, \frac{(x+b)-(x-b)}{(x-b)(x+b)}=\frac{1}{2b} \left (\frac{1}{x-b}-\frac{1}{x+b} \right),$$
which easily integrates to
$$\int \mathrm{d} x \frac{1}{x^2-b^2} = \frac{1}{2b} [\ln|x-b|-\ln|x+b|].$$

5. Jan 8, 2014

### lendav_rott

I was confused whether any f(x) in case of ∫dx/f(x) would act the same as ∫dx/x , but I found out that it didn't. This is not homework or anything, I just took up the calculus part and trying to understand how things work.

Cheers

6. Jan 8, 2014

### HallsofIvy

Staff Emeritus
Yes, but the question was about $\frac{dx}{x^2+ a}$ not $\frac{dx}{x^2- a}$ You would have to set $$a= (ib)^2i$$ to use your method and, if you want your answer in terms of real numbers would have to determine what ln|x- ib| is.

7. Jan 8, 2014

### AlephZero

What you did was not integration by parts, and anyway integration by parts is a bad idea here.

You need to recognize the general "pattern" of transforming $\int f(x)\,dx$ into $$\int F(u)\frac{du}{dx} dx$$ which is the same as $\int F(u)\,du$

In your example, the integral contains $\sin{3x^3}$ and $x^2$, and of course $\frac{d}{dx}3x^3 = 9x^2$...

8. Jan 8, 2014

### lendav_rott

Oh good god, why didn't I see that, it is so obvious *smacks forehead*
$$\int x^2\sin(3x^3)dx \Rightarrow \frac{1}{9}\int\sin(u)du =-\frac{1}{9}\cos(u) + C =-\frac{1}{9}\cos(3x^3) + C \\ \begin{array}{cc}u=3x^3&\frac{du}{9}=x^2dx\end{array}\\\frac{d}{dx}[-\frac{1}{9}\cos(3x^3)] = -\frac{1}{9}\sin(-3x^3)9x^2$$and then the 9s cancel and minuses cancel since sin(-a) = -sin(a) although I've always preffered to write it as sin(-a) and I get what I need. Thanks a lot, AlephZero.

Another problem
$$\int\frac{x^2}{x-3}dx$$Were I to take$$\begin{array}{cc}u=x-3&du=dx\end{array}\Longrightarrow \int\frac{x^2du}{u}$$
Can I now consider the x term to be a constant? I am no longer integrating with respect to x, but u. Technically the x should be a constant. Am I allowed to drag it in front of the integral sign as I would normally with an actual constant?

E: Grrraah, it doesn't work - what am I supposed to do here?

Last edited: Jan 8, 2014
9. Jan 8, 2014

### Enigman

If u is a variable then so is x isn't it?
Try simplification by long division or some other algebraic manipulation...

10. Jan 9, 2014

### lendav_rott

Managed to figure it out
$$\begin{array}{cc}u = x-3 \Rightarrow u^2=(x-3)^2\\x^2=u^2+3(2x-3)\Rightarrow x^2=u^2 +6u +9\\2u+3=2x-3\end{array}\\ \int(\frac{u^2 + 6u + 9}{u})du =\int (u + 6 +\frac{9}{u})du=\frac{(x-3)^2}{2} + 6(x-3) + 9\ln|x-3| + C$$
any comment about the use of tex? Any formating tips, how to make stuff look better, mayhaps? Cheers.

11. Jan 9, 2014

### Staff: Mentor

You did pretty well. Here are a few comments.

Why did you use an array here? And you defined it to have two columns (using {cc}), but used only one.

Use \left( and \right) to make the parenthesis the right size:
$$\int \left( \frac{u^2 + 6u + 9}{u} \right) du$$

It is sometimes better to add a thin space \; before $dx$
$$\int x \; dx \quad \mbox{compared to} \quad \int x dx$$
Also, although Phys. Rev. uses $dx$, it actually makes more sense typographically to use $\mathrm{d}x$ instead.

This I find ugly. The $du$ should not be part of the fraction, and never use $\sqrt[n]{}$
$$\frac{1}{3}\int\frac{\sin(3u)}{u^{2/3}} \mathrm{d}u$$

Don't forget the backslash!

Never use a * to indicate multiplication. Use \times if you really need a symbol there (most of the time, it is unecessary)
$$\frac{1}{x^2 + a} \times \frac{d}{dx}(x^2+a)$$
or simply
$$\frac{1}{x^2 + a} \frac{d}{dx}(x^2+a)$$

12. Jan 10, 2014

### vanhees71

Now, to make the typography even perfect, use the good old rules from the good old days before Word & Co. spoiled the good taste for typesetting math and type differential d's upright, i.e.,
$$\int \mathrm{d} x \; f(x) \quad \text{and} \quad f'(x)=\frac{\mathrm{d} f(x)}{\mathrm{d} x}$$
etc.

Of course all fixed names of functions are to be set upright, like $\sin x$, [\itex]\exp x[/itex],...

13. Jan 10, 2014

### Staff: Mentor

As much as I dislike Word, it can't be to blame here. Physical Review always used an italic d, from the very first issue (in 1893). And they were not the only ones. You can check for instance this 1925 paper from Dirac: http://rspa.royalsocietypublishing.org/content/109/752/642

There is nowadays a standard, ISO 31/XI, which mandates an upright d, as well as upright e and i for Euler's number and the imaginary unit, repectively. Many European journals (those of the IOP and Springer, among others) follow those rules. A good introduction can be found in TUGboat:
http://www.tug.org/TUGboat/Articles/tb18-1/tb54becc.pdf

While we're venting, Phys. Rev.'s convention of italicizing all one-letter subscripts, even if they are not indices, is crazy (and wrong). Why $E_\mathrm{lab}$ but $E_l$ if both $\mathrm{lab}$ and $l$ stand for laboratory (and not the variable $l$)?

14. Jan 18, 2014

### wangchong

lendav_rott, all your questions are typical of calculus 2 where students will spend a semester exploring all the different techniques of integration. Very common mistakes are
1) putting dx on the denominator -- dx is not a number or a function.
2) put u as a function of x, then later assume that x is independent of u (well if u = x-3, then x = u+3, no?)
3) this is not you but plenty of student throw the dx or du away while integrating and hence almost any expression which has a denominator has an answer involving the natural log.
4) Anti-derivatives take a lot of practice, algebraic skills and discipline in strictly following the rules (because there is no product and quotient rule in integration), we ended up using means and ways to solve the problem like "by parts", "u-substitution", "trig substitution", "trig integrals" or even worse the techniques involving "partial fraction". But of course, as good Phyiscs students, all these hardwork (and training) are well worth it.

Last edited: Jan 18, 2014
15. Jan 18, 2014

### D H

Staff Emeritus
Are you sure about that? Bull. Math. Sci. is a Springer publication. Here's a recent article: http://download.springer.com/static/pdf/667/art%253A10.1007%252Fs13373-013-0034-2.pdf?auth66=1390227428_821803646888a975798c8f907625d391&ext=.pdf [Broken]

Even though I didn't like it, I used that ${\rm d}x$ style notation for a while. I didn't like it one bit; personally it looks quite revolting to me. But because that's what the powers that be said to use, I used it. I stopped using it when I noticed people were ignoring the powers that be in multiple journal papers. It just looks terrible.

Last edited by a moderator: May 6, 2017
16. Jan 18, 2014

### Staff: Mentor

So it seems that Springer was not a good example! I check a couple of books, and also found $dx$. What I had in mind when saying Springer was the Eur. Phys. J. series. I checked other European journals, like a few from Elsevier, and they use ${\rm d}x$.

I rather like it. When reading math, I find it easier to pick out the different parts of an equation when roman type is used for things that are not variables. Like so many things, it's a question of taste...

Last edited by a moderator: May 6, 2017
17. Jan 18, 2014

### D H

Staff Emeritus
I can't stand it myself. It is jarring to my eyes. It makes the math harder rather than easier to read. Operators are different; they're surrounded by whitespace. It's informative rather than jarring.

I also see big problems with regard to accessibility / ADA Section 508 compliance issues (then again, TeX/LaTeX is plagued end-to-end with accessibility issues). Over reliance on how things appear visually is a barrier to accessibility.