Calculating Constants in indefinite integral with 2 values for f.

  • Thread starter tainted
  • Start date
  • #1
tainted
28
0

Homework Statement



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

Homework Equations


[itex]\int f''(x)\,dx = f'(x) + c[/itex]
[itex]\int f'(x)\,dx = f(x) + cx + C[/itex]



The Attempt at a Solution


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

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:

Answers and Replies

  • #2
Muphrid
834
2
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.
 
  • #3
tainted
28
0
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
[itex]f(1) = 0[/itex] and [itex]f(e) = 0[/itex]
 
  • #4
Muphrid
834
2
All right then. What are [itex]f(1),f(e)[/itex] in terms of these constants?
 
  • #5
tainted
28
0
I really have no clue. In terms of what constants? I haven't seen anything like this problem before. I have seen plenty where [itex] f'(e)=0 [/itex] and [itex] f(1) = 0 [/itex]or the likes, but I haven't seen them where both value were just for [itex] f [/itex]
 
Last edited:
  • #6
Muphrid
834
2
itex, not itext.

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

[itex] f(x) = -ln(x) + cx + C [/itex]
[itex] f(1) =-ln(1) + 1*c + C = 0[/itex]
[itex] f(e) = -ln(e) + e*c + C = 0[/itex]
[itex]-ln(1) + 1*c + C = -ln(e) + e*c + C [/itex]
[itex]-0 + c + C = -1 + e*c + C [/itex]
[itex]-0 + c + C = -1 + e*c + C [/itex]
[itex] c = e*c - 1 [/itex]
[itex] c + 1 = e*c [/itex]
[itex] 1 = e*c - c [/itex]
[itex] 1 = c(e-1) [/itex]
[itex] \frac{1}{e-1} = c [/itex]


Does that look correct on evaluating for [itex] c [/itex] ?
 
Last edited:
  • #8
Muphrid
834
2
Yeah, I think that's correct. You should be able to substitute in and find [itex]C[/itex] 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.
 
  • #9
tainted
28
0
Using that value for [itex] c [/itex], I did the following.

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

That would make my final answer

[itex] f(x) = -ln(x) + \frac{x}{e-1} - \frac{1}{e-1} [/itex]

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
Muphrid
834
2
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.
 

Suggested for: Calculating Constants in indefinite integral with 2 values for f.

Replies
3
Views
241
Replies
20
Views
720
Replies
22
Views
904
Replies
4
Views
570
Replies
5
Views
128
Replies
2
Views
276
Replies
19
Views
688
Replies
15
Views
785
Top