Alright, let's tackle this problem step by step. It's a bit involved, so I'll break it down into manageable parts.
Understanding the Problem
We have a function defined as:
[ f(x) = \frac{x^2 - a x}{e^x} ]
where ( a ) is a positive number.
For a real number ( t ), we define ( g(t) ) as the number of distinct real roots ( x ) of the equation:
[ f(x) = f'(t)(x - t) + f(t) ]
We're given two conditions:
- ( g(5) + \lim_{t \to 5} g(t) = 5 )
- There exists some ( k ) where ( \lim_{t \to k^-} g(t) \neq \lim_{t \to k^+} g(t) ), and the sum of all such ( k ) is ( \frac{q}{p} ) with ( p ) and ( q ) coprime. We need to find ( p + q ).
Step 1: Rewrite the Equation ( f(x) = f'(t)(x - t) + f(t) )
This looks like the equation of the tangent line to ( f ) at ( t ), but set equal to ( f(x) ). So, it's asking for the intersection points of ( f(x) ) with its tangent line at ( t ).
The equation can be rewritten as:
[ f(x) - f(t) - f'(t)(x - t) = 0 ]
This is the difference between ( f(x) ) and its linear approximation at ( t ), which is related to the Taylor expansion's remainder.
Step 2: Simplify the Equation
Let's compute ( f'(x) ):
[ f(x) = \frac{x^2 - a x}{e^x} ]
Using the quotient rule:
[ f'(x) = \frac{(2x - a)e^x - (x^2 - a x)e^x}{e^{2x}} = \frac{(2x - a - x^2 + a x)}{e^x} = \frac{-x^2 + (a + 2)x - a}{e^x} ]
Now, the equation becomes:
[ \frac{x^2 - a x}{e^x} - \frac{t^2 - a t}{e^t} - \frac{-t^2 + (a + 2)t - a}{e^t}(x - t) = 0 ]
This seems messy. Maybe there's a better approach.
Step 3: Alternative Approach - Tangent Line Intersection
The equation ( f(x) = f'(t)(x - t) + f(t) ) represents the points ( x ) where the tangent line at ( t ) intersects the curve ( f(x) ).
For a general function, the tangent line at ( t ) intersects the curve at ( x = t ) (with multiplicity at least 2 if ( t ) is a critical point), and possibly other points.
The number of distinct real roots ( g(t) ) is the number of distinct real solutions to this equation.
Step 4: Find ( g(t) )
Let's define ( h(x, t) = f(x) - [f'(t)(x - t) + f(t)] ). We need to find the number of distinct real roots of ( h(x, t) = 0 ) for fixed ( t ).
Notice that ( h(t, t) = f(t) - f(t) = 0 ), so ( x = t ) is always a root.
The other roots come from solving:
[ f(x) - f(t) - f'(t)(x - t) = 0 ]
This resembles the Taylor expansion's remainder. For a quadratic numerator, this might simplify.
Step 5: Compute ( h(x, t) )
Given ( f(x) = \frac{x^2 - a x}{e^x} ), and ( f'(x) = \frac{-x^2 + (a + 2)x - a}{e^x} ), let's compute ( h(x, t) ):
[ h(x, t) = \frac{x^2 - a x}{e^x} - \frac{t^2 - a t}{e^t} - \frac{-t^2 + (a + 2)t - a}{e^t}(x - t) ]
Factor out ( \frac{1}{e^x} ) from the first term and ( \frac{1}{e^t} ) from the others:
[ h(x, t) = \frac{x^2 - a x}{e^x} - \frac{(t^2 - a t) + (-t^2 + (a + 2)t - a)(x - t)}{e^t} ]
This seems complicated. Maybe multiply both sides by ( e^x e^t ) to eliminate denominators:
[ e^t (x^2 - a x) - e^x [ (t^2 - a t) + (-t^2 + (a + 2)t - a)(x - t) ] = 0 ]
This still looks messy. Perhaps expanding the second term:
[ (t^2 - a t) + (-t^2 + (a + 2)t - a)(x - t) ]
[ = t^2 - a t + (-t^2 + (a + 2)t - a)x + t^3 - (a + 2)t^2 + a t ]
[ = ( -t^2 + (a + 2)t - a )x + t^3 - (a + 2)t^2 + a t + t^2 - a t ]
[ = ( -t^2 + (a + 2)t - a )x + t^3 - (a + 1)t^2 ]
So the equation becomes:
[ e^t (x^2 - a x) - e^x [ (-t^2 + (a + 2)t - a)x + t^3 - (a + 1)t^2 ] = 0 ]
This seems too involved. Maybe there's a smarter way.
Step 6: Consider ( f(x) ) and Its Tangent Line
The equation ( f(x) = f'(t)(x - t) + f(t) ) is the intersection of ( y = f(x) ) with its tangent at ( t ).
For a general function, the tangent line can intersect the curve at multiple points. Here, since ( f(x) ) is a quadratic divided by an exponential, it's likely that the tangent line intersects the curve at ( x = t ) (with multiplicity at least 2) and possibly one other point.
Thus, ( g(t) ) is typically 2 (the root at ( x = t ) and one other), unless the tangent is tangent at another point, making ( g(t) = 1 ) (if it's a double root at ( t )), or if there's a triple intersection, which seems unlikely here.
But we need to find when the number of roots changes, i.e., when ( g(t) ) changes, which would be when the tangent line is tangent to ( f(x) ) at another point besides ( t ).
Step 7: Find When the Tangent Line is Tangent at Another Point
For the tangent at ( t ) to be tangent at another point ( s ), we'd have:
[ f(s) = f'(t)(s - t) + f(t) ]
[ f'(s) = f'(t) ]
So, solve ( f'(s) = f'(t) ):
[ \frac{-s^2 + (a + 2)s - a}{e^s} = \frac{-t^2 + (a + 2)t - a}{e^t} ]
[ (-s^2 + (a + 2)s - a) e^t = (-t^2 + (a + 2)t - a) e^s ]
This seems to imply that ( s ) and ( t ) satisfy:
[ \frac{-s^2 + (a + 2)s - a}{e^s} = \frac{-t^2 + (a + 2)t - a}{e^t} ]
So, ( f'(s) = f'(t) ), meaning ( s ) and ( t ) are points where the derivative takes the same value.
This can happen when ( s = t ) (trivial) or when ( s ) is another point with the same derivative value.
Step 8: Analyze ( f'(x) )
Let ( f'(x) = \frac{-x^2 + (a + 2)x - a}{e^x} ). The numerator is ( -x^2 + (a + 2)x - a ).
The equation ( f'(x) = c ) is equivalent to ( -x^2 + (a + 2)x - a = c e^x ).
For ( f'(s) = f'(t) ), ( c = f'(t) ), and we're looking for multiple solutions to ( f'(x) = c ).
The number of solutions to ( f'(x) = c ) depends on ( c ). The maximum of ( f'(x) ) occurs where the derivative of the numerator over denominator is zero, but simpler is to note that ( f'(x) ) tends to 0 as ( x \to \pm \infty ) (since ( e^x )