Q:

Where is the best place to build a castle

I have no idea where to put my castle Should a castle be at the Center of the capital, to the rear, on a plateau ect... from a military and economic perspective where should a castle be placed within a capital 

A:

The castle was there first.
Castles go on the most defensible terrain, usually meaning the high ground in the area. Everyone would live within the walls, and farmers would go out during the day to farm the surrounding fields, etc. and bring any food collected back inside for safety.
As the population grew over the centuries, cheaper structures would be built outside the walls to add housing, with folks living there only going inside to conduct business or when under siege. These outbuildings gradually became more permanent and eventually formed a city that surrounded the castle, with another wall around them in recognition that they won't all fit inside the castle anymore.
Depending on geography and topography, the city may have spread more in one direction than another. Depending on when your story is set and whether there has been a period of lasting peace, the city may have continued to expand beyond the city wall, with the area inside the wall referred to as the "Old City". You can see this all over Europe, though typically once this happens the old wall isn't maintained anymore and may have been removed to make travel easier, with only the castle remaining.

