adds example1.cpp
simplifies trig