# Weierstrass Approximation Theorem Problem [closed]

In the question below, I would have to solve for an upper estimate using Weierstrass Approximation Theorem, however I am not familiar with the theorem, how do I go about solving it?

For any $$\epsilon\in [0,1]$$, find an upper estimate on the integer $$n$$ such that there exists an approximation of $$f(x)=logx$$ on $$[1,2]$$ by a polynomial $$P(x)$$ of degree $$n$$ such that $$\sup_{x\in[-1,1]}|P(x)-logx|\leq \epsilon.$$

## closed as off-topic by Saad, Paras Khosla, Cesareo, José Carlos Santos, Paul FrostApr 24 at 16:08

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – Saad, Paras Khosla, Cesareo, José Carlos Santos, Paul Frost
If this question can be reworded to fit the rules in the help center, please edit the question.

• If you have an analytic function the best n degree approximation is the sum of the n first terms of its Taylor expansion – clark Apr 3 at 5:52

Assuming the fact that the $$\log$$ you used is in base $$e$$. Let, $$f(x)=\log x$$ for all $$x\in [1,2]$$ then $$f(x)$$ can be expanded as, $$f(x)=\log x=(x-1)-\frac{1}{2}(x-1)^2+\frac{1}{3}(x-1)^3+\dots+\frac{(-1)^{n-1}}{n}(x-1)^n+R_n(x)$$ where $$R_n(x)$$ is the remainder after $$n$$ terms.
Set the polynomial $$P(x)=(x-1)-\frac{1}{2}(x-1)^2+\frac{1}{3}(x-1)^3+\dots+\frac{(-1)^{n-1}}{n}(x-1)^n$$, then $$P(x)$$ is a polynomial of degree $$n$$. Now choose $$n$$ in such a way that $$\displaystyle \sup_{x\in [1,2]}|R_n(x)|<\epsilon$$.
For definition of $$R_n(x)$$ i recommend this.