<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mathjax_for_rst(pelicanobj, mathjax_script, mathjax_settings):
 """Setup math for RST"""

    docutils_settings = pelicanobj.settings.get('DOCUTILS_SETTINGS', {})
    docutils_settings.setdefault('math_output', 'MathJax %s' % mathjax_settings['source'])
    pelicanobj.settings['DOCUTILS_SETTINGS'] = docutils_settings
    rst_add_mathjax.mathjax_script = mathjax_script