Finding real roots of $ P(x)=x^8 - x^7 +x^2 -x +15$
The 'Rule of Signs' only tells us that we can have ATMOST $4$ positive real roots but not exactly $4$ positive real roots.
This rule can only give the maximum possible positive or negative real roots but can never give the exact number.
For more information regarding the sign of rules popularly known as Descartes' rule of signs you can refer here
we have to calculate no. of ral roots of $x^8-x^7+x^2-x+15=0$
$\bf{Solution::}$ Let $f(x) = x^8-x^7+x^2-x+15$, we check real solution in $\bf{x\in \mathbb{R}}$
$\bullet$ If $x\leq 0$, Then $f(x) = x^8-x^7+x^2-x+15>0$
$\bullet$ If $0<x<1$, Then $f(x) = x^8+x^2(1-x^5)+(1-x)+14>0$
$\bullet$ If $x\geq 1$, Then $f(x)= x^7(x-1)+x(x-1)+15>0$
So we observe that $f(x)= x^8-x^7+x^2-x+15>0\;\forall x\in \mathbb{R}$
So $f(x)=x^8-x^7+x^2-x+1=0$ has no real roots for all $x\in \mathbb{R}$
Just for "fun" :
$\displaystyle x^8-x^7+x^2-x+15 = \frac{(128x^4-64x^3-16x^2-8x-9)^2+4(16x^2-11x+121)^2+60(x-49)^2+43055}{2^{14}}>0\;\forall x\in \mathbb{R}$
Another Solution::
If $x<0,$ note that $x^8+(-x^7)+x^2+(-x)>0,$ so the polynomial cannot have any negative roots.
If $x\geq 0,$ then note that from AM-GM inequality we have: $\left\{\begin{aligned}& \frac 78 x^8+\frac 18\geq x^7\\& x^2+\frac 14\geq x\end{aligned}\right\} ;$
Thus $\displaystyle\frac 78x^8-x^7+x^2-x+\frac 38>0;$
Let's have a look at Sturm sequences. Here it's easier to use a computer algebra system, I'll give Maxima programs at the end.
We start with $P_0=P=x^8-x^7+x^2-x+15$ and $P_1=P'$, then we do polynomial division until we hit a constant polynomial. We get: $$P_0=x^8-x^7+x^2-x+15$$ $$P_1=8x^7-7x^6+2x-1$$ $$P_2=\frac{7}{64}x^6-\frac{3}{4}x^2+\frac{27}{32}x-\frac{959}{64}$$ $$P_3=-\frac{384}{7}x^3+\frac{768}{7}x^2-1152x+960$$ $$P_4=-\frac{1877}{64}x^2-\frac{6571}{64}x+\frac{32501}{256}$$ $$P_5=\frac{8617090464}{3523129}x-\frac{7984345440}{3523129}$$ $$P_6=-\frac{13706250843331201741}{2062618001798881536}$$
Now the number of roots between $a$ and $b$ is $\sigma(a)-\sigma(b)$, where $\sigma(x)$ is the number of sign changes in $P_0(x), P_1(x),..., P_6(x)$.
We need an upper bound for roots (or instead compute $\sigma(-\infty)-\sigma(\infty)$). Let's use Cauchy's bound, which is here $16$. Then $\sigma(-16) = \sigma(16) = 3$, thus difference is zero and there are no real roots in $[-16, 16]$, hence no real root in $\mathbb{R}$.
Here is some Maxima code to compute all of this.
sturmseq(p) := block([u:[p,diff(p,x)],q,r,n:2], while hipow(u[n],x)>0 do ( [q,r]:divide(u[n-1],u[n]), u:endcons(expand(-r),u), n:n+1), u)$ changes(u,a) := block([s:subst(x=a,u[1]),n:length(u),i,j:0,t], for i from 2 thru n do ( t:subst(x=a,u[i]), if (t>0 and s<0) or (t<0 and s>0) then j:j+1, s:t), j)$ p:x^8-x^7+x^2-x+15$ s:sturmseq(p); changes(s,-16); changes(s,16);