---
title: "False position: cos x = x e^x"
subject: "Numerical Method"
chapter: 2
key: "semester_4/numerical_method:false-position-cosx-xex"
source: https://www.bctengineer.com/q/semester_4/numerical_method/false-position-cosx-xex
site: BCT Engineering
---

# False position: cos x = x e^x

Numerical Method · Chapter 2: Solutions of Nonlinear Equations

- Asked in: 2071 Magh, 8 marks
- Video: [Regula falsi method in 5 minutes](https://www.youtube.com/watch?v=hqlQeWRPyvI) — Smart Engineer
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/numerical_method/false-position-cosx-xex
- Whole chapter: https://www.bctengineer.com/md/semester_4/numerical_method/chapter-2

## Question

Find a root of the equation cos x = x e^x using the regula-falsi method correct up to four decimal places.

## Short answer

Use regula falsi with f(x)=cos x - x e^x on (0,1), updating the endpoint that keeps opposite signs. The successive c values stabilize at 0.5178, so the root is approximately 0.5178.

## Answer

**False Position (Regula Falsi) formula:** for f(a)·f(b) < 0,
c = (a·f(b) − b·f(a)) / (f(b) − f(a)). If f(a)·f(c) < 0 set b = c, otherwise set a = c.

#### Step 1: Bracket the root
f(x) = cos x − x·eˣ  (radians)
f(0) = 1 > 0 and f(1) = 0.5403 − 2.7183 = −2.1780 < 0, so a root lies in (0, 1).
Take a = 0, b = 1.

#### Step 2: Iterations
Because the end b = 1 never moves, the method converges slowly here, so six decimals are shown for a, f(a), c and f(c).

| n | a | b | f(a) | f(b) | c | f(c) |
|---|---|---|---|---|---|---|
| 1 | 0.000000 | 1.0000 | 1.000000 | -2.1780 | 0.314665 | 0.519871 |
| 2 | 0.314665 | 1.0000 | 0.519871 | -2.1780 | 0.446728 | 0.203545 |
| 3 | 0.446728 | 1.0000 | 0.203545 | -2.1780 | 0.494015 | 0.070802 |
| 4 | 0.494015 | 1.0000 | 0.070802 | -2.1780 | 0.509946 | 0.023608 |
| 5 | 0.509946 | 1.0000 | 0.023608 | -2.1780 | 0.515201 | 0.007760 |
| 6 | 0.515201 | 1.0000 | 0.007760 | -2.1780 | 0.516922 | 0.002539 |
| 7 | 0.516922 | 1.0000 | 0.002539 | -2.1780 | 0.517485 | 0.000829 |
| 8 | 0.517485 | 1.0000 | 0.000829 | -2.1780 | 0.517668 | 0.000271 |
| 9 | 0.517668 | 1.0000 | 0.000271 | -2.1780 | 0.517728 | 0.000088 |
| 10 | 0.517728 | 1.0000 | 0.000088 | -2.1780 | 0.517748 | 0.000029 |
| 11 | 0.517748 | 1.0000 | 0.000029 | -2.1780 | 0.517754 | 0.000009 |
| 12 | 0.517754 | 1.0000 | 0.000009 | -2.1780 | 0.517756 | 0.000003 |
| 13 | 0.517756 | 1.0000 | 0.000003 | -2.1780 | 0.517757 | 0.000001 |

The last three values of c (0.517754, 0.517756, 0.517757) all round to 0.5178, and f(c) is practically zero, so the root is fixed to four decimals.

**Answer: root ≈ 0.5178**

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. cos x = x e^x becomes:
   A. f(x) = cos x - x e^x
   B. cos x + x e^x
   C. cos x - e^x
   D. x e^x
   Answer: A. Move to one side. (Key point: Function)

2. Root in (0, 1) because:
   A. Both positive
   B. f(0) = 1 > 0, f(1) = -2.178 < 0
   C. f(0) = 0
   D. f(1) > 0
   Answer: B. Sign change. (Key point: Bracket)

3. In the table, which end stays fixed?
   A. a = 0
   B. Both move
   C. b = 1
   D. Neither
   Answer: C. f(a)*f(c) > 0 each time so a = c. (Key point: Behaviour)

## Close variants set in other exams

- [Secant: x e^x - cos x](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Asecant-x-exp-cosx) — Numerical Method, chapter 2, asked 3×

## Related in Numerical Method

- [False position: e^cos x - sin x - 1](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Afalse-position-ecosx) — Numerical Method, chapter 2
- [False position pseudo-code](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Afalse-position-pseudocode) — Numerical Method, chapter 2, asked 2×
- [Secant algorithm, versus false position](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Asecant-pseudocode-vs-false-position) — Numerical Method, chapter 2
- [Secant: cos x + e^x - 5](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Asecant-cosx-exp) — Numerical Method, chapter 2
- [N-R: sin x = e^-x with limitations](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Anewton-raphson-sinx-exp) — Numerical Method, chapter 2

## Related in other subjects

- [Step-up cycloconverter, four times frequency](https://www.bctengineer.com/question.md?key=semester_7%2Fpower_electronics%3Astep-up-cyclo-four-times) — Power Electronics, chapter 6
- [Position analysis of a four-bar mechanism](https://www.bctengineer.com/question.md?key=semester_6%2Ftheory_of_mechanism_and_machine_i%3Afour-bar-position-analysis-numerical) — Theory of Mechanism and Machine I, chapter 2
- [Pedal equation of r^m = a^m cos mθ](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Apedal-equation-rm-cos-m-theta) — Mathematics I, chapter 1, asked 2×
- [Bernoulli's equation and four applications](https://www.bctengineer.com/question.md?key=semester_3%2Ffluid_mechanics%3Abernoulli-from-euler-applications) — Fluid Mechanics, chapter 5
