Question
Quantitative Aptitude Question on Functions
Suppose for all integers x, there are two functions f and g such that f(x)+f(x−1)−1=0 and g(x)=x2. If f(x2−x)=5,then the value of the sum f(g(5))+g(f(5)) is
Answer
Given:
- f(x)+f(x−1)=1
- f(x2−x)=5
- g(x)=x2
By substituting x=1 into equations (1) and (2), we get:
f(0)=5
f(1)+f(0)=1 f(1)=1−5=−4
Next, substituting x=2 into equation (1):
f(2)+f(1)=1\f(2)=1+4=5
We observe that:
- f(n)=5 if n is even
- f(n)=−4 if n is odd
Finally, we find:
f(g(5))+g(f(5))=f(25)+g(−4)
Since 25 is odd, f(25)=−4
And,
g(−4)=(−4)2=16
So,
f(g(5))+g(f(5))=−4+16=12