At noon each Wednesday, the Interflug plane from Beirut lands at East Germany's Schoenefeld Airport, carrying more Palestinians en route to a new haven of exile. They head directly for Checkpoint Charlie or climb aboard the S-Bahn's rickety railway cars for a journey past antitank traps, mine fields and a concrete barrier topped with glass shards to reach this 186-square-mile isle of refuge.

For about 4,000 Palestinians who have come to seek asylum here, West Berlin still serves as a shining beacon of freedom. It is a sentiment shared by other migrants who came here earlier to escape what they considered to be prejudice and tyranny and to renew their lives in a western enclave 110 miles inside East Germany.

But years of economic decline have begun to tarnish the city that novelist Guenter Grass says most closely embodies the realities of our age. More than just a cockpit of East-West tensions, West Berlin today has become a microcosm of the social ills and aspirations sweeping through West Germany.

The broad boulevards and opulent shops camouflage a fragile economy that relies on federal aid for more than half the city budget. Drug abuse, violent political protest and clashes between German and Turkish migrant communities have become common in recent years.

The generation gap has worsened as middle-class, middle-aged groups departed for better jobs and a more stable social scene elsewhere in West Germany. Meanwhile, the city has become saturated with old-age pensioners, who now make up one-quarter of West Berlin's 2 million inhabitants.

Young people have continued to stream into the city, attracted by the rich variety of counterculture life styles and exemption from military service. While authorities have taken steps to halt the influx of foreign workers, about 250,000 migrants, mostly Turks, Pakistanis and Sri Lankans, remain in West Berlin. They often perform menial tasks such as street-sweeping and garbage collecting that most Germans refuse to do.

Ironically, West Berlin's decline can be traced to the four-power agreement of 1971, described by some as the linchpin of detente, which formalized Berlin's status and defused its crisis-ridden status as an East-West flashpoint.

"Suddenly, West Berlin was no longer seen as a problem, or a place that required constant support and vigilance," said Friedbert Pflueger, an aide to Mayor Richard von Weizsaecker. "The economy was neglected, and the East's plan to patiently wear down West Berlin seemed to be coming true."

If complacency during the heyday of detente contributed to the erosion of West Berlin's vitality, the twin jolts of Poland and Afghanistan that heightened tensions between the superpowers coincided with a new awareness of the city's vulnerability.

Afraid that Solidarity's crusade in Poland and too much exposure to the West could inspire rebellious notions in its population, East German leaders decided in October 1980 to raise transit costs between West and East Berlin.

Travelers were required to exchange 25 marks (about $11) per day to go to the East, a prohibitive burden for many Berlin families and elderly pensioners who made frequent crossings to see relatives on the other side. As a result, border traffic was cut in half, and West Berlin residents felt more isolated than ever.

A few months later, West Berlin's perennial housing crisis erupted into violent confrontation between squatters and police. Protesting real estate speculators, whom they accused of preferring to keep apartments empty as prices rose, many youths challenged the city by occupying more than 160 vacant houses and resisting efforts to evict them.

The growing sense of weary isolation and the housing controversy helped to topple the Social Democrats two years ago from city government, which they had dominated for more than two decades, and ushered in a Christian Democratic team led by von Weizsaecker that vowed to restore economic health by turning West Berlin into a German version of "Silicon Valley."

Like elsewhere in West Germany, Berlin's economic structure is antiquated and based on mass production. With robots taking over many assembly line tasks and highly technical jobs becoming concentrated in Bavaria, von Weizsaecker estimated that unless radical reforms were undertaken, West Berlin's economy stood little chance of surviving this century.

Most analysts concur that if business confidence can be revived, West Berlin's reservoir of intellectual resources could propel the city to the forefront of the computer revolution.

West Berlin's two major employers, Siemens and AEG-Telefunken, are seeking to revamp their companies for future growth. With its elite universities training 90,000 students and more than 200 scientific institutes now carrying out 11 percent of the country's research programs, West Berlin is considered to possess the strongest potential among German cities to adapt to the microelectronics age.

Von Weizsaecker has pushed through a new series of tax incentives that allow companies to write off major investments; they also will receive subsidies to compensate for the extra costs required to ship their products to western markets.

But even if prospects for economic recovery brighten, the more difficult challenge for West Berlin's future may be in building an enduring social order for the city's restless youth population and resentful foreign workers.

As a magnet for German youth, West Berlin acts as a crucible for social experiments and radical movements. The vast array of subcultures and life styles have gained political clout, with the so-called "alternative list" now represented in the Berlin Senate.

The alternatives, who are aligned with the antinuclear Greens Party in the federal parliament, divide themselves into the "Mollies" (for molotov cocktail) and the "Mueslis" (for a kind of granola cereal).

West Berlin's several-thousand-strong Mollies feel strong kinship with past German radical left-wing groups that used violence against the state. They are generally opposed to the U.S. military presence and turned out in force to demonstrate angrily against President Reagan's visit to West Germany last year. They also advocate blocking deployment of Pershing II missiles in West Germany later this year by any means necessary.

The Mueslis, on the other hand, derive from some of the more enlightened segments of West Germany's flower child community. They successfully have sought senate funding to aid self-help groups for the handicapped and for drug addicts. They even claim that their decentralized, communal ideas find a favorable reception among liberal Social Democrats who generally have supported state socialized programs.

They, too, are opposed to missile deployment but admit they are not prepared to violate the will of the majority on military matters. A recent poll showed that 90 percent of West Berliners believe that a continued U.S. military presence is vital for their city--clearly reflecting fears of omnipresent pressure from the East Bloc.

Besides taming the city's burgeoning youth community, von Weiszaecker's other social test lies in managing a better integration of the 130,000 Turkish migrants and their families.

On a recent tour of Turkish villages to encourage a better dialogue between Ankara and West Berlin, the mayor stressed that those Turks now living in West Berlin would not be forced to leave but that peaceful harmony could only be achieved if the number of Turks there did not rise above current levels.

At the same time, von Weizsaecker has pleaded for integration of the Turks in Berlin.

"We want them to become Berliners," he often says, "and not create new ghettos within a city that is already divided."

A cheeky sense of wit and wry ability to cope with postwar circumstances is evident in the way Berliners make their hemmed-in lives and the monstrous "wall" constant sources of ridicule.

Not far from where two East Germans recently glided to freedom by shooting a cable wire across two buildings and sliding to safety in the West, a splash of graffiti on the wall says, "Warning: East German high-jump training area."