Initial Basics – Algebra – Problem #42
IIT Kharagpur CS10001 / CS11001 Programming and Data Structures Lab Question Archive
Difficulty: Hard
Problem Statement
Write a C-program which evaluates the value of the following function as given below for an input real number x (to be read): f(x)= x 4 -36x3 +4x-3 The program also computes the sign of the derivative of the function (f’(x)). If the derivative is positive, it prints ‘1’. If it is negative, prints ‘-1’. Otherwise, it prints ‘0’. Run your program to provide results for the following input numbers. -5.4, 2.4, 3.0, 5.0, and 38.