plotSineCosinePI :: IO ()
plotSineCosinePI = 
    FV.plotFns 
        [
--         ("sin^2(x) + cos^2(x) = 1", 
--            [
--             (("sin(x)", FV.blue, False), sineX),
--             (("cos(x)", FV.blue, False), cosineX),
--             (("sin^2(x)", FV.blue, False), sineX * sineX),
--             (("cos^2(x)", FV.blue, False), cosineX * cosineX),
--             (("sin^2(x) + cos^2(x)", FV.blue, False), sineX * sineX + cosineX * cosineX)
--            ]
--         )
--         ,
         ("over thick argument",
            [
             (("x", FV.black, False), x),
             (("x+1", FV.black, False), x + 1),
             (("[x,x+1]", FV.black, False), xThick),
             (("sin(x)", FV.black, False), sineX),
             (("sin(x+1)", FV.black, False), sinOutEff effSinCos xp1),
             (("sin([x,x+1])", FV.red, False), sinOutEff effSinCos xThick)
            ]
         )
--         ,
--         ("sin(x^2)",
--            [
--             (("x*x", FV.black, False), x * x),
--             (("sin(x*x)", FV.red, False), sineXSqr)
--            ]
--         )
        ]
    where
    maxdeg = 20
    taylorDeg = 20
    sineX =
        sinOutEff effSinCos x
    cosineX =
        cosOutEff effSinCos x
    sineXSqr =
        sinOutEff effSinCos (x * x)
    xThick = x /\ (x + 1)
    xp1 = x + 1
    x :: PI
    x = 
        -- ie the identity function \x:[0,1] -> x
        newProjection sizeLimits [("x", Interval (0) 2)] "x"

    -- indicators controlling the approximation effort:
    effSinCos =
        (sincosDefaultEffort sampleFn)
        {
            sincoseff_taylorDeg = taylorDeg -- Taylor approximation degree
        }

    sizeLimits = -- restrictions on the size of the polynomials
        defaultSizeLimits
        {
            ipolylimits_maxdeg = maxdeg, -- maximum degree
            ipolylimits_maxsize = 100, -- maximum number of terms
            ipolylimits_effort =
                (ipolylimits_effort defaultSizeLimits)
                {
                    ipolyeff_evalMaxSplitSize = 20000
                } 
        }
        where
        defaultSizeLimits = (defaultIntPolySizeLimits sampleCoeff () 1)
    sampleCoeff = 0
    sampleFn = x
plotSineCosinePI :: IO ()
plotSineCosinePI = 
    FV.plotFns 
        [
--         ("sin^2(x) + cos^2(x) = 1", 
--            [
--             (("sin(x)", FV.blue, False), sineX),
--             (("cos(x)", FV.blue, False), cosineX),
--             (("sin^2(x)", FV.blue, False), sineX * sineX),
--             (("cos^2(x)", FV.blue, False), cosineX * cosineX),
--             (("sin^2(x) + cos^2(x)", FV.blue, False), sineX * sineX + cosineX * cosineX)
--            ]
--         )
--         ,
         ("over thick argument",
            [
             (("x", FV.black, False), x),
             (("x+1", FV.black, False), x + 1),
             (("[x,x+1]", FV.black, False), xThick),
             (("sin(x)", FV.black, False), sineX),
             (("sin(x+1)", FV.black, False), sinOutEff effSinCos xp1),
             (("sin([x,x+1])", FV.red, False), sinOutEff effSinCos xThick)
            ]
         )
--         ,
--         ("sin(x^2)",
--            [
--             (("x*x", FV.black, False), x * x),
--             (("sin(x*x)", FV.red, False), sineXSqr)
--            ]
--         )
        ]
    where
    maxdeg = 20
    taylorDeg = 20
    sineX =
        sinOutEff effSinCos x
    cosineX =
        cosOutEff effSinCos x
    sineXSqr =
        sinOutEff effSinCos (x * x)
    xThick = x /\ (x + 1)
    xp1 = x + 1
    x :: PI
    x = 
        -- ie the identity function \x:[0,1] -> x
        newProjection sizeLimits [("x", Interval (0) 2)] "x"

    -- indicators controlling the approximation effort:
    effSinCos =
        (sincosDefaultEffort sampleFn)
        {
            sincoseff_taylorDeg = taylorDeg -- Taylor approximation degree
        }

    sizeLimits = -- restrictions on the size of the polynomials
        defaultSizeLimits
        {
            ipolylimits_maxdeg = maxdeg, -- maximum degree
            ipolylimits_maxsize = 100, -- maximum number of terms
            ipolylimits_effort =
                (ipolylimits_effort defaultSizeLimits)
                {
                    ipolyeff_evalMaxSplitSize = 20000
                } 
        }
        where
        defaultSizeLimits = (defaultIntPolySizeLimits sampleCoeff () 1)
    sampleCoeff = 0
    sampleFn = x
plotSineCosinePI = 
    FV.plotFns 
        [
--         ("sin^2(x) + cos^2(x) = 1", 
--            [
--             (("sin(x)", FV.blue, False), sineX),
--             (("cos(x)", FV.blue, False), cosineX),
--             (("sin^2(x)", FV.blue, False), sineX * sineX),
--             (("cos^2(x)", FV.blue, False), cosineX * cosineX),
--             (("sin^2(x) + cos^2(x)", FV.blue, False), sineX * sineX + cosineX * cosineX)
--            ]
--         )
--         ,
         ("over thick argument",
            [
             (("x", FV.black, False), x),
             (("x+1", FV.black, False), x + 1),
             (("[x,x+1]", FV.black, False), xThick),
             (("sin(x)", FV.black, False), sineX),
             (("sin(x+1)", FV.black, False), sinOutEff effSinCos xp1),
             (("sin([x,x+1])", FV.red, False), sinOutEff effSinCos xThick)
            ]
         )
--         ,
--         ("sin(x^2)",
--            [
--             (("x*x", FV.black, False), x * x),
--             (("sin(x*x)", FV.red, False), sineXSqr)
--            ]
--         )
        ]
    where
    maxdeg = 20
    taylorDeg = 20
    sineX =
        sinOutEff effSinCos x
    cosineX =
        cosOutEff effSinCos x
    sineXSqr =
        sinOutEff effSinCos (x * x)
    xThick = x /\ (x + 1)
    xp1 = x + 1
    x :: PI
    x = 
        -- ie the identity function \x:[0,1] -> x
        newProjection sizeLimits [("x", Interval (0) 2)] "x"

    -- indicators controlling the approximation effort:
    effSinCos =
        (sincosDefaultEffort sampleFn)
        {
            sincoseff_taylorDeg = taylorDeg -- Taylor approximation degree
        }

    sizeLimits = -- restrictions on the size of the polynomials
        defaultSizeLimits
        {
            ipolylimits_maxdeg = maxdeg, -- maximum degree
            ipolylimits_maxsize = 100, -- maximum number of terms
            ipolylimits_effort =
                (ipolylimits_effort defaultSizeLimits)
                {
                    ipolyeff_evalMaxSplitSize = 20000
                } 
        }
        where
        defaultSizeLimits = (defaultIntPolySizeLimits sampleCoeff () 1)
    sampleCoeff = 0
    sampleFn = x