WHEN Waldemar Horwat emigrated from Poland to the United States in 1979, he didn't speak any English. He was bored. ``I had very little to do,'' he recalls. So, along with English, Waldemar taught himself a new language -- calculus. That might not be so remarkable -- except he was in the sixth grade at the time. ``I found a calculus book,'' he says, ``and got my father to explain derivatives and integrals. It wasn't easy. But once I got past the definitions, I could see what was going on.''

Indeed he could. That is one reason young Horwat -- today a high school senior -- is one of this year's six American contenders at the 1985 International Mathematical Olympiad (IMO), which takes place in Helsinki this week and next. The Olympiad is an annual competition, in which the most talented pre-college math students from 30 countries compete head to head over six brutally tough math problems -- from trigonometry to differential equations.

Until last week, Horwat had been one of 24 American candidates -- winnowed from 380,000 nationwide -- who were ``in training'' here at West Point. The final six team members came out on top from of a three-week, seven-hour-a-day math workout no less grueling than the one for the Olympics Games.

``These six are the best we could find,'' says American coach Cecil Rousseau, a mathematics professor at Memphis State University. Along with Horwat -- naturalized only days ago -- this year's team includes mathematical Wunderkind Jeremy Kahn, who, although only 16, is competing in his third IMO.

As in the regular Olympics, the perennial IMO powerhouses are the East-bloc countries -- the Soviet Union, Hungary, Bulgaria, East Germany. American coaches say the East bloc dominates the Olympics in math for the same reason it does in sports: East-bloc children are selected at an early age, placed in special schools, and given intensive training. Most Western countries, including the United States, do not have a comparable program and rely on students who delve into math on their own.

In fact, US math students had such a poor reputation among other countries that when they entered the IMO for the first time in 1974 many people thought they would finish last. But ``We surprised everybody,'' Mr. Rousseau says, ``by finishing second to the Russians.'' Since that time, the US has finished in the top five each year, and in first place in 1981. Greg Patruno, a team member in '81 and assistant coach this year, says the 1985 team is the strongest in three years.

Math competitions originated in Hungary at the turn of the century and are still so popular that Hungarians televise them. The country itself has an exceptional history of great mathematicians.

What is now the IMO was started in the East bloc in 1959. Finland joined in 1965, Britain, Italy, and France in '67. Japan and China do not participate -- for political reasons, the American coaches intimate. Yet one Asian country that consistently finishes in the top 10 is Vietnam. This is because of the Russian-style schooling, Mr. Patruno says, which includes heavy doses of geometry, a particularly weak subject in the West.

For this reason, geometry is the central focus during the West Point training session. East-bloc students take geometry every year for 10 years, while Americans encounter it for ``maybe a year,'' says Patruno, adding with a smile: ``In three weeks here, we try to make up for that.''

American strengths are in the field of functional equations, which appeal to the independent-minded student who loves to solve puzzles. A functional-equation problem is, conceptually, something akin to shining a flashlight on a few select objects in a darkened room and then, from those clues, being asked to describe the room in detail.

Americans also do well in combinatorics, a rapidly growing field of math particularly useful in computer science. A simple example might be to find how many combinations of three people there are in a room of 12 people. IMO combinatorics problems are a bit harder. Try this year's IMO qualifier:

``Prove that in any party attended by n persons, there are two people for which at least [n/2] minus 1 of the remaining n minus 2 persons attending the party know both or else neither of the two. Assume that `knowing' is a symmetric relation.''

Rousseau says that to be part of an IMO team a student must have a solid background in all the basic theorems and techniques -- but that that alone ``is not nearly enough.'' The student must be highly inventive. A typical IMO problem does not have a standard, logically deducible answer. Often ``a trick'' is involved, he says, and the solution requires a creative King Solomon-like approach. Rousseau claims, in fact, that most professional mathematicians would be ``absolutely stumped'' by a typical IMO problem -- not because they don't know enough math, but because they don't have the ability ``to look at one problem after another and consistently see right through it, right to the heart of the difficulty.'' If you don't see the point that unlocks the problem, he says, you can storm the castle all day and never get in.

The team members each have different approaches to solving problems. David Grabiner, a second-year member from Claremont, Calif., says, ``I'm good at attacking one problem at a time head on and systematically solving it.''

Bjorn Poonan of Winchester, Mass., says he rarely does one problem at a time but skips around. ``An approach to one problem often gives me an idea for solving another.''

The tenor, cast, and outcome of the Olympiad are largely dependent on the six problems decided upon during the first few days of the competition. As Grabiner says, ``If they choose impossible geometry problems, the Russians will win; if impossible combinatorics, we might win.''

Before arriving, each country submits five problems. The host country narrows the total to 20. Then the debating and politicking begin over which problems are appropriate. This often turns into a poker game, says Patruno. The Bulgarian coach, for example, might object that a certain problem is too similar to one they had in training. ``That makes you wonder,'' Patruno says. The actual competition lasts only two days (yesterday and today). Judging comes next week. Each day, students are given 41/2 hours to solve three problems. Each problem counts 7 points, with the possibility of extra points for especially creative solutions. Simply finding the right answer doesn't count for much at the IMO. ``The grading is based on ingenuity and presentation,'' says Rousseau. Most answers run from three to five pages. To get a 7, he says, the solution must be complete: initial propositions and setting well established, symbols thoroughly defined, the logic and sequence of ideas spelled out clearly, and the right answer given.

Last year, out of a possible 252 points, the United States scored 195. It tied for fourth place with Hungary.

Along with Horwat, Kahn, Poonan, and Grabiner, this year's team includes Joseph Keane of Pittsburgh and David Moews of Willimantic, Conn.

Some of the team members will go on to study math in college; some say it is just a hobby. David Grabiner says there is no particular reason he likes math other than for the enjoyment of solving problems. ``I love being able to say, `Eureka! Three doesn't equal 2 -- I've got a solution!' ''

One American to watch this year, according to coach Rousseau, is Bjorn Poonan. ``He solves problems that others don't,'' Rousseau says. ``His solutions are clear, a pleasure to read, and have excellent insight.''

Poonan himself is proof that it's possible for a public school student to make it to the top. Until last year, in fact, he had never taken a calculus course. Math had always interested him, though. At an early age he developed shortcuts to solving his homework problems.

In line with his public school background, Poonan takes a decidedly non-elitist attitude about being a math whiz. He feels there must be ``lots of people out there who could be tons better in math than I am, but the subject slipped by them -- they never got a chance to really study it.''