In the CPR, Kant defines philosophy as "the science of the relation of all knowledge to the essential ends of human reason." What is meant here by 'essential ends'? This phrase recurs a few times but is never quite pinned down. Does it mean merely the goals of rational inquiry? If so, what are they? How does this differ from the ends of reason in the eyes of the rationalists, or the empiricists?
I can recommend a book, and this is a good one: Freedom and the End of Reason: on the moral foundation of Kant's Critical Philosophy, Richard L. Velkley. (1989 U. Chic.).
P.S. in fact your questions are so good either you have a born talent for philosophy (which is always possible) or this is a homework assignment, so I will leave it at the above suggested reading, which may satisfy the genius and student both.
An interesting question. Kant's definition of philosophy as "the science of the relation of all knowledge to the essential ends of human reason" raises some questions. For one, it would be natural to think that knowledge is the end (that is, the goal) of human reason, or at least one of its primary ends. But here Kant speaks as if the ends of human reason are beyond knowledge itself. What can they be?
I think that Kant's definition relates to his unique distinction between the cognitive faculties which he calls reason and understanding, a distinction which is one of the founding principles of the Critique of Pure Reason (CPR). Structurally, the understanding is discussed in the "analytic" part of CPR, which deals with what we can know. And reason is discussed in the "dialectic" part, which deals primarily with what we cannot know, but that we have an almost irresistible urge to believe that we can know.
So what are the ends of reason? Kant attributes to reason two interrelated ends. First, reason demands the completeness of knowledge, and cannot rest with merely partial accounts. Second, reason demands to know the unconditioned, the first principles and causes, and cannot rest with knowledge of principles and causes which need further explanation, further justification, etc.
The transcendental conception of reason is therefore nothing else than the conception of the totality of the conditions of a given conditioned. Now as the unconditioned alone renders possible totality of conditions, and, conversely, the totality of conditions is itself always unconditioned; a pure rational conception in general can be defined and explained by means of the conception of the unconditioned, in so far as it contains a basis for the synthesis of the conditioned. (CPR, "Of Transcendental Ideas.")
In the "dialectic" part of CPR, Kant tries to show how, on the theoretical side (as opposed to the practical side) reason's high hopes are doomed to be frustrated. Our attempts to know about God, about whether the world was created or not, and other big questions, could never be satisfied. On the positive side, reason can guide our researches in the domains that we can know, and reason can guide us in ethics, the practical domain. And it is reason itself that reflects on itself and is bound to get to those conclusions.
So when Kant defines philosophy as "the science of the relation of all knowledge to the essential ends of human reason" he alludes, I think, to the above mentioned two ends of human reason: completeness of knowledge, and knowledge of the unconditioned. It is these two aims, their fulfillments and their frustrations that, according to Kant, it is up to philosophy to investigate.