Friday, 6 April 2018

Find $m$ such that a given polynomial has all its roots real



Let $f = X^3 + mX^2 + mX + 1$ be a polynomial with real coefficients and $m \in \mathbb{R}$. Find $m$ such that all of $f$'s roots are real.




I could only think about having the following condition:
$$x_1^2 + x_2^2 + x_3^2 \geq 0$$



This way, I've got $m \in (-\infty, 0) \cup (2, \infty)$


Answer



Hint: Try $X=-1$, and thus factorize the cubic into quadratic polynomial.







Answer



You'll get
$$X^3+mX^2+mX+1=(X+1)(X^2+(m-1)X+1)$$
using long division. Which means that
$$\Delta=(m-1)^2-4\ge 0$$
$$\implies m^2-2m-3\ge0$$
$$\implies m\ge 3 \;or\; m\le -1$$
And using the notation of set theory,
$$m\in (-\infty , -1]\cup [3,\infty )$$



Thursday, 5 April 2018

algorithms - Base of logarithm decrease when variable count increase




I run a large online platform where users submit articles and earn points. I am working on an algorithm where the more comments they submit, the higher score they will receive.



In its simplest stripped down form, this is how the algorithm looks like (the variables are the user's count for each contribution):



( $total_articles * log($total_articles_featured , 1.$total_comments) ) = Score


My aim with the algorithm is to make it valuable to have a high $total_comments count. And I need the $total_comments count be added to the base of the logarithm.



So, with the above calculation, if the user has 350 comments, then the log base will be 1.350.




The obvious problem is that with this calculation, the more comments the user has, the lower score they will receive. I need this to be the opposite. So that the log base decimals decreases whenever the user's $total_comments count increases. And the value should never be 0 (because that will set the logarithm into infinity).



How would I solve this?



When answering, if you are using calculations beyond basic maths, kindly make a note of what each function is called.


Answer



In your formula you wrote $a\cdot\log_{1.c}b$. In the plots, I'm plotting the function which would go in the base of the logarithm. So the function we want is a function which is always above 1 and is decreasing towards 1



$$a\log_{1.c}b=\frac{a\log b}{\log 1.c}$$




This was what you suggested in your question, and I don't think this is what you wanted



saw tooth like function



Now if we replace the base with



$$1+\exp (-c/55)$$



We get this




decreasing function



By increasing $55$ you can make this curve flatten even slower. Here the function is with $550$ instead of $55$ (notice the numbers at the bottom)



slower decreasing plot



I think the function you would want is this:



$total_articles * log($total_articles_featured , 1 + exp(-$total_comments/550.))



However you could change the constant 550. to change the rate of flattening.






Edit: Alternative solution



In the comments you expressed interest in a solution with a straight line which then flattens, I will explain how it works here.
The difference between the solutions is that with this solution, comments loser their value slower at the start, but later they lose their value faster then the previous solution.




Actually what I suggested is very simple, the function has two different formulas in the area 1 to say 1000 comments and a different formula above 1000 comments.



Here's finding a simple function like this:
The first task is finding a linear equation which goes from 2 to $1+\exp(-1000/550)=1.162320611...$



The equation for a linear function is



$$ax+b$$



And $b$ is the value of the function at $0$, and since we want it to start at $2$, $b$ will be $2$.
The next we need to find is $a$ and we can do this because we want the value of the function at $1000$ to be $1+\exp(-1000/550)=1.162320611...$




$$1000a+2=1.162320611...$$
Which when solved is
$$a = -0.000837679$$



This linear equation looks like this:



linear function



The line looks great in the start but we reach problems somewhere since the function goes below $1$ and we don't want that.
There is a solution, we make a piecewise function.




$$
f(x)=\left\{
\begin{array}{lr}
-0.000837679x+2&\quad \text{if }x<1000\\
1+\exp (-c/550) &\text{if }x\ge 1000
\end{array}
\right.
$$



Which gives us:




piecewise function



And that function will never reach $1$.



If you want to use the function above this would be the code



$total_articles * log($total_articles_featured, $total_comments < 1000 ? 2-$total_comments/1193.7747 : 1 + exp(-$total_comments/550.))



We might want this function to have a less abrupt cut in it, and we can decrease the cut by increasing the point where we switch from line to flattening formula. However we will never remove the cut completely.
I think the other solution is better because when we get to a point where we almost cant see the cut anymore, the linear function decreases so slowly that the amount of points each comment gives is almost the same unless you post a truly great amount of comments.


induction - Understanding the proof that the sum of the first $n$ natural numbers is $frac{1}{2}n(n+1)$




I'm reading the following book: http://www.cs.princeton.edu/courses/archive/spring10/cos433/mathcs.pdf.



In page 26, they attempt to prove the following theorem using Induction:





For all $n \in \mathbb{N}$:
$$1 + 2 + \cdots + n = \frac{n(n+1)}{2}$$




In order to prove the theorem we need to prove the following statements:




  • $P(0)$ is true.


  • For all $n \in \mathbb{N}$, $P(n)$ implies $P(n + 1)$.



Proving the first one is easy:



$$P(0) = 0 = 0 * (0 + 1) / 2$$
$$= 0 = 0 * 1 / 2$$
$$= 0 = 0 / 2$$
$$= 0 = 0$$




In order to prove the second, they state the following:



$$1+2+\cdots + n + (n+1) = \frac{n(n+1)}{2} + (n+1) \tag{1}$$
$$ = \frac{(n+1)(n+2)}{2} \tag{2}$$



I don't understand how they get from (1) to (2) and how that proves that proves that for all $n \in \mathbb{N}$, $P(n)$ implies $P(n + 1)$ is true.



I'm clearly missing something in the process. Can someone clear the fog for me?


Answer



Just do the math.




$$\frac{n(n+1)}{2} + (n+1) = \frac{n(n+1)+2(n+1)}{2} = \frac{(n+2)(n+1)}{2}$$



For your second problem, note that you proved that $$1+2+\ldots+n+(n+1) = \frac{(n+2)(n+1)}{2}.$$



The initial statement is $1+2+\ldots+k = \frac{k(k+1)}{2}$, with another letter. If you do $k=n+1$ you will get $1+2+\ldots+(n+1) = \frac{(n+1)((n+1)+1)}{2} = \frac{(n+2)(n+1)}{2}$, and that is what you just proved.


Proof using method of contradiction. Use the method of contradiction to prove that √2 is irrational.

Use the method of contradiction to prove that √2 is irrational. I don't understand how to prove that √2 is irrational using this method. And I feel difficult to form the contradiction.

Wednesday, 4 April 2018

real analysis - Is every function with the intermediate value property a derivative?



As it is well known every continuous function has the intermediate value property, but even some discontinuous functions like
$$f(x)=\left\{

\begin{array}{cl}
\sin\left(\frac{1}{x}\right) & x\neq 0 \\
0 & x=0
\end{array}
\right.$$
are having this property.
In fact we know that a derivative always have this property.



My question is, if for every function $f$ with the intermediate value property exists a function $F$ such that $F'=f$. And if so, is $F$ unique (up to a constant you may add)?



My attempts till now: (Just skip them if you feel so)




The most natural way of finding those functions would be integrating, so I guess the question can be reduced to, if functions with the intermediate value property can be integrated.
This one depends heavy on how you define when a functions is integrable, we (my analysis class) said that we call a function integrable when it is a regulated function (the limits $x\to x_0^+ f(x)$ and $x\to x_0^- f(x)$ exists ) .
As my example above shows, not every function with the intermediate value property is a regulated function. But if we say a function is integrabel when every riemann sum converges the above function is integrable, so it seems like this would be a better definition for my problem.



Edit: As Kevin Carlson points out in a commentar that being a derivative is different from being riemann integrable, he even gave an example for a function which is differentiable but it's derivative is not riemann integrable. So we can't show that those functions are riemann integrable as they are not riemann integrable in general. Now I have no clue how to find an answer.


Answer



If you compose $ \tan^{-1} $ with Conway’s Base-$ 13 $ Function, then you get a bounded real-valued function on the open interval $ (0,1) $ that satisfies the Intermediate Value Property but is discontinuous at every point in $ (0,1) $. Therefore, by Lebesgue’s theorem on the necessary and sufficient conditions for Riemann-integrability, this function is not Riemann-integrable on any non-degenerate closed sub-interval of $ (0,1) $.



Now, it cannot be the derivative of any function either, because by the Baire Category Theorem, if a function defined on an open interval has an antiderivative, then the function must be continuous on a dense set of points. This thread may be of interest to you. :)


complex analysis - Proof of identity principle for power series



enter image description hereFormer: I want to proof that a convergent power series in $B_r(0)$ has only coefficents that are equal to zero (identity priniciple for power series).
Let's write the power series as $P(z) = \sum_{n=0}^{\infty}a_n z^{n}$.
I read in some book that I can write the coefficents like that:
\begin{align*}
a_n = \frac{P^{(n)}(0) }{n!} \, ,

\end{align*}
but I'm not sure why. Anyway then I get
\begin{align*}
P(z) = \sum_{n=0}^{\infty}\frac{P^{(n)}(0) }{n!} z^{n} = \exp(z) \sum_{n=0}^{\infty}P^{(n)}(0) \overset{?}= 0
\end{align*}
Maybe I'm on the wrong way. Can somebody give me a hint how to start?



Edit: I want to proof that a convergent power series that is constant zero can only have zero coefficents. Still I can write: $P(z) = \sum_{n=0}^{\infty}a_n z^{n} \equiv 0 $ and now I have
\begin{align*}
0 \equiv \sum_{n=0}^{\infty}a_n z^{n}

\end{align*}


Answer



The following result is standard: suppose that $P(z)$ converges for some $z_0 \neq 0$. Let $r = |z_0|$. Then $P(z)$ converges for all $z$ in the open ball $B$ centered at $0$ with radius $r$, uniformly on compact sets. In particular, $P(z)$ is a continuous function on $B$.



Now, suppose not all the coefficients $a_n$ are zero. Choose $a_n \neq 0$ with $n$ minimal. Then



$$P(z) = z^n(a_n + a_{n+1}z + \cdots)$$



for all $z \in B$. For the same reason as above, $g(z) = a_n + a_{n+1}z + \cdots$ is continuous on $B$, with $g(0) \neq 0$. So there is a punctured neighborhood of $0$ in which $g(z)$, and hence $P(z)$, is not zero.


geometry - Length of diagonal compared to the limit of lengths of stair-shaped curves converging to it

enter image description here



I see this post and I am stunned. I think this is fallacious but I can't figure where is the fallacy?




If you know the fallacy. Please post a answer.

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...