Anders Johan Lexell (24 December 1740 – ) was a Finnish-Swedish astronomer, mathematician, and physicist who spent most of his life in Imperial Russia, where he was known as Andrei Ivanovich Leksel (Андрей Иванович Лексель).

Lexell made important discoveries in polygonometry and celestial mechanics; the latter led to a comet named in his honour. La Grande Encyclopédie states that he was the prominent mathematician of his time who contributed to spherical trigonometry with new and interesting solutions, which he took as a basis for his research of comet and planet motion. His name was given to a theorem of spherical triangles.

Lexell was one of the most prolific members of the Russian Academy of Sciences at that time, having published 66 papers in 16 years of his work there. A statement attributed to Leonhard Euler expresses high approval of Lexell's works: "Besides Lexell, such a paper could only be written by D'Alambert or me". Daniel Bernoulli also praised his work, writing in a letter to Johann Euler "I like Lexell's works, they are profound and interesting, and the value of them is increased even more because of his modesty, which adorns great men".

Lexell was the first Finnish-born researcher to make a significant international contribution to mathematics and astronomy. At the age of fourteen he enrolled at the Royal Academy of Åbo and in 1760 received his Doctor of Philosophy degree with a dissertation Aphorismi mathematico-physici (academic advisor Jakob Gadolin). In 1763 Lexell moved to Uppsala and worked at Uppsala University as a mathematics lecturer. From 1766 he was a professor of mathematics at the Uppsala Nautical School.

St. Petersburg

In 1762, Catherine the Great ascended to the Russian throne and started the politics of enlightened absolutism. She was aware of the importance of science and ordered to offer Leonhard Euler to "state his conditions, as soon as he moves to St. Petersburg without delay". Soon after his return to Russia, Euler suggested that the director of the Russian Academy of Science should invite Lexell to study mathematics and its application to astronomy, especially spherical geometry. The invitation by Euler and the preparations that were made at that time to observe the 1769 transit of Venus from eight locations in the vast Russian Empire made Lexell seek the opportunity to become a member of the St. Petersburg scientific community.

To be admitted to the Russian Academy of Sciences, Lexell in 1768 wrote a paper on integral calculus called "Methodus integrandi nonnulis aequationum exemplis illustrata". The president of the Academy initially suspected that the manuscript might belong to some other talented mathematician whom Lexell had merely assisted, but Euler dismissed this, remarking that Lexell could hardly have assisted any other mathematician in the world except d'Alembert or Euler himself.

Lexell departed St. Petersburg in late July 1780 on a sailing ship and via Swinemünde arrived in Berlin, where he stayed for a month and travelled to Potsdam, seeking in vain for an audience with King Frederick II. In September he left for Bavaria, visiting Leipzig, Göttingen, and Mannheim. In October he traveled to Straßbourg and then to Paris, which proved to be the most important stop of his journey. He spent five months there, actively participating in the work of the Paris Royal Academy of Sciences and meeting the leading French mathematicians of the day.

Last years

Lexell became very attached to Leonhard Euler, who lost his sight in his last years but continued working using his elder son Johann Euler to read for him. Lexell helped Leonhard Euler greatly, especially in applying mathematics to physics and astronomy. He helped Euler to write calculations and prepare papers. On 18 September 1783, after a lunch with his family, during a conversation with Lexell about the newly discovered Uranus and its orbit, Euler felt sick. He died a few hours later. which was highly praised by Leonhard Euler in 1768. Lexell's method is as follows: for a given nonlinear differential equation (e.g. second order) we pick an intermediate integral—a first-order differential equation with undefined coefficients and exponents. After differentiating this intermediate integral we compare it with the original equation and get the equations for the coefficients and exponents of the intermediate integral. After we express the undetermined coefficients via the known coefficients we substitute them in the intermediate integral and get two particular solutions of the original equation. Subtracting one particular solution from another we get rid of the differentials and get a general solution, which we analyse at various values of constants. The method of reducing the order of the differential equation was known at that time, but in another form. Lexell's method was significant because it was applicable to a broad range of linear differential equations with constant coefficients that were important for physics applications. In the same year, Lexell published another article "On integrating the differential equation a<sup>n</sup>d<sup>n</sup>y + ba<sup>n-1</sup>d<sup>m-1</sup>ydx + ca<sup>n-2</sup>d<sup>m-2</sup>ydx<sup>2</sup> + ... + rydx<sup>n</sup> = Xdx<sup>n</sup>" presenting a general highly algorithmic method of solving higher order linear differential equations with constant coefficients.

Lexell also looked for criteria of integrability of differential equations. He tried to find criteria for the whole differential equations and also for separate differentials. In 1770 he derived a criterion for integrating differential function, proved it for any number of items, and found the integrability criteria for <math display=inline>dx\int{Vdx}</math>, <math display=inline>dx\int{dx\int{Vdx</math>, <math display=inline >dx\int{dx\int{dx\int{Vdx}</math>. His results agreed with those of Leonhard Euler but were more general and were derived without the means of calculus of variations. At Euler's request, in 1772 Lexell communicated these results to Lagrange and Lambert.

Concurrently with Euler, Lexell worked on expanding the integrating factor method to higher order differential equations. He developed the method of integrating differential equations with two or three variables by means of the integrating factor. He stated that his method could be expanded for the case of four variables: "The formulas will be more complicated, while the problems leading to such equations are rare in analysis".

Also of interest is the integration of differential equations in Lexell's paper "On reducing integral formulas to rectification of ellipses and hyperbolae", which discusses elliptic integrals and their classification, and in his paper "Integrating one differential formula with logarithms and circular functions", which was reprinted in the transactions of the Swedish Academy of Sciences. He also integrated a few complicated differential equations in his papers on continuum mechanics, including a four-order partial differential equation in a paper about coiling a flexible plate to a circular ring.

There is an unpublished Lexell paper in the archive of the Russian Academy of Sciences with the title "Methods of integration of some differential equations", in which a complete solution of the equation <math>x=y\phi(x')+\psi(x')</math>, now known as the , is presented.

Polygonometry

Polygonometry was a significant part of Lexell's work. He used the trigonometric approach using the advance in trigonometry made mainly by Euler and presented a general method of solving simple polygons in two articles "On solving rectilinear polygons". Lexell discussed two separate groups of problems: the first had the polygon defined by its sides and angles, the second with its diagonals and angles between diagonals and sides. For the problems of the first group Lexell derived two general formulas giving <math>n</math> equations allowing to solve a polygon with <math>n</math> sides. Using these theorems he derived explicit formulas for triangles and tetragons and also gave formulas for pentagons, hexagons, and heptagons. He also presented a classification of problems for tetragons, pentagons, and hexagons. For the second group of problems, Lexell showed that their solutions can be reduced to a few general rules and presented a classification of these problems, solving the corresponding combinatorial problems. In the second article he applied his general method for specific tetragons and showed how to apply his method to a polygon with any number of sides, taking a pentagon as an example.

The successor of Lexell's trigonometric approach (as opposed to a coordinate approach) was Swiss mathematician L'Huilier. Both L'Huilier and Lexell emphasized the importance of polygonometry for theoretical and practical applications.

Celestial mechanics and astronomy

thumb|Disquisitio de investiganda vera quantitate

Lexell's first work at the Russian Academy of Sciences was to analyse data collected from the observation of the 1769 transit of Venus. He published four papers in "Novi Commentarii Academia Petropolitanae" and ended his work with a monograph on determining the parallax of the Sun, published in 1772.

Lexell aided Euler in finishing his Lunar theory, and was credited as a co-author in Euler's 1772 "Theoria motuum Lunae".

After that, Lexell spent most of his effort on comet astronomy (though his first paper on calculating the orbit of a comet is dated 1770). In the next ten years he calculated the orbits of all the newly discovered comets, among them the comet which Charles Messier discovered in 1770. Lexell calculated its orbit, showed that the comet had had a much larger perihelion before the encounter with Jupiter in 1767 and predicted that after encountering Jupiter again in 1779 it would be altogether expelled from the inner Solar System. This comet was later named Lexell's Comet.

Lexell also independently calculated the orbit of Uranus and proved that it was a planet rather than a comet, a discovery he made concurrently with Pierre-Simon Laplace.