Welcome to our community

Be a part of something great, join today!

natural log and trig function question

DeusAbscondus

Active member
Jun 30, 2012
176
when I differentiate:
$$ln4x+sin(x)$$
I get:
$$\frac{1}{x}+cos(x)$$
and Wolfgram agrees

But then when i test this by calculating indefinite integral, I get:
$$ln(x)+cos(x)$$
Which leaves me with three questions:
1. what happened to the 4?
2. why isn't it integrating back to (at least) ln(x)+sin(x)?
3. why doesn't wolfram add $+C$ to the end of an indefinite integral,
seemingly defying a principle over which I've had my knuckles wrapped severely (and liked it) ?

Thanks,

Deus Abscondus or:
"God has absconded from the scene .... again!"
 
Last edited:

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
Hint: $\displaystyle \ln|4x|=\ln|x|+2\ln(2)$

The constant $\displaystyle 2\ln(2)$ gets lumped in with the constant of integration since it is just a constant itself.

I believe Wolfram states + constant on the end of indefinite integrals.
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
...
You have differentiated \(\ln(4x)\) incorrectly.
Perhaps he applied the chain rule and simplified...he does have the correct result. :)
 

Sudharaka

Well-known member
MHB Math Helper
Feb 5, 2012
1,621
when I differentiate:
$$ln4x+sin(x)$$
I get:
$$\frac{1}{x}+cos(x)$$
and Wolfgram agrees

But then when i test this by calculating indefinite integral, I get:
$$ln(x)+cos(x)$$
Which leaves me with three questions:
1. what happened to the 4?
2. why isn't it integrating back to (at least) ln(x)+sin(x)?
3. why doesn't wolfram add $+C$ to the end of an indefinite integral,
seemingly defying a principle over which I've had my knuckles wrapped severely (and liked it) ?

Thanks,

Deus Abscondus or:
"God has absconded from the scene .... again!"
Hi DeusAbscondus, :)

Sorry about the obvious error in my last post, I have deleted to avoid any confusion. >>Here<< is what Wolfram gives me. Note that there is the constant term and also the answer is \(\ln(x)+\sin(x)\). :)

Kind Regards,
Sudharaka.
 

DeusAbscondus

Active member
Jun 30, 2012
176
Thanks Sudharaka,

Well that would be:
$$\frac{d}{dx}ln(4x)+sin(x)=4*\frac{1}{x}+cos(x)$$ I suppose

But then, when you integrate this: you get $$4ln(x)-sin(x)+C$$
don't you? Which is patently not the original $$f(x)=ln4x+sin(x)$$
 

Sudharaka

Well-known member
MHB Math Helper
Feb 5, 2012
1,621
Thanks Sudharaka,

Well that would be:
$$\frac{d}{dx}ln(4x)+sin(x)=4*\frac{1}{x}+cos(x)$$ I suppose

But then, when you integrate this: you get $$4ln(x)-sin(x)+C$$
don't you? Which is patently not the original $$f(x)=ln4x+sin(x)$$
I am sorry about this but the answer you have obtained after differentiating \(\ln(4x)+\sin(x)\) in post #1 is correct and I was wrong in my post #2 and hence deleted it.

\[\frac{d}{dx}ln(4x)+sin(x)=\frac{1}{x}+cos(x)\]

as you have correctly stated in your original post. Refer post #4 and follow the link to see what Wolfram gives after integrating. Then look at Mark's post #2 to clarify more about what happens to the \(4\) as you have asked in your original post. If you have any more questions please don't hesitate to ask. :)
 

DeusAbscondus

Active member
Jun 30, 2012
176
Hint: $\displaystyle \ln|4x|=\ln|x|+2\ln(2)$The constant $\displaystyle 2\ln(2)$ gets lumped in with the constant of integration since it is just a constant itself.I believe Wolfram states + constant on the end of indefinite integrals.
Forgive my obtuseness: but I still can't see why the integration seems to lose the constant 4.Though I understand and appreciate the nice:: $$\displaystyle \ln|4x|=\ln|x|+2\ln(2)$$Btw, remind me again: what does the command: \displaystyle do?
 

Sudharaka

Well-known member
MHB Math Helper
Feb 5, 2012
1,621
Forgive my obtuseness: but I still can't see why the integration seems to lose the constant 4.Though I understand and appreciate the nice:: $$\displaystyle \ln|4x|=\ln|x|+2\ln(2)$$
\[\int\left(\frac{1}{x}+cos(x)\right)\,dx=\ln(x)+ \sin(x)+A\]

where \(A\) is the arbitrary constant.

As Mark had pointed out you can write,

\[\ln(4x)=\ln(x)+2\ln(2)\Rightarrow \ln(x)=\ln(4x)-2\ln(2)\]

Substitute this in the above equation and we get,

\[\int\left(\frac{1}{x}+cos(x)\right)\,dx=\ln(4x)+ \sin(x)+(A-2\ln(2))\]

Now \(A-2\ln(2)\) is also an arbitrary constant and we label it as \(C\).

\[\int\left(\frac{1}{x}+cos(x)\right)\,dx=\ln(4x)+ \sin(x)+C\]

So you see it is irrelevant whether you write \(\ln(x)+\sin(x)+A\) or \(\ln(4x)+\sin(x)+C\) because both answers are the same and one can be obtained from the other.
 

Sudharaka

Well-known member
MHB Math Helper
Feb 5, 2012
1,621

DeusAbscondus

Active member
Jun 30, 2012
176
\[\int\left(\frac{1}{x}+cos(x)\right)\,dx=\ln(x)+ \sin(x)+A\]

where \(A\) is the arbitrary constant.

As Mark had pointed out you can write,

\[\ln(4x)=\ln(x)+2\ln(2)\Rightarrow \ln(x)=\ln(4x)-2\ln(2)\]

Substitute this in the above equation and we get,

\[\int\left(\frac{1}{x}+cos(x)\right)\,dx=\ln(4x)+ \sin(x)+(A-2\ln(2))\]

Now \(A-2\ln(2)\) is also an arbitrary constant and we label it as \(C\).

\[\int\left(\frac{1}{x}+cos(x)\right)\,dx=\ln(4x)+ \sin(x)+C\]

So you see it is irrelevant whether you write \(\ln(x)+\sin(x)+A\) or \(\ln(4x)+\sin(x)+C\) because both answers are the same and one can be obtained from the other.
I love it!
Thanks Sudharaka; now I can relax, take a break, go eat, and digest properly having cleared that up.
Deus Abs
 

Sudharaka

Well-known member
MHB Math Helper
Feb 5, 2012
1,621
I love it!
Thanks Sudharaka; now I can relax, take a break, go eat, and digest properly having cleared that up.
Deus Abs
It's a pleasure to help you. :)
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
I have seen quite a few students run into this same issue with logs regarding anti-derivatives. This log property comes in handy too when solving certain differential equations.