题目: http://acm.hust.edu.cn/vjudge/contest/view.action?cid=68990#problem/E
题目要求:p*e-x+ q*sin(x) + r*cos(x) + s*tan(x) + t*x2 + u = 0,求出x的值;
where 0 <= x <= 1.
题目解析:
首先要学会观察题目,因为p,r>=0,q,s,t<=0,对上面方程求导发现导数<=0,所以原方程单调递减,(满足使用二分的条件)然后假如方程有答案,则可以利用二分来查找满足条件的解,注意二分的条件边界(!!!),其次上面值都可以通过调用math.h库来实现,具体实现请看代码。