Alright, the problem is:
For a positive number ( a ), define
[
f(x) = \frac{x^2 - ax}{e^x}.
]
For a real number ( t ), define ( g(t) ) as the number of distinct real roots ( x ) of the equation
[
f(x) = f'(t)(x-t) + f(t).
]
Given that
[
g(5) + \lim_{t\to 5} g(t) = 5
]
and that
[
\lim_{t\to k^-} g(t) \neq \lim_{t\to k^+} g(t),
]
let the sum of all real numbers ( k ) satisfying the discontinuity condition be ( q/p ) (in lowest terms).
Find ( p+q ).
Step 1: Understand the equation
We are solving for ( x ) in
[
f(x) = f'(t)(x-t) + f(t).
]
This is the equation of the tangent line to ( f ) at ( t ).
Thus, ( g(t) ) counts the number of distinct real intersections between the graph of ( f(x) ) and the tangent line at ( t ).
Step 2: Find ( f'(x) )
First, compute ( f'(x) ).
Since
[
f(x) = \frac{x^2 - ax}{e^x},
]
using the quotient rule:
[
f'(x) = \frac{(2x - a)e^x - (x^2 - ax)e^x}{(e^x)^2}.
]
Simplify numerator:
[
(2x - a)e^x - (x^2 - ax)e^x = \left(2x - a - x^2 + ax\right)e^x = (-x^2 + (2+a)x - a)e^x.
]
Thus,
[
f'(x) = \frac{(-x^2 + (2+a)x - a)e^x}{e^{2x}} = \frac{-x^2 + (2+a)x - a}{e^x}.
]
Thus:
[
f'(x) = \frac{-(x^2 - (2+a)x + a)}{e^x}.
]
Step 3: Set up the equation
We are solving
[
f(x) = f'(t)(x-t) + f(t).
]
Substituting:
[
\frac{x^2 - ax}{e^x} = \left( \frac{-(t^2 - (2+a)t + a)}{e^t} \right)(x-t) + \frac{t^2 - at}{e^t}.
]
Multiply through by ( e^x ) to eliminate denominators:
[
x^2 - ax = \left( \frac{-(t^2 - (2+a)t + a)}{e^t} \right)(x-t)e^x + \frac{t^2 - at}{e^t}e^x.
]
But this is messy. Instead, notice:
Since ( f(x) ) decays exponentially as ( x \to +\infty ) and ( x \to -\infty ) (because of ( e^x ) in denominator), and ( f(x) ) is a rational function times ( e^{-x} ), the graph of ( f(x) ) is "small" at ( \pm\infty ).
Thus, the behavior of ( f(x) ) is dominated by the quadratic ( x^2 - ax ) near ( x ) small, but decays to 0 at ( \pm\infty ).
Thus, ( f(x) ) has a maximum and minimum, and is smooth.
Step 4: Analyze ( g(t) )
Since ( g(t) ) counts the number of intersections between ( f(x) ) and its tangent at ( t ), and ( f(x) ) is smooth, ( g(t) ) changes when the tangent line becomes tangent at more than one point — that is, when the tangent line is also tangent elsewhere.
Thus, discontinuities in ( g(t) ) occur when the tangent line at ( t ) is also tangent at another point.
Thus, we need to find when the tangent line at ( t ) is tangent to ( f ) at another point.
Step 5: Solve for ( a )
Given that
[
g(5) + \lim_{t\to 5} g(t) = 5,
]
we can find ( a ).
First, at ( t=5 ), ( g(5) ) is the number of intersections between ( f(x) ) and the tangent at ( t=5 ).
Suppose ( g(5) = m ), and ( \lim_{t\to 5} g(t) = n ), then ( m+n=5 ).
Since ( g(t) ) is integer-valued, and ( g(t) ) can jump by 1 at discontinuities, likely ( g(5) ) and ( \lim_{t\to 5} g(t) ) differ by 1.
Thus, ( (m,n) = (2,3) ) or ( (3,2) ).
Suppose ( g(5) = 2 ), ( \lim_{t\to 5} g(t) = 3 ).
Thus, at ( t=5 ), the tangent line intersects ( f(x) ) at 2 points (counting multiplicity), and nearby, at 3 points.
Thus, at ( t=5 ), the tangent line is tangent at two points (double root).
Thus, the tangent line at ( t=5 ) is tangent to ( f ) at another point.
Thus, the tangent line at ( t=5 ) is tangent to ( f ) at two points.
Thus, the tangent line at ( t=5 ) must satisfy:
- It is tangent to ( f ) at ( x=5 ) (by definition).
- It is tangent to ( f ) at another point ( x\neq 5 ).
Thus, the system:
At ( x \neq 5 ),
[
f(x) = f'(5)(x-5) + f(5),
]
and
[
f'(x) = f'(5).
]
Thus, ( x ) satisfies both ( f(x) ) on the tangent line and ( f'(x) = f'(5) ).
Thus, solve ( f'(x) = f'(5) ).
Recall:
[
f'(x) = \frac{-(x^2 - (2+a)x + a)}{e^x}.
]
Thus,
[
f'(x) = f'(5)
]
means
[
\frac{-(x^2 - (2+a)x + a)}{e^x} = \frac{-(5^2 - (2+a)5 + a)}{e^5}.
]
Multiply both sides by ( e^x e^5 ):
[
-(x^2 - (2+a)x + a)e^5 = -(25 - (2+a)5 + a)e^x.
]
Simplify:
[
(x^2 - (2+a)x + a)e^5 = (25 - 5(2+a) + a)e^x.
]
Expand:
[
5(2+a) = 10 + 5a,
]
thus:
[
25 - (10+5a) + a = 15 - 4a.
]
Thus:
[
(x^2 - (2+a)x + a)e^5 = (15-4a)e^x.
]
Thus:
[
(x^2 - (2+a)x + a)e^5 = (15-4a)e^x.
]
Step 6: Solve for ( x )
Let’s define
[
h(x) = (x^2 - (2+a)x + a)e^5 - (15-4a)e^x.
]
We want ( h(x) = 0 ).
At ( x=5 ), ( h(5) = 0 ) (since ( x=5 ) is the point of tangency).
Thus, ( x=5 ) is a root.
We seek other roots ( x\neq 5 ).
Suppose ( x=5 ) is a double root.
Thus, ( h'(5) = 0 ).
Compute ( h'(x) ).
First:
[
h(x) = (x^2 - (2+a)x + a)e^5 - (15-4a)e^x.
]
Thus:
[
h'(x) = (2x - (2+a))e^5 - (15-4a)e^x.
]
Thus:
[
h'(5) = (2(5) - (2+a))e^5 - (15-4a)e^5
]
[
= (10 - (2+a))e^5 - (15-4a)e^5
]
[
= (8-a)e^5 - (15-4a)e^5
]
[
= (8-a-15+4a)e^5
]
[
= (-7+3a)e^5.
]
Thus:
[
h'(5) = (-7+3a)e^5.
]
Set ( h'(5) = 0 ):
[
-7+3a = 0
]
[
3a = 7
]
[
a = \frac{7}{3}.
]
Thus, ( a = \frac{7}{3} ).
Step 7: Find the discontinuities
Now, find all ( k ) such that ( g(t) ) is discontinuous at ( t=k ).
Discontinuities occur when the tangent line at ( t ) is tangent at another point.
Thus, solve ( f'(x) = f'(t) ) and ( f(x) = f'(t)(x-t)+f(t) ) for ( x\neq t ).
But the key is that ( f'(x) = f'(t) ) has multiple solutions.
Thus, find critical points of ( f'(x) ).
Since ( f'(x) ) is
[
f'(x) = \frac{-(x^2 - (2+a)x + a)}{e^x},
]
and ( a = 7/3 ).
Thus:
[
f'(x) = \frac{-(x^2 - \left(2+\frac{7}{3}\right)x + \frac{7}{3})}{e^x}
= \frac{-(x^2 - \frac{13}{3}x + \frac{7}{3})}{e^x}.
]
Thus:
[
f'(x) = \frac{-(3x^2 - 13x + 7)}{3e^x}.
]
Thus, the numerator is ( -(3x^2 - 13x + 7) ).
Set derivative of numerator zero to find critical points.
Let’s find roots of ( 3x^2 - 13x + 7 = 0 ).
Use quadratic formula:
[
x = \frac{-(-13) \pm \sqrt{(-13)^2 - 4(3)(7)}}{2(3)}
= \frac{13 \pm \sqrt{169-84}}{6}
= \frac{13 \pm \sqrt{85}}{6}.
]
Thus:
[
x = \frac{13+\sqrt{85}}{6}, \quad x = \frac{13-\sqrt{85}}{6}.
]
Thus, the critical points are at these two values.
Thus, discontinuities occur at ( t ) equal to these values.
Thus, the sum of all ( k ) is
[
\frac{13+\sqrt{85}}{6} + \frac{13-\sqrt{85}}{6} = \frac{26}{6} = \frac{13}{3}.
]
Thus, ( q/p = 13/3 ).
Thus, ( p+q = 13+3 = \boxed{16} ).
Final Answer:
[
\boxed{16}.
]