@Test public void testDerivative() { assertEquals(p.derivative().apply(2), 172, 0); assertTrue(p.derivative() instanceof Sum); }
@Test public void testIntergrand() { System.out.println(p.intergrand().apply(2)); assertTrue(p.intergrand().apply(2) < 43 && p.intergrand().apply(2) > 42.9); assertTrue(p.intergrand() instanceof Sum); }
@Test public void testPolynomial() { assertEquals(p.apply(2), 96, 0); assertEquals(p.apply(0), 0, 0); assertEquals(p.apply(-1), 3, 0); }