You are on page 1of 1

Object Oriented Programming & Data Structures

Assignment 1
Indian Institute of Technology, Patna
August 02, 2013
Submission Deadline August 09, 2013

Problem

You have to write a program that nds the derivative and integral of a polynomial function of
x. Users provide an expression that is a polynomial function of x like 4ax5+7abx3+2ax+4a.
Note there will be no negative signs in the expression and it should be in the
decreasing order of the power of x. You have to do the following things.
1. Print the expression for the derivative of the function provided by the user.
2. Print the expression for the integral of the same function.
3. Find the number of variable coecients in the function apart from x. Ask the users to
input the values of the coecients and x. If there are suppose 2 variable coecients
(suppose a and b as in the example) apart from x, ask the user to input the values of
a, b and x and print the numeric value of the corresponding derivative and integral.

You might also like