why do we need the pressure at the exit of nozzle to be equal to that of the outside pressure?
Not something that I'm terribly familiar with, but you don't need it to be so. If I understand the question correctly, having the exhaust exit at ambient pressure means that the motor is operating at peak efficiency. All of the overpressure has been expended within the rocket in order to push it forward. If the exhaust is at higher than ambient pressure, it means that some of that excess pressure is being wasted.
Best wait for Fred or someone to weigh in, because I'm not sure that I answered properly.
Like Danger mentioned, the equal pressure is the optimum condition for the nozzle. However, it doesn't last since atmospheric pressure changes with altitude but the nozzle geometry does not change. So the designers have to choose where they want the nozzle to operate at it's max efficiency, either low or high altitudes.
This page does a nice job of explaining things.
So, Fred, now that the subject has arisen... just how effective is the linear aerospike? Has one ever flown other than bolted onto an SR-71? It looks like a superb idea.
Great link, by the bye.
It hasn't flown to my knowledge.
Keeping to my quesion, one more doubt has arisen. First of all i understand what you wanted to convey. But the problem is if we design it to work by giving output at lower than atmospheric pressure to work at higher altitudes, then how would it be possible for it to work at the sea level. Won't the external gases flow into the nozzle?
The P*A part of thrust is only one part of the thrust equation. You will still have the majority of the thrust coming from the mass flow. Reference the following:
Separate names with a comma.