# [SOLVED]newton's method of approximation

#### DeusAbscondus

##### Active member
In an introductory calculus course I am doing I have just come across the following problem:

"Given that $\sin(x)=e^{-x}$ has a solution near x=1, use Newton's method to find the solution to 4 decimal places."

My question will strike you as very basic, however, I *am* a beginner and I *have* been away from the books for 3 whole weeks, and things which were looking obvious to me last time I looked at them have grown strange since:

to put the above into "functional format", ie: to express the above equation in terms of a function of x, I would do this:

$0=e^{-x}-\sin(x) \Rightarrow f(x)=e^{-x}-\sin(x)$

1. Would this be the correct first step
2. What justifies the simple setting of the equation to equal zero as a means of rendering it a function? It looks and feels like "cheating"

thx for any help in the form of light from above (me!)
DeusAbs

Last edited by a moderator:

#### Ackbach

##### Indicium Physicus
Staff member
This is the correct first step. It's not cheating at all. If $x=y$, then you would agree that by subtracting $x$ from both sides, I get $x-x=y-x$, which is equivalent to $0=y-x$. Then, defining $f(x)$ as the RHS is not cheating, either. It's a definition. You get to make definitions however you like. Incidentally, I wouldn't write $0=\sin(x)-e^{-x}\implies f(x)=\sin(x)-e^{-x}$. I would write $\sin(x)=e^{-x}\implies 0=\sin(x)-e^{-x}$, which it does, and then say that I define $f(x)=\sin(x)-e^{-x}$, and that finding the zeros of $f$ is equivalent to finding the solutions of the original equation (because all the steps I've just taken are reversible).

Last edited:

#### DeusAbscondus

##### Active member
This is the correct first step. It's not cheating at all. If $x=y$, then you would agree that by subtracting $x$ from both sides, I get $x-x=y-x$, which is equivalent to $0=y-x$. Then, defining $f(x)$ as the RHS is not cheating, either. It's a definition. You get to make definitions however you like. Incidentally, i wouldn't write $0=\sin(x)-e^{-x}\implies f(x)=\sin(x)-e^{-x}$. I would write $\sin(x)=e^{-x}\implies 0=\sin(x)-e^{-x}$, which it does, and then say that I define $f(x)=\sin(x)-e^{-x}$, and that finding the zeros of $f$ is equivalent to finding the solutions of the original equation (because all the steps I've just taken are reversible).

Thanks Ackbach.
Sometimes when learning something for the first time, you think you have become familiar with it, then, on some days, that same familiarity turns to strangeness, almost to the numinous in this case.

I greatly appreciate this response, which makes a lot of sense to me.

Regs,
DeusAbs

#### chisigma

##### Well-known member
In an introductory calculus course I am doing I have just come across the following problem:

"Given that $\sin(x)=e^{-x}$ has a solution near x=1, use Newton's method to find the solution to 4 decimal places."

My question will strike you as very basic, however, I *am* a beginner and I *have* been away from the books for 3 whole weeks, and things which were looking obvious to me last time I looked at them have grown strange since:

to put the above into "functional format", ie: to express the above equation in terms of a function of x, I would do this:

$0=e^{-x}-\sin(x) \Rightarrow f(x)=e^{-x}-\sin(x)$

1. Would this be the correct first step
2. What justifies the simple setting of the equation to equal zero as a means of rendering it a function? It looks and feels like "cheating"

thx for any help in the form of light from above (me!)
DeusAbs
The Newton's iterations for the solution of the equation $f(x)=0$ are the solution of the difference equation...

$\displaystyle \Delta_{n}= x_{n+1}-x_{n}= - \frac{f(x_{n})}{f^{\ '}(x_{n})} = \varphi(x_{n})$ (1)

... with 'starting point' $x_{0}$. Two main problems...

a) how to choose $x_{0}$?...

b) if there are multiple solutions, how to choose $x_{0}$ to have a particular solution?...

It is clear from (1) that $\overline x$ is a solution if and only if is $\varphi (\overline x)=0$ and in $x=\overline x$ the function $\varphi(x)$ crosses the x axis with negative slope. In Your case is...

$\displaystyle \varphi(x)= \frac{e^{-x} - \sin x}{e^{-x}+\cos x}$ (2)

... and its diagram is the following... The first solution is between 0 and 1, the second between 3 and 4, the third between 6 and 7 and so one... Choosing $x_{0}< 1$ You are sure to arrive at the first solution, for other $x_{0}$ it is difficult to say to what solution You will arrive...

Kind regards

$\chi$ $\sigma$

Last edited:

#### DeusAbscondus

##### Active member
The Newton's iterations for the solution of the equation $f(x)=0$ are the solution of the difference equation...

$\displaystyle \Delta_{n}= x_{n+1}-x_{n}= - \frac{f(x_{n})}{f^{\ '}(x_{n})} = \varphi(x_{n})$ (1)

... with 'starting point' $x_{0}$. Two main problems...

a) how to choose $x_{0}$?...

b) if there are multiple solutions, how to choose $x_{0}$ to have a particular solution?...

It is clear from (1) that $\overline x$ is a solution if and only if is $\varphi (\overline x)=0$ and in $x=\overline x$ the function $\varphi(x)$ crosses the x axis with negative slope. In Your case is...

$\displaystyle \varphi(x)= \frac{e^{-x} - \sin x}{e^{-x}+\cos x}$ (2)

... and its diagram is the following...

View attachment 381

The first solution is between 0 and 1, the second between 3 and 4, the third between 6 and 7 and so one... Choosing $x_{0}< 1$ You are sure to arrive at the first solution, for other $x_{0}$ it is difficult to say to what solution You will arrive...

Kind regards

$\chi$ $\sigma$

Thanks $\chi$ $\sigma$
Some supplementary questions, if you don't mind:
1. what does the symbol $\varphi$ mean?
2. what does $(\overline x)$ mean? (I refer to the overline)
3. why do I get this graph when i sketch $f(x)=sin(x)-e^{-x}$

Thanks,
DeusAbs

#### chisigma

##### Well-known member
Thanks $\chi$ $\sigma$
Some supplementary questions, if you don't mind:
1. what does the symbol $\varphi$ mean?
2. what does $(\overline x)$ mean? (I refer to the overline)
3. why do I get this graph when i sketch $f(x)=sin(x)-e^{-x}$

Thanks,
DeusAbs
a) the symbol $\varphi(*)$ means simply a function that You can call f(*), &(*), @(*) or how else You want...

b) the symbol $\overline x$ means simply a particular value of x... I didn't use the more conventional symbol $x_{0}$ because I have used it to indicate the 'starting point' of the Newton's iterations...

c) Your graph of course is correct and You can verify that the zeroes of $f(x)= \sin x - e^{x}$ are the same of $\displaystyle \varphi(x)= \frac{e^{-x}- \sin x}{e^{-x}+ \cos x}$...

Kind regards

$\chi$ $\sigma$

#### DeusAbscondus

##### Active member
a) the symbol $\varphi(*)$ means simply a function that You can call f(*), &(*), @(*) or how else You want...

b) the symbol $\overline x$ means simply a particular value of x... I didn't use the more conventional symbol $x_{0}$ because I have used it to indicate the 'starting point' of the Newton's iterations...

c) Your graph of course is correct and You can verify that the zeroes of $f(x)= \sin x - e^{x}$ are the same of $\displaystyle \varphi(x)= \frac{e^{-x}- \sin x}{e^{-x}+ \cos x}$...

Kind regards

$\chi$ $\sigma$
Thanks again $\chi$ $\sigma$ for such a full and prompt answer.
I must confess though, even though I am clear on all three above points, I am still mystified as to the above fractional $\varphi(x) = \frac{e^{-x}- \sin x}{e^{-x}+\cos(x)}$, which I understand to be the ratio at heart of Newton's method:
$\frac{f(x)}{f'(x)}$ however, I don't understand why you include it at this point in your elucidation.
Just for if and when you have a moment; you have already given so generously of your time I don't wish to become a burden.

Warmest,
DeusAbs

PS my font gets smaller when I write a fraction like the one above (compare it to the size of yours which I copied and pasted) Any idea how I can avoid this annoyance?

#### Ackbach

##### Indicium Physicus
Staff member
PS my font gets smaller when I write a fraction like the one above (compare it to the size of yours which I copied and pasted) Any idea how I can avoid this annoyance?
It's because you're using "inline" $\LaTeX$. To avoid this, I typically do any fractions in displayed environments with two dollar signs thus:

Code:
$$\varphi(x)=\frac{e^{-x}-\sin(x)}{e^{-x}+\cos(x)}$$
yields

$$\varphi(x)=\frac{e^{-x}-\sin(x)}{e^{-x}+\cos(x)},$$

as opposed to

Code:
$\varphi(x)=\frac{e^{-x}-\sin(x)}{e^{-x}+\cos(x)}$
yielding

$\varphi(x)=\frac{e^{-x}-\sin(x)}{e^{-x}+\cos(x)}.$

#### DeusAbscondus

##### Active member
Ackbach wrote:

yields

$$\varphi(x)=\frac{e^{-x}-\sin(x)}{e^{-x}+\cos(x)},$$

Ackbach,
That works,
thanks kindly,
DeusAbs

$$\varphi(x) = \frac{e^{-x}}{cos(x)-4}$$

beautiful!