I am wondering if I could parse mathematical expressions (c.f. tan(x)+1, exp(2*t)) and use them as functions in run time.
Probably there are some techniques to realize them (c.f. python scripting, compiling of plugin API before the run, or libraries).
If you know the way, I would appreciate it if you could advise me.
you either need a third party library for this or a lot of code to make it happen -- you need to define the format of the input as well. You can make this easier if you do not actually parse it; for example if you provided a series of operations to perform directly, rather than humanish text, but that is harder for users to work with. This would be on par with providing what buttons to push on a calculator directly, a form like that... or if there are a small number of equations you use but different coefficients, you could code them in and let the user fill in the blanks.
If your goal is to input mathematical expressions and get the answers, then you're better off using one of the commercial products like wolfram, mathlab, or maybe R (I'm not too familiar with R).
If your goal is to just program it then yes, it can be done, search for data on parsing and grammars. When I was in school we used Lex and YACC, but I'm sure there are other options today.