Welcome to our community

Be a part of something great, join today!

Determine the position using an iteration method

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
3,958
Hey!! :eek:

The function \begin{equation*}f(x)=\frac{x}{e^{x/9}}\cdot \frac{\sin \left (\pi (x-1)\right )}{x-1}\end{equation*} has at exactly one position $\overline{x}>1$ the same value as at the position $x=1$. Determine the position $\overline{x}$ using an iteration method with accuracy of two decimal digits.


I have done the following:

We have that \begin{equation*}f(\overline{x})=f(1)\Rightarrow f(\overline{x})-f(1)=0 \Rightarrow g(x):=f(x)-f(1)\end{equation*}

First we have to calculate $f(1)$:
\begin{align*}f(1)&=\lim_{x\rightarrow 1}f(x)=\lim_{x\rightarrow 1}\frac{x}{e^{x/9}}\cdot \frac{\sin \left (\pi (x-1)\right )}{x-1}=\frac{1}{e^{1/9}}\cdot \lim_{x\rightarrow 1}\frac{\sin \left (\pi (x-1)\right )}{x-1}\ \overset{DLH}{ = } \ \frac{1}{e^{1/9}}\cdot \lim_{x\rightarrow 1}\frac{\pi \cos \left (\pi (x-1)\right )}{1}\\ & =\frac{1}{e^{1/9}}\cdot \pi \cos \left (\pi \cdot 0\right )=\frac{1}{e^{1/9}}\cdot \pi =\frac{\pi}{e^{1/9}}\end{align*}

Therefore we get the function \begin{equation*}g(x)=\frac{x}{e^{x/9}}\cdot \frac{\sin \left (\pi (x-1)\right )}{x-1}-\frac{\pi}{e^{1/9}}\end{equation*}

Now we have to apply an iteration method to approximate the root of that function, right? Do we use the Newton's method? (Wondering)

We don't have an interval to which the root will belong, we only know that it is greater than $1$. So do we have to guess such an interval to calculate the first input $x_0$? (Wondering)
 

Opalg

MHB Oldtimer
Staff member
Feb 7, 2012
2,647
Leeds, UK
Hey!! :eek:

The function \begin{equation*}f(x)=\frac{x}{e^{x/9}}\cdot \frac{\sin \left (\pi (x-1)\right )}{x-1}\end{equation*} has at exactly one position $\overline{x}>1$ the same value as at the position $x=1$. Determine the position $\overline{x}$ using an iteration method with accuracy of two decimal digits.


I have done the following:

We have that \begin{equation*}f(\overline{x})=f(1)\Rightarrow f(\overline{x})-f(1)=0 \Rightarrow g(x):=f(x)-f(1)\end{equation*}

First we have to calculate $f(1)$:
\begin{align*}f(1)&=\lim_{x\rightarrow 1}f(x)=\lim_{x\rightarrow 1}\frac{x}{e^{x/9}}\cdot \frac{\sin \left (\pi (x-1)\right )}{x-1}=\frac{1}{e^{1/9}}\cdot \lim_{x\rightarrow 1}\frac{\sin \left (\pi (x-1)\right )}{x-1}\ \overset{DLH}{ = } \ \frac{1}{e^{1/9}}\cdot \lim_{x\rightarrow 1}\frac{\pi \cos \left (\pi (x-1)\right )}{1}\\ & =\frac{1}{e^{1/9}}\cdot \pi \cos \left (\pi \cdot 0\right )=\frac{1}{e^{1/9}}\cdot \pi =\frac{\pi}{e^{1/9}}\end{align*}

Therefore we get the function \begin{equation*}g(x)=\frac{x}{e^{x/9}}\cdot \frac{\sin \left (\pi (x-1)\right )}{x-1}-\frac{\pi}{e^{1/9}}\end{equation*}

Now we have to apply an iteration method to approximate the root of that function, right? Do we use the Newton's method? (Wondering)

We don't have an interval to which the root will belong, we only know that it is greater than $1$. So do we have to guess such an interval to calculate the first input $x_0$? (Wondering)
[DESMOS=-1,4,-1,4]\frac{\left(x\sin\left(\pi\left(x-1\right)\right)\right)}{e^{x/9}(x-1)}[/DESMOS]
The above graph shows that the function repeats its value at $x=1$ when $x$ is somewhere near $1.4$ or $1.5$. So I would take $x_0=1.5$.
 
Last edited:

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,593
Leiden
Now we have to apply an iteration method to approximate the root of that function, right? Do we use the Newton's method?

We don't have an interval to which the root will belong, we only know that it is greater than $1$. So do we have to guess such an interval to calculate the first input $x_0$?
Hey mathmari !!

This is an example where Newton-Raphson can have problems if we are not careful.
If we pick a starting value that is too far from the zero, it will likely not converge.
However, a starting value that starts slightly to the right of the zero, such as the 1.5 that Opalg pointed out, should do the job. And it will converge quadratically.
Starting below 1.4 or above 2.1 will likely diverge though. (Wondering)

Alternatively algorithms are bisection and regula falsi.
First we might search for values that are on opposite sides of the x-axis.
That is, we can start with some initial interval, and then either double or half its size until we find both a positive and a negative function value.
The root must then in between those, after which both bisection and regula falsi will find it. (Thinking)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
3,958
We have \begin{align*}&g(x)=\frac{x\sin \left (\pi(x-1)\right )}{e^{x/9}(x-1)}-\frac{\pi}{e^{1/9}}\\ &g'(x)=\frac{\left [\sin \left (\pi (x-1)\right )+x\pi \cos \left (\pi (x-1)\right )\right ]\left (x-1\right )-x\sin \left (\pi (x-1)\right ) \frac{8+x}{9}}{e^{x/9}(x-1)^2}\end{align*}

Choosing as initial value $x_0=1.5$ we get the following:
\begin{align*}x_1=x_0-\frac{g(x_0)}{g'(x_0)}\approx 1.4259 \\ x_2=x_1-\frac{g(x_1)}{g'(x_1)}\approx 1.4149 \\ x_3=x_2-\frac{g(x_2)}{g'(x_2)}\approx 1.4147\end{align*}
The first two decimal digits are the same as in the previous step and so position that we are looking for is $1.41$.


Is everything correct? (Wondering)
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,593
Leiden
Yep. (Nod)