I know that up until the late 18th century, both China and Korea were very resistant to the european mathematics and science. China had a series of revolts, reforms, and revolutions in the late XIX - early XX century, and Korea remained mostly closed to foreign powers until annexation in 1909.
So when/how were european mathematics introduced into the two nations? I mean both the concepts (like calculus) and the symbols (arabian numerals and +/- signs).
Were the nobility opposed to this as well? Did the academia of the region accept these new ideas? How long would it take until the public would become familiar with this concept, or learn about it in school?
I know that up until the late 18th century, both China and Korea were very resistant to the european mathematics and science.
This is simply not true. Europeans have had a role in the Chinese imperial government since the Ming dynasty. European mathematicians were highly valued for the accuracy of their astronomical predictions (which served purposes in imperial rituals). This continued under the Qing dynasty. The young emperor Shunzhi developed an especially close relationship with Jesuit missionary and astronomer Johann Adam Schall von Bell and treated him as something of a paternal figure.
Unfortunately for the Jesuits upon Shunzhi's early death, a regency assumed power and repudiated many of his earlier policies, including his endorsement of the Jesuit faction at court, and Schall was jailed. Upon taking power, however, Kangxi rehabilitated the Jesuits and put them back in charge of the Imperial astronomy office. Kangxi fancied himself something of an intellectual and took a deep interest in both arts and sciences, including western sciences.
But the Jesuits ran into further problems, many generated by divisions within the European community in China. A serious disagreement arose between those who wished to proselytize aggressively and actively take a stand against traditional Chinese rituals, and those like the Jesuits who thought traditional Chinese rituals to be purely secular, civic in nature and who were willing to accommodate Chinese custom. The so-called rites controversy ended when Pope Clement XI decisively took the hard line and threatened to excommunicate those missionaries who followed Chinese customs. Kangxi in turn responded by expelling those who would side with the pope.
Furthermore, throughout the 18th century, an indigenous intellectual movement known as kaozheng, or empirical research, took root, and eventually became the dominant strain of intellectual thought in China as its advocates entered the bureaucracy and started to restructure the examination system and therefore the educational system accordingly. The kaozheng movement was mostly a movement to rediscover the real classics of Chinese philosophy and literature, and to strip away interpretations and outright forgeries that have cropped up in the intervening centuries. However kaozheng also extended to mathematics, and Chinese scholars were enthusiastic proponents of new mathematical methods learned from the Europeans.
There is no real evidence of any fundamental opposition to European mathematics, rather that the spread of western mathematics and other sciences fell victim to political and ideological disputes. That these disputes affected the diffusion of mathematics was quite incidental.
Moving forward, during the 19th century self-strengthening movement, reformers were happy to import western mathematics. From the 1860's or so to the 1870's, a huge body of western math and science was translated into Chinese. Zeng Guofan, one of the most prominent early officials in charge of the self-strengthening movement, was an avid proponent of western mathematics. Zeng personally wrote a highly complimentary preface to a Chinese edition of Euclid's Elements. This translation was done by British missionary Alexander Wylie with Chinese mathematician Li Shanlan. By the end of the 1860's there was definitely a body of Chinese literature on calculus, if you're curious about that.
However the diffusion of western mathematics and science generally remained limited. During the mid to late 1800's a small number of Chinese institutions of modern technical learning sprung up (for example at Zeng Guofan's arsenals), and a small number of Chinese went overseas to study at foreign universities. The US, UK, and France were popular destinations (until the US cut off Chinese immigration). The Chinese intellectual class were generally still preoccupied with the traditional examination system, and the lower classes remained largely uneducated. There were more or less abortive attempts to change the curriculum (notably in 1898) until in 1905 when the examination system was abolished altogether. By this point a large number of private schools teaching a modern curriculum had sprung up to fill the vacuum, but these still generally catered to those of at least middling wealth which excluded the vast majority of Chinese.
After the end of Imperial rule in 1912, central authority in China disintegrated until the end of the 1920's when the GMD at least nominally reunited the country. The immediate post-Imperial Republican era was characterized by weak central government and weak investment in public education, continuing the trend of the late Qing. The brief respite of the 1930's was then interrupted in 1937 by WW2 and civil war. After 1949 the PRC was able to harness a much larger proportion of economic output for public investment than previous governments and public education began to expand quite rapidly, bringing 'modern' technical education to the masses.
Tangentially, independent of theoretical mathematics, the practical arithmetic of western accounting practices also spread throughout China in the 19th century. The proliferation of treaty ports gradually spread western business practices throughout China and after Shimonoseki in 1895, the proliferation of western and Japanese factories greatly accelerated the spread of modern accounting. Of course accounting isn't mathematics but it may be of interest to you.
Basically, resistance to western mathematics per se was never a thing. However western mathematics came attached to many other things, like religious and political institutions and forms of organization that certainly were anathema to segments of Chinese society, which impeded its spread.
and Korea remained mostly closed to foreign powers until annexation in 1909.
In Korea, most sources state that Korea began to open up to the outside world(the West in general) after the (Japan-Korea Treaty of 1876)[http://en.wikipedia.org/wiki/Japan%E2%80%93Korea_Treaty_of_1876]. Prior to this the country was ruled by the (Heungseon Daewongun)[http://en.wikipedia.org/wiki/Heungseon_Daewongun], a firm ruler who was against opening Korea's doors. However, there was a significant presence who wanted to open Korea to the outside world, and later these people gained influence. After the treaty, Korea opened trade relations with various European countries and Japan, such as Russia, the US, the UK, France, Germany, and Italy.
So while Korea was able to receive many elements of foreign culture, the downside is that many of these treaties were a bit unfair, with the concept of (most favored nation)[http://en.wikipedia.org/wiki/Most_favoured_nation] being used a lot.
I can't find any specific sources regarding math, because much of Joseon(Korean) education was based on learning Confucian ideals and Chinese characters. In fact, there was a caste system, in which the yangban were at the top, and learned these subjects, while and actual subjects like foreign languages and math were learned by a lower caste called jungin.
What I can say though, is that there were faint traces of Western sciences before this. Korea had its own calender system called chiljungsan which was heavily influenced by the Chinese and Arabian calender system. Most of Korean mathematics and sciences were actually learned from the Chinese, and the Arab traders that came in previous kingdoms.
After opening its doors, westerners were allowed to enter the country, and some educators came as well. The youkyoung gongwon was an institute in which young students learned Western mathematics, sciences and languages, and later continued mainly through foreign missionaries.
In short, much of Korea's own sciences and mathematics were actually highly influenced from the West and the Middle East, despite there being very little direct contact. China played a huge role in delivering this knowledge.
Korea's Joseon dynasty was founded on humanism and scientific investigation. Sejong imported books, promoted research, and published translations of, eg, Chinese farming manuals and foreign calendar systems, and made important innovations in agriculture, military sciences, medicine, and printing.
While I'm less familiar with the late Joseon period, I would say it was mainly politically weaker kings who shut out foreign influences.
http://www.koreasociety.org/doc_view/222-the-cultural-work-of-sejong-the-great-by-gari-ledyard