Calculus.js
function(symbol) {
                                                                        var p = symbol.power,
                                                                            k = p/2, e;
                                                                        if(symbol.fname === COS)
                                                                            e = '((1/2)+(cos(2*('+symbol.args[0]+'))/2))^'+k;
                                                                        else
                                                                            e = '((1/2)-(cos(2*('+symbol.args[0]+'))/2))^'+k;

                                                                        return _.parse(e);
                                                                    }
function(symbol) {
                                                                        var p = symbol.power,
                                                                            k = p/2, e;
                                                                        if(symbol.fname === COS)
                                                                            e = '((1/2)+(cos(2*('+symbol.args[0]+'))/2))^'+k;
                                                                        else
                                                                            e = '((1/2)-(cos(2*('+symbol.args[0]+'))/2))^'+k;

                                                                        return _.parse(e);
                                                                    }
function ( symbol ) { var p = symbol . power , k = p / 2 , e ; if ( symbol . fname === COS ) e = '((1/2)+(cos(2*(' + symbol . args [ 0 ] + '))/2))^' + k ; else e = '((1/2)-(cos(2*(' + symbol . args [ 0 ] + '))/2))^' + k ; return _ . parse ( e ) ; }
performs double angle transformation
performs double angle transformation