# -*- coding: utf-8 -*-
"""
Created on Wed Sep 30 16:37:08 2020

@author: jbobowsk
"""

# Here's a short script that shows how LaTeX formulas can be output and 
# printed in the IPython console.  It uses the IPython.display module.  This
# is the one way that I've found that works for me.  
from IPython.display import display, Math, Latex
display(Math(r'F(k) = \int_{-\infty}^{\infty} f(x) e^{2\pi i k} dx'))
display(Math(r'\frac{\partial f}{\partial x} = \frac{\partial}{\partial x}\left[b(x) + c(x)\right]'))

# You can also use 'display()' to nicely format the output from a symbolic
# expression.

# For example, let's just enter the equation for the position of an
# object undergoing constant acceleration. 
import sympy as sym
x0 = sym.Symbol('x0')
t = sym.Symbol('t')
t0 = sym.Symbol('t0')
a = sym.Symbol('a')
v0 = sym.Symbol('v0')
x = x0 + v0*(t - t0) + (1/2)*a*(t - t0)**2

# Compare the outputs of 'print()' and display()'.
print(x)
display(x)