Given: f(x)=x2+g′(1)x+g′′(2) and g(x)=f(1)x2+xf′(x)+f′′(x).
Let a=g′(1) and b=g′′(2). Then f(x)=x2+ax+b.
Computing f values:
f(1)=1+a+b, f′(x)=2x+a, f′′(x)=2
Substituting into g:
g(x)=(1+a+b)x2+x(2x+a)+2=(3+a+b)x2+ax+2
Computing g values:
g′(x)=2(3+a+b)x+a, so g′(1)=2(3+a+b)+a=6+3a+2b
g′′(x)=2(3+a+b), so g′′(2)=2(3+a+b)
Solving the equations:
From g′(1)=a: 6+3a+2b=a⇒2a+2b=−6⇒a+b=−3 ... (1)
From g′′(2)=b: b=2(3+a+b)=2(3−3)=0 (using (1))
So b=0 and a=−3.
f(x)=x2−3x, g(x)=(3−3+0)x2+(−3)x+2=−3x+2
Final computation:
f(4)=16−12=4
g(4)=−12+2=−10
f(4)−g(4)=4−(−10)=14
Therefore, f(4)−g(4)=14.