• Support PF! Buy your school textbooks, materials and every day products via PF Here!

Integrate 1/(1+e^x)

  • Thread starter Cummings
  • Start date
52
0
need to integrate 1/(1+e^x)

by using th rule 1/(ax+b) = (1/a)ln(ax+b)+c

i got (1/e^x)ln(1+e^x)+c

that is correct is it not?
because if i now differentiate that, i get 1/(1+e^x)..which is what we start with.

I am damn sure this is right, but its causing some arguments.
 
Last edited by a moderator:
Re: Integration

Originally posted by Cummings
need to integrate 1/(1+e^x)

by using th rule 1/(ax+b) = (1/a)ln(ax+b)+c

i got (1/e^x)ln(1+e^x)+c

that is correct is it not?
because if i now differentiate that, i get 1/(1+e^x)..which is what we start with.

I am damn sure this is right, but its causing some arguments.
let y=(1/e^x)ln(1+e^x)+c
dy/dx = 1/(1+ex) - 1/exln(1+ex)
You forgot the chain rule here. So the answer isn't (1/e^x)ln(1+e^x)+c

To tackle this question, we need a substitution.
Let
y=ex
dy/y=dx
.
.
.

I think the answer should be ln(ex/(ex+1)) + C

We can't use the rule 1/(ax+b) = (1/a)ln(ax+b)+c because a is a constant while ex isn't.
 
73
0
What level maths is this?
 
73
0
I've found this problem really hard.
Here's the answer I got.
[e^(1+e^x)]*[ln(1+e^x)]

Using a substution and intergration by parts (kinda)
 
Originally posted by Dave
I've found this problem really hard.
Here's the answer I got.
[e^(1+e^x)]*[ln(1+e^x)]

Using a substution and intergration by parts (kinda)
I don't think we need to use integration by parts in this question, and I'm pretty sure I got the correct answer. Also, I tried to use intergration by parts but I think it makes the problem worse. I tried to differentiate your answer but it seems that it isn't right. Could you please show your working?

Edit: Dave, I started to think I may have offended you in some respect in this post, but I didn't mean to. I'm too used to formal writing and English isn't my first language, and that's why I may sound stiff. I apologize if I did offend you.
 
Last edited:
Originally posted by Dave
What level maths is this?
Under the education sysytem in my country, we learn simple calculus in grade 10 and 11, and we learn harder(much harder than that in grade 10 and 11) calculus in grade 12 and 13.
 
73
0
Originally posted by KL Kam
Edit: Dave, I started to think I may have offended you in some respect in this post, but I didn't mean to. I'm too used to formal writing and English isn't my first language, and that's why I may sound stiff. I apologize if I did offend you.
No Offense detected. I'll try again on this and see If I get another answer...
Yes, I By parts does make it horrible!
some series solution!
 
52
0
i used the rule

1/(ax+b) = (1/a)ln(ax+b)+c

where a in (1/a) is the derivative of (ax+b)

thus the derivative of (1+e^x) is e^x

so i got (1/e^x)ln(1+e^x)+c

the rule for differentiating that is

a ln f(x) = (a * f'(x))/(f(x))

so from my
(1/e^x)ln(1+e^x)+c

((e^x)/(e^x))/(1+e^x)
= 1/(1+e^x) which is our original function.

KL Kam: we dont need to use the chain rule to differentiate...

this question is proving to be quite difficult..i havnt come accross one like it in my studies..
 
In fact, we can't use this formula, 1/(ax+b) = (1/a)ln(ax+b)+c in your question.

[inte]1/(ax+b)dx = (1/a)ln(ax+b)+c
In the above formula, a, b and c are constants.

For example
[inte] 1/(3x+5) dx = 1/3 ln(3x+5) + C
Please keep in mind that a and b must be constants in order to apply this formula.

However in your question : [inte]1/(1+ex)dx
ex isn't a constant and x is the variable, that's why we can't use the forumla.

Up to now, can you follow?

the rule for differentiating that is

a ln f(x) = (a * f'(x))/(f(x))

so from my
(1/e^x)ln(1+e^x)+c

((e^x)/(e^x))/(1+e^x)
= 1/(1+e^x) which is our original function.
This is not correct. Mathematics tells us we need to use chain rule to do the above differentiation.

Do you know chain rule? Please read my first post again to see if you understand what I've posted. Also, I've posted a standard way to do [inte]1/(1+ex)dx, see if you understand.

In order to do your question, we need to know what ex is and how to differentiate it, chain rule, partial fraction and method of substitution.

By the way, be careful when you are using formulae. You must know what the symbols in the formula mean.

we dont need to use the chain rule to differentiate...
this question is proving to be quite difficult..i havnt come accross one like it in my studies..
Is this question in your textbook or are you teaching yourself calculus? I've studied calculus for 3 years and I learnt it only a few months ago. (But I'm sure what I've posted here is correct)
 

Tom Mattson

Staff Emeritus
Science Advisor
Gold Member
5,475
20
Re: Integration

Originally posted by Cummings
need to integrate 1/(1+e^x)

by using th rule 1/(ax+b) = (1/a)ln(ax+b)+c
You can't use that rule. ex+1 is not a linear function.

i got (1/e^x)ln(1+e^x)+c

that is correct is it not?
because if i now differentiate that, i get 1/(1+e^x)..which is what we start with.
No, you don't get what you started with.

Watch:

y=e-xln(1+ex)
dy/dx=-e-xln(1+ex)+e-x*ex/(1+ex)
dy/dx=-e-xln(1+ex)+1/(1+ex)

That's not what you started with.

Here's what I would do.

∫1/(1+ex)dx

let u=ex+1-->x=ln(u-1)
so du=exdx=eln(u-1)dx=(u-1)dx
or du/(u-1)=dx

Put it in the integral:

∫du/u(u-1)

Solve by partial fractions. Give that a shot and see what you come up with.

edit: fixed integral signs

another edit: FYI, I just worked it out, and got the right answer.
 
Last edited:
52
0
i use the chain rule when we have a function like this

6x(3x+5)^6

where i would get 6 * 3 * 6x * (3x+5)^5
= 108x(3x+5)^5
i dont see how it applies to (1/e^x)ln(1+e^x)+c

to differentiate a logaritmhic function i was told to use the rule
aln(f(x)) = (a * f'(x))/f(x)
if the funtion inside the logarithm was to the power of something..then i would use the chainrule.

i can see that (ax+b) is different to (1+e^x) but i was working on the grounds that we just take the deriviative of the function in the brackets.

This is not a question i was given at school, it was a question a friend gave me and we have had quite a large discussion over what it the answer. I have never done and questions like this before...and am on holidays so i cant check with my teacher at school.

the closest i ever got to that type of question was -1/(e^2x) which = 1/(2e^2x)

which..when i think about it doesnt equal a logarithmic function :p

Well..its awfully hard to have it explained to you over the internet..and even harder since i never tackled one of these questions before.
 

Tom Mattson

Staff Emeritus
Science Advisor
Gold Member
5,475
20
Originally posted by Cummings
i use the chain rule when we have a function like this

6x(3x+5)^6

where i would get 6 * 3 * 6x * (3x+5)^5
= 108x(3x+5)^5
I used both the chain rule and the product rule.

i dont see how it applies to (1/e^x)ln(1+e^x)+c
You are taking the derivative of a product of functions:

f(x)=(e-x)*(ln(1+ex)

If you identify g(x)=e-x and h(x)=ln(1+ex), then you have f(x)=g(x)*h(x), which is a product of functions.

i can see that (ax+b) is different to (1+e^x) but i was working on the grounds that we just take the deriviative of the function in the brackets.
But why would you think that you can use the rule for the antiderivative of (ax+b)-1 to get the antiderivative of (1+ex)-1? They're clearly different.
 
250
1
Cummings

The easiest method to integrate I=[inte] 1/(1+e^x) dx is the substitution method.

Let ex=t --->

x=ln t

dx=(1/t)*dt

I=[inte] 1/(1+e^x) dx = [inte] [(1/(t+1)*(1/t)] dt

I=[inte] {(1/t)-[1/(t+1)]} dt

I=ln(t)-ln(t+1)=ln( ex)-ln( ex+1)

I=ln[ex/( ex+1)]+C

[edit to add] I've just observed that Tom has already solved this problem using a very similar substitution.Sorry...Anyway I have the confirmation that this type of integral sign [inte] works :-)...
 
Last edited:

Related Threads for: Integrate 1/(1+e^x)

  • Posted
Replies
3
Views
2K
  • Posted
Replies
4
Views
1K
  • Posted
Replies
2
Views
7K
  • Posted
Replies
1
Views
2K
  • Posted
Replies
1
Views
1K
Replies
3
Views
1K
  • Posted
Replies
3
Views
1K

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top