Function Mechatronix::isCubicMonotone

Function Documentation

bool Mechatronix::isCubicMonotone(real_type a, real_type fa, real_type Dfa, real_type b, real_type fb, real_type Dfb)

Check if the cubic \( p(x) = f(a) + f'(a)(x-a) + B (x-a)^2 + C (x-a)^3 \) where \( A \) and \( B \) are choosen in such a way \( p(b) = f(b) \) and \( p'(b) = f'(b) \) is monotone.

Parameters
  • a – the value \( a \)

  • fa – the value \( f(a) \)

  • Dfa – the value \( f'(a) \)

  • b – the value \( b \)

  • fb – the value \( f(b) \)

  • Dfb – the value \( f'(b) \)

Returns

return true if cubic is monotone