′ (2ln(x+1.7)-xx)/((-7)+3.2xx)+(x+3x)x Numerical constants have the form ‘d.d’, with an optional sign (+ or -), where the number of digits both in integer and decimal parts are arbitrary. Input The input is a textual file which has one f(x) definition per line. The input lines do not have blanks. The input expression is guaranteed to be correct (no syntax error can occur). Write a program that performs symbolic derivation f (x) = df(x)/dx of a given function f(x). The function f(x) is defined by an expression which may contain the following operations: ‘+’ (addition), ‘-’ (subtraction), ‘’ (multiplication), ‘/’ (division), and ‘ln’ (natural logarithm). Besides, the operands may be the variable x and numerical constants. The expression may contain arbitrarily nested sub- expressions in parentheses ( ). The expression is given in a usual, infix form, such as: Output The output should contain lines with corresponding symbolic derivations f = df/dx, one line for each ′ f. The strings representing f(x) and f (x) are guaranteed to have no more than 100 characters. The output expression should be written in infix form. It should not be optimized for human reading. This means, it can contain redundancies, such as ‘0x’, ‘1*x’, ‘0+x’, etc. The derivation should be performed using the following rules:
2/2 Sample Output ((1x+x1)x-xx1)/x^2 (0x-45.781)+1 ((0x-2.451)x-2.45x1)+(1-0)/(x-3)