Calculating Constants in indefinite integral with 2 values for f.

tainted
Messages
28
Reaction score
0

Homework Statement



Find the function f(x) such that f''(x) = \frac{1}{x^2}, f(1) = 0 and f(e) = 0

Homework Equations


\int f''(x)\,dx = f'(x) + c
\int f'(x)\,dx = f(x) + cx + C

The Attempt at a Solution


f''(x)= \frac{1}{x^2}
f'(x)= \int \frac{1}{x^2}\,dx = \frac{-1}{x} + c
f(x) = -\int \frac{1}{x} + c\,dx = -ln(x) + cx + C

My problem is that I can get the constants to satisfy one of those requirements in the original problem, but I am having trouble getting it to satisfy both.

Thanks in advance
 
Last edited:
Physics news on Phys.org
Show some work? Might be able to find the issue. With only two data points and two constants, there shouldn't be any big issue setting both.
 
That is my work. That's what I've had for over an hour /facepalm
I've tried guessing some constants, but nothing has worked. I don't know how to get the constants to fit both those statements
f(1) = 0 and f(e) = 0
 
All right then. What are f(1),f(e) in terms of these constants?
 
I really have no clue. In terms of what constants? I haven't seen anything like this problem before. I have seen plenty where f'(e)=0 and f(1) = 0or the likes, but I haven't seen them where both value were just for f
 
Last edited:
itex, not itext.

In terms of the constants c, C. You wrote f(x) in the first post. Even though you don't know the values of c,C, you should be able to evaluate the function and get an expression in terms of these constants at x=1,e.
 
Alright thanks. I think that got me going in the right direction.

f(x) = -ln(x) + cx + C
f(1) =-ln(1) + 1*c + C = 0
f(e) = -ln(e) + e*c + C = 0
-ln(1) + 1*c + C = -ln(e) + e*c + C
-0 + c + C = -1 + e*c + C
-0 + c + C = -1 + e*c + C
c = e*c - 1
c + 1 = e*c
1 = e*c - c
1 = c(e-1)
\frac{1}{e-1} = cDoes that look correct on evaluating for c ?
 
Last edited:
Yeah, I think that's correct. You should be able to substitute in and find C at this point. In general, as you can see, if you have an Nth order differential equation, you only need N pieces of information in order to determine all the integration constants. They can be values of derivatives or values of the function itself at any arbitrary points.
 
Using that value for c, I did the following.

f(x) = -ln(x) + \frac{1}{e-1} * x + C
f(x) = -ln(x) + \frac{x}{e-1} + C
f(1) = -ln(1) + \frac{1}{e-1} + C = 0
f(1) = -0 + \frac{1}{e-1} + C = 0
C = \frac{-1}{e-1}

That would make my final answer

f(x) = -ln(x) + \frac{x}{e-1} - \frac{1}{e-1}

I tested it, and it appeared to work

Thanks a lot man. At first I was trying to figure out what you meant, but once I did, I was able to get it. I hadn't realized that you could have only 2 values of the function to determine both the constants
Thank you
 
  • #10
Yeah, you just end up with two equations, two unknowns in a linear system. It's a piece of cake once you've seen it once or twice. Just making the leap to getting there is the only hard part.
 
Back
Top