Author: Louis Liu

  • I Switched From Github Pages to WordPress…

    I Switched From Github Pages to WordPress…

    Disclaimer: This post is based on my personal experience and is not sponsored or influenced by any platform or service mentioned.

    One of the most compelling reasons for my switch was the need for efficiency and a streamlined focus on content production. WordPress, with its intuitive panel and user-friendly interface, significantly reduced the time I spent on technical configurations and layout adjustments. Unlike my experience with GitHub Pages, where I found myself often entangled in Jekyll configurations and tweaking frontend languages, WordPress allowed me to concentrate more on crafting quality content, which is the heart of any blog.

    Transitioning from the static and somewhat rigid structure of GitHub Pages, I immediately noticed how the WordPress panel facilitated a smoother creative process. Its drag-and-drop functionality, along with a plethora of themes and customizable elements, made designing my blog an enjoyable rather than a cumbersome task.

    While I value the technical skills I acquired from managing my blog via GitHub Pages —- such as a deeper understanding of Jekyll and frontend languages (HTML, CSS and JavaScript), and even some Git usages — it’s essential to align one’s tools with one’s goals. Moreover, it’s worth noting that GitHub Pages is a free platform, making it an excellent starting point for those new to blogging or with limited resources. WordPress, on the other hand, provided me with a balance, offering a platform that’s easy to use yet powerful enough to cater to my evolving needs. However, the time I spent grappling with code on GitHub Pages was not in vain, it undoubtably endowed me with a solid foundation that now enables me to appreciate and utilize WordPress features more effectively.

    Upon my transition to WordPress, I quickly noticed an essential aspect: although customizing your site with specific styles and blocks might necessitate some familiarity with frontend languages, the WordPress community has already developed most of the necessary styles and blocks. This accessibility is a significant advantage, as it allows for the personalization and modification of these elements to suit your unique style and needs without requiring extensive coding knowledge. Moreover, if you’re inclined, there’s always the opportunity to dive into custom coding to further tailor and enhance your site.

    Furthermore, the WordPress community is vast and exceptionally supportive. The platform’s wide range of available extensions and plugins has dramatically simplified the process of adding new features to my site. I didn’t have to dive deep into extensive coding to implement enhancements. Like tools for SEO and interactive elements are readily available, which have been crucial in boosting my blog’s functionality and expanding its reach.

    Finally, my ambition to create a more interactive and engaging platform for my audience was a significant driver behind the move from a static site to a dynamic one. While GitHub Pages does offer some level of interactivity through the GitHub applications like comment app (giscus), WordPress provides a more integrated solution. As a more versatile and dynamic platform, WordPress has opened up avenues for real-time interactions, such as native commenting systems, polls, and other engaging elements that are more seamlessly integrated than on a static site like GitHub Pages. This shift towards a more backend-focused approach has allowed me to make my website more interactive with the audience in a way that static sites struggle to match.

    Switching from GitHub Pages to WordPress has been a transformative journey for my blog. While GitHub Pages served as a great starting point, WordPress has offered a more scalable, user-friendly, and interactive platform that aligns perfectly with my goals as a content creator. The transition was a step forward in making my blog more accessible, engaging, and enjoyable for my audience.

    In line with sharing my journey from GitHub Pages to WordPress, I recognize the value that GitHub Pages brought to my blogging experience, particularly for those who are just starting out or are more technically inclined. To aid others in their blogging endeavors, I’ve ceased updates on my GitHub Page, deep0thinking.github.io, but the repository remains accessible for educational purposes at Deep0Thinking/Deep0Thinking.github.io.

    For those interested in exploring or building a static site based on GitHub Pages, I’ve created a template, 2nd-Minima, which is a user-friendly, advanced template derived from the popular Jekyll-theme-Minima. This template is perfect for those unfamiliar with front-end programming and offers a simplified setup for your blogging journey. You can find this template and a comprehensive guide to using it at Deep0Thinking/2nd-Minima.

    The 2nd-Minima template provides a straightforward approach to blogging, with clear instructions for setup, customization, and deployment. From initial blog creation to integrating engaging features like the giscus comment system, the repository guides you through each step of the process. It also includes tips for personalizing your blog’s appearance and functionality, ensuring that even beginners can create an attractive and effective site!

    This resource is my way of giving back to the community that has supported me through my blogging journey! Whether you decide to stick with GitHub Pages or eventually transition to another platform like I did, I hope the 2nd-Minima template helps you find your footing in the vast world of blogging 🙂

    Remember, the best platform is the one that best serves your needs and those of your audience, so I encourage you to explore various platforms to find what best suits your needs. Happy blogging!


  • Competitive Mathematics — Factorization

    Competitive Mathematics — Factorization

    Note: This article is based extensively on the content of 《数学奥林匹克小丛书》, supplemented by my own insights and reorganized to cover additional topics not addressed in the original text. Therefore, it should be regarded as a newly compiled set of notes rather than a completely original work.

    Basics

    Definition

    The definition of “factorize $A$ over $B$” is: To write the polynomial $A$ as a product of several factors where each factor has coefficients in field $B$, and every factor in this expression is irreducible over the specified field.

    ($A$ is irreducible over $B$ means that “$A$ cannot be written as a product of at least two nonconstant polynomials with coefficients in $B$”.)

    Factorization depends on the field over which you are working. You can factorize over the rational, the real, the complex, or other fields, depending on your goals.

    Here are some examples of factorizations:

    $$

    \begin{aligned}

    &24 =2^3 \times 3 \\

    &a^2-5b^2 =(a+\sqrt{5}b)(a-\sqrt{5}b) \\

    &64a^4+1 =(8a^2-4a+1)(8a^2+4a+1) \\

    &a^3+b^3+c^3-3abc = (a+b+c)(a^2+b^2+c^2-ab-bc-ca)\\

    \end{aligned}

    $$

    If you are wondering how such factorizations are found, do not worry. This article aims to guide you through methods and reasoning that will help you understand and perform these steps on your own.

    Fundamentals

    Before we moving on to the following parts, I think it’s necessary to introduce the basic concepts and the fundamentals of factorizations first…

    Consider this factorization for polynomial over the real numbers field:

    $$x^3+2x^2+3x+6$$

    Student A:

    $$

    \begin{aligned}

    &x^3+2x^2+3x+6 \\

    =\ & (x^3+3x)+ (2x^2+6) \\

    =\ & x(x^2+3)+ 2(x^2+3) \\

    =\ & (x+2)(x^2+3) \\

    \end{aligned}

    $$

    Student B:

    $$

    \begin{aligned}

    &x^3+2x^2+3x+6 \\

    =\ & (x^3+2x^2)+ (3x+6) \\

    =\ & x^2(x+2)+ 3(x+2) \\

    =\ & (x+2)(x^2+3) \\

    \end{aligned}

    $$

    We can see that student A and B both get the same result, though they are using different approaching methods to factorize.

    But here is the question, how can we be sure that even if we use different approaching methods to factorize, we are still going to get the same factorization result?

    In other words, is the factorization unique over the real numbers field?

    The answer is yes, the factorization over the real numbers field is unique.

    And here is a brief informal reasoning which we won’t discuss the details further, because these mathematical concepts are way more beyond the contents that we are focusing on currently:

    Based on the fundamental theorem of algebra and the complex conjugate root theorem, we are able to conclude that:

    (Assume $P(x)$ and $f(x)$ to be any polynomial of $1$ variable $x$ with real coefficients)

    1. $\forall \ P(x)$ can always be factorized to the product form of several $f(x)$ of 1st degree and 2nd degree.

    2. The factorization of $\forall \ P(x)$ over the real numbers field is unique.

    It is essential to understand the two fundamental properties of factorization as we will encounter various factorization problems. Thus, I would like to claim these two conclusions at this point. Please keep them in mind to aid your comprehension of factorization.

    Formulas

    $$

    \begin{aligned}

    & a^2-b^2=(a+b)(a-b) \\

    & a^3+b^3=(a+b)\left(a^2-a b+b^2\right) \\

    & a^3-b^3=(a-b)\left(a^2+a b+b^2\right) \\

    & a^2+2 a b+b^2=(a+b)^2 \\

    & a^2-2 a b+b^2=(a-b)^2 \\

    & a^3+3 a^2 b+3 a b^2+b^3=(a+b)^3 \\

    & a^3-3 a^2 b+3 a b^2-b^3=(a-b)^3 \\

    &a^2+b^2+c^2+2 ab+2 bc+2 ca =(a+b+c)^2\\

    &a^n-b^n=(a-b)\left(a^{n-1}+a^{n-2} b+a^{n-3} b^2+\cdots+a b^{n-2}+b^{n-1}\right), \quad n \in \mathbb{Z^+}\\

    &a^n+b^n=(a+b)\left(a^{n-1}-a^{n-2} b+a^{n-3} b^2-\cdots-a b^{n-2}+b^{n-1}\right), \quad n \in (2\mathbb{Z^+}-1)\\

    \end{aligned}

    $$

    The listed factorization formulas above are so important that you should master. And all these formulas are easy to prove except the last 2, which requires you to apply the polynomial remainder theorem (which we will discuss later).

    Strategies

    Note: In the following exposition, I will attempt to simulate the thought process of the problem setters, exploring how they might craft and refine problems to push contestants beyond standard solution templates and inspire deeper reasoning.

    Method of undetermined coefficients

    MUC is an approach that does the factorization reversely through assuming the factors expressions and then expand forwardly.

    Problem: Please factorize

    $$Ax^2+Bx+C, \quad A,B,C \in \mathbb{Q} $$

    over the integer numbers field.

    First, let’s be clear that when we are talking about the factorization of a polynomial, it means we are trying to find its polynomial factors. So a polynomial won’t have some factors like $(ax^{0.5}+b)$ or $(ax^{-1}+b)$ according to the definition of the polynomial.

    If $Ax^2+Bx+C$ can be factored over the integers, it must have 2 factors polynomial of 1st degree in the form of $ax+b$, since it is a 2nd degree polynomial. If it cannot be factored in this way, then it can only have factors of 2nd or higher degree, which would imply that the polynomial cannot be factored over the integer numbers field or even over the real numbers field.

    Now, assume $\exists \ a,b,c,d \in \mathbb{Q}, \quad c,d \ne 0$ such that:

    $$

    \begin{aligned}

    (ax+b)(cx+d)&= Ax^2+Bx+C \\

    acx^2+ (ad+bc)x+bd &= Ax^2+Bx+C \\

    \end{aligned}

    $$

    Then we have:

    $$

    \begin{cases}

    &ac &= A \\

    &ad+bc&=B \\

    &bd&=C \\

    \end{cases}

    \label{eq:function}

    \implies

    \begin{cases}

    &a &= \frac{A}{c} & (1)\\

    &ad+bc&=B & (2)\\

    &b&=\frac{C}{d} & (3)\\

    \end{cases}

    $$

    Substitute $(1), (3)$ into $(2)$ get:

    $$

    \begin{aligned}

    \frac{A}{c}d+\frac{C}{d}c&=B \\

    Ad^2-Bcd+Cc^2&=0 \\

    \end{aligned}

    $$

    Now the question has changed to factorize $Ad^2-Bcd+Cc^2$ over the integer numbers field, but it is even more complicated than the original problem $Ax^2+Bx+C$ …

    So that indicates, maybe we should change the way we think.

    Let’s solve the following problem first.

    Problem: Please factorize

    $$x^2+x-6$$

    over the integer numbers field.

    Assume $\exists \ a,b,c,d \in \mathbb{Q}$ such that:

    $$

    \begin{aligned}

    (ax+b)(cx+d)&= x^2+x-6 \\

    acx^2+ (ad+bc)x+bd &= x^2+x-6 \\

    \end{aligned}

    $$

    Then we have:

    $$

    \begin{cases}

    &ac &= 1 \\

    &ad+bc&=1 \\

    &bd&=-6 \\

    \end{cases}

    $$

    Since attempting to solve the entire system of equations would be difficult, it may be more effective to use a different approach. One possible method is to find integer solutions by substituting numbers into the equations system first… and we luckily got:

    $$

    \begin{cases}

    a &= 1 \\

    b&=3 \\

    c &= 1 \\

    d&=-2 \\

    \end{cases}

    $$

    Therefore $x^2+x-6=(ax+b)(cx+d)=(x+3)(x-2)$

    Now, let’s think about how to make this problem harder by doing some tiny modifications:

    $$x^2+x-6 \ \to\ \dfrac{x^2+x-6}{3} = \dfrac{x^2}{3}+\dfrac{x}{3}-2$$

    Here it is! Then let’s try to solve them.

    Problem: Please factorize

    $$\dfrac{x^2}{3}+\dfrac{x}{3}-2$$

    over the integer numbers field.

    Are you going to apply the previous solving method? Yes, you can, but this time, you’ll definitely need to deal with fractions (because integer $\times$ integer $\ne$ fraction… etc). Since the polynomial in the problem contains fractions, it may be more convenient to eliminate them at first. Therefore, transform:

    $$\dfrac{x^2}{3}+\dfrac{x}{3}-2 = \dfrac{1}{3}(x^2+x-6)$$

    Then we can focus on solving $x^2+x-6$ first, then times the result with $\dfrac{1}{3}$ . So $\dfrac{x^2}{3}+\dfrac{x}{3}-2=\dfrac{1}{3}(x+3)(x-2)$, accordingly the answer is $\dfrac{x^2}{3}+\dfrac{x}{3}-2$ cannot be factorized over the integer numbers field because its factors contain non-integer coefficients.

    Similarly…

    $$x^2+x-6 \ \to\ 7(x^2+x-6) = 7x^2+7x-42 $$

    Problem: Please factorize

    $$7x^2+7x-42$$

    over the integer numbers field.

    Using the same approach, we can get the answer: $7x^2+7x-42= 7(x+3)(x-2)$

    How about this…

    $$x^2+x-6= (x+3)(x-2) \ \to\ (x+3y)(x-2y)=x^2+xy-6y^2 $$

    Problem: Please factorize

    $$x^2+xy-6y^2$$

    over the integer numbers field.

    We can still apply the MUC for this problem, but please make sure that you set up $(ax+by)(cx+dy)$ instead of some others factors like $(ax+b)(cx+dy^2)$, because that product cannot produce the term of $xy$. Furthermore, it is important to note that any factors polynomials of a polynomial cannot have a degree higher than the degree of the polynomial itself (you can try to prove it using the MUC, it is quite easy).

    So the result is: $x^2+xy-6y^2= (x+3y)(x-2y)$

    Keep modifying the problem…

    $$x^2+x-6 = (x+3)(x-2) \ \to\ (x+2y+3)(x-5y-2) = x^2 -3xy -10y^2 + x -19y -6 $$

    Problem: Please factorize

    $$x^2 -3xy -10y^2 + x -19y -6$$

    over the integer numbers field.

    For this problem, maybe you will not know how to set up the factors with undetermined coefficients unless you saw the process how I derive it. Then what should you do to develop your “MUC” ability effectively? One word, practicing.

    For $x^2 -3xy -10y^2 + x -19y -6$, we can notice that the there are terms of 2nd , 1st and 0 degree, so we should set up the factors polynomials with the max degree of 1st in the form of $(ax+by+c)(dx+ey+f)$ , though you can also try to set up the factors polynomials in the form of $(ax+c)(by+d)$ , this would tell “no solution” instead, and it’s not because $x^2 -3xy -10y^2 + x -19y -6$ cannot be factorized over the integer numbers fields, it’s due to your wrong factors form setting at the beginning.

    Therefore, by processing the right factors form setting, we can get $x^2 -3xy -10y^2 + x -19y -6 = (x+2y+3)(x-5y-2)$ through testing the integers substitutions finitely.

    $$x^2+x-6 \ \to\ x^2+x-6-1 = x^2+x-7 $$

    Problem: Please factorize

    $$x^2+x-7$$

    over the integer numbers field.

    Similarly, we have:

    $$

    \begin{cases}

    &ac &= 1 \\

    &ad+bc&=1 \\

    &bd&=-7 \\

    \end{cases}

    $$

    However, through setting up the right form of factors and testing the integers substitutions finitely, we discovered that the problem can only have the answer: $x^2+x-7=x^2+x-7$, because the equations system fails to satisfy all the integer substitution, in other words, this equations system has no integer solutions. However, it can be factorized over the real numbers field:

    $$

    x^2+x-7=-\dfrac{1}{4}(-2 x+\sqrt{21}-1)(2 x+\sqrt{21}+1)

    $$

    Method of substitutions

    MS is a powerful technique for factorizing polynomials with high degrees. By using MS, we can simplify the original polynomial by reducing its degree or creating the symmetric situation. This approach can greatly simplify the process of factoring complicated polynomials.

    Now, let me set up a problem first.

    $$x^2+5x-6 \ \to\ (x^2)^2+5(x^2)-6 = x^4+5x^2-6$$

    Problem: Please factorize

    $$x^4+5x^2-6$$

    over the integer numbers field.

    Assume $y=x^2$, then

    $$x^4+5x^2-6=y^2+5y-6=(y+6)(y-1)=(x^2+6)(x^2-1)=(x^2+6)(x+1)(x-1)$$

    Similarly…

    $$x^2+5x-6 \ \to\ (x^2+5x-6)^2+5(x^2+5x-6)-6$$

    Problem: Please factorize

    $$(x^2+5x-6)^2+5(x^2+5x-6)-6$$

    over the integer numbers field.

    Assume $y=x^2+5x-6$, then

    \begin{align*}
    (x^2+5x-6)^2+5(x^2+5x-6)-6
    &=y^2+5y-6=(y+6)(y-1) \\
    &= (x^2+5x-6+6)(x^2+5x-6-1) s\\
    &= x(x+5)(x^2+5x-7)
    \end{align*}

    What if I expend the question:

    $$(x^2+5x-6)^2+5(x^2+5x-6)-6 = x^4+10 x^3+18 x^2-35 x$$

    Since in this form, the problem won’t provide you any hint to set up the substitution $y=x^2+5x-6$ directly, you need to discover that hidden property yourself instead, but it is very hard to notice that \((x^2+5x-6)^2+5(x^2+5x-6)-6 = x^4+10 x^3+18 x^2-35 x\) reversely… So, is there a better method except MS to solve this problem? Luckily, yes, and we will discuss later.

    How about this…

    $$x^2+5x-6 \ \to\ x^2+5x(x^2+5x-6)-6(x^2+5x-6)^2$$

    Problem: Please factorize

    $$x^2+5x(x^2+5x-6)-6(x^2+5x-6)^2$$

    over the integer numbers field.

    Assume $y=x^2+5x-6$, then

    $$x^2+5x(x^2+5x-6)-6(x^2+5x-6)^2=x^2+5xy-6y^2=(x+6y)(x-y)$$

    Problem: Please prove that the product of (any 4 consecutive positive integers) plus 1 can become a perfect square number.

    $\forall \ x \in \mathbb{Z^+}$, we have:

    $$x(x+1)(x+2)(x+3)+1=\Big( x(x+3) \Big)\Big( (x+1)(x+2) \Big) +1 =(x^2+3x)(x^2+3x+2) +1 $$

    Assume $y=x^2+3x+1$, then we derive the answer

    \begin{align*}
    (x^2+3x)(x^2+3x+2)+1
    &=(x^2+3x+1-1)(x^2+3x+1+1)+1\\
    &=(y-1)(y+1)+1\\
    &=y^2-1+1=y^2=(x^2+3x+1)^2
    \end{align*}

    It’s time to explain my motivation:

    Our primary goal is to factorize $x(x+1)(x+2)(x+3)+1$ and satisfy

    $$x(x+1)(x+2)(x+3)+1=(?)^2$$

    And according to the 2 fundamental properties of factorizations:

    1. $\forall \ P(x)$ can always be factorized to the product form of several $f(x)$ of 1st degree and with 2nd degree.

    2. The factorization of $\forall \ P(x)$ over the real numbers field is unique.

    We know that the polynomial $x(x+1)(x+2)(x+3)+1$ must be factorable over the integer field since this problem is solvable, and also using different approaches won’t affect the result of the factorization over the integer field of this polynomial.

    However, expending the polynomial directly may be not a good approach, unless you’ve discovered that there is no other way. So then I have:

    $$x(x+1)(x+2)(x+3)+1=\Big( x(x+3) \Big)\Big( (x+1)(x+2) \Big) +1 =(x^2+3x)(x^2+3x+2) +1$$

    But why didn’t I factorize $x(x+1)(x+2)(x+3)$ in this way:

    $$x(x+1)(x+2)(x+3)+1=\Big( x(x+1) \Big)\Big( (x+2)(x+3) \Big) +1 =(x^2+x)(x^2+5x+6) +1$$

    Because $(x^2+3x)(x^2+3x+2)+1$ indicates the hidden identity of $x^2+3x$, and then I could apply the substitution easily to replace $x^2+3x$, but for $(x^2+x)(x^2+5x+6) +1$, you cannot do so.

    Then why did I set up $y=x^2+3x+1$ instead of $y=x^2+3x$, though both of them contain $x^2+3x$ ? It is because the former could reveal the hidden symmetry property of $(x^2+3x)(x^2+3x+2)+1$ and then I can naturally apply the formula $(y-1)(y+1)=y^2-1$ and derive the perfect square after adding 1, but the latter cannot.

    Problem: Please factorize

    $$x^4+(x-8)^4$$

    over the integer numbers field.

    If you know the binomial theorem, you can expand the polynomial $x^4+(x-8)^4=2 x^4-32 x^3+384 x^2-2048 x+4096$ and then do the factorization. However, it is not recommended, want to know why? Here is the answer:

    Assume $y=(x-4)$ and $z=y^2$, then we rewrite the express as

    $$(y+4)^4+(y-4)^4=2y^4+192y^2+512=2(y^2)^2+192(y^2)+512=2z^2+192z+512$$

    When comparing $2z^2+192z+512$ and $2x^4-32x^3+384x^2-2048x+4096$, it is evident that factoring $2z^2+192z+512$ is a much simpler task than factoring the latter polynomial. The reason is because the substitution of $y=(x-4)$ what we were using could reveal the symmetry property of the polynomial and this property can provide a significant advantage in problem-solving, for this problem, it helped us eliminate the odd degree terms and accordingly decrease the complexity of the factorization.

    Now, how should we factorize $2z^2+192z+512$ ? Applying MUC? Yes, it is a valid approach, but not efficient enough for this case, we will discuss it later.

    Polynomial Remainder Theorem and Rational Root Theorem

    Assume $P(x)$ is a polynomial and $\forall \, r \in \mathbb{R}, \quad \exists! \, Q(x), R$ such that $P(x)=Q(x)(x-r)+R$, where $Q(x)$ is a polynomial and $R \in \mathbb{R}$, accordingly we have $P(r)=Q(r)\times 0+R=R$ . If $P(r)=0$, then $R=0$, which $P(x)=Q(x)(x-r)$ . In other words, if $P(r)=0$ , then $(x-r)$ must be one of its factors.

    Problem: Please factorize

    $$x^3-2x^2-5x+6$$

    over the integer numbers field.

    Through substituting some small integers, we found that $P(1)=0$ , therefore $(x-1)$ must be one of its factors. Then applying the polynomial division and MUC:

    $$x^3-2x^2-5x+6=(x-1)(x^2-x-6)=(x-1)(x-3)(x+2)$$

    Problem: Please factorize

    $$2z^2+192z+512$$

    over the real numbers field.

    $2z^2+192z+512=2(z^2+96z+256)$, for this problem, applying the MUC is definitely not a good idea since the coefficients are too large. Besides, substituting random real numbers to test is also not an efficient approach… Therefore, we can try to solve the equation $P(z)=z^2+96z+256=0$ directly to find the $r$ that let $P(r)=0$ through applying the quadratic formula $z=\dfrac{-b\pm \sqrt{b^2-4ac}}{2a}=-48\pm 32\sqrt{2}$ , so the solution is:

    $$2z^2+192z+512=2(x+48-32\sqrt{2})(x+48+32\sqrt{2})$$

    It’s time to introduce a corollary of PRT — RRT (Rational Root Theorem) (it is not hard to prove):

    For a polynomial equation $P(x)=\displaystyle \sum_{i=0}^{n}\left ( a_{i}x^{i}\right )=0$ with $a_{i}\in \mathbb{Z}$, $n\ge 0$ and $a_{n} \ne 0$ , then every rational solution $x=\dfrac{p}{q}$ which this equation satisfies: $p$ is the factor of $a_{0}$ and $q$ is the factor of $a_{n}$.

    So the steps to apply this corollary are:

    1. Write down all the factors of $a_{0}$ and $a_{n}$ respectively.
    2. Use these factors ($p \mid a_{0}$ and $q \mid a_{n}$) to form all the possible rationals $\left \{\dfrac{p}{q}\right \}$.
    3. Test these candidates by directly substituting them into the polynomial $P(x)$ to check if they satisfy $P(\dfrac{p}{q}) = 0$ with PRT.

    Problem: Please factorize

    $$x^4+10 x^3+18 x^2-35x$$

    over the integer numbers field.

    $x^4+10 x^3+18 x^2-35x = x(x^3+10 x^2+18 x-35)$, for $x^3+10 x^2+18 x-35$, as $a_{0}=-35$, $a_{3}=1$, then all the possible rationals are $\left \{ -35, -7, -5, -1, 1, 5, 7, 35 \right \}$. By applying MS, $x=-5$ is the only rational root for the polynomial equation $P(x)=0$, which proves that $x+5$ is the only rational factor of $x^3+10 x^2+18 x-35$ by PRT. Then by using polynomial division, $x^3+10 x^2+18 x-35 = (x+5)(x^2+5x-7)$, since $x+5$ is the only rational factor of it, therefore $x^2+5x-7$ is irreducible over the rational numbers field. So the factorization result is $x^4+10 x^3+18 x^2-35x = x(x+5)(x^2+5x-7)$.

    Clearly, RRT is a powerful tool for finding rational roots and factoring polynomials over the integers (or rationals). However, they do not help us factor polynomials that lack linear rational or integer factors, because no rational root doesn’t necessarily implies irreducibility.

    Recall that any polynomial $P(x)$ with real coefficients can be written (uniquely, up to constant factors) as a product of one or more 1st-degree or 2nd-degree polynomials.

    • So for polynomials of degree $2$ or $3$ with rational coefficients, if RRT finds no rational root, then the polynomial is irreducible over $\mathbb{Q}$. This is because any nontrivial factorization of a quadratic or cubic must include a linear factor $(x -r)$, which would imply the existence of a rational root $r$.
    • For polynomials of degree $4$ or higher, having no rational root does not guarantee irreducibility over $\mathbb{Q}$. A higher-degree polynomial may factor into two or more irreducible polynomials each of degree $\ge 2$. For instance, $ x^4 + 2x^2 + 1 = (x^2 + 1)^2 $ has no rational (or real) roots, yet it is clearly reducible over $\mathbb{Q}$.

    Cyclotomic Polynomials and Primitive Roots

    For the previous example, $x^4 + 2x^2 + 1 = (x^2 + 1)^2$ is indeed a valid factorization over $\mathbb{Z}$, yet RRT does not reveal any rational root. Thus, to handle more advanced factorizations, especially when a polynomial’s roots lie on the complex unit circle, we turn to cyclotomic polynomials and primitive roots. These concepts allow us to incorporate the PRT in an extended setting: instead of substituting a rational number to test if $(x -r)$ divides the polynomial, we substitute a complex number (a root of unity) to see if its minimal polynomial (a cyclotomic polynomial) divides the polynomial in question.

    A complex number \(\omega\) is called an \(n\)-th root of unity if

    $$
    \omega^n = 1
    $$

    They are precisely the solutions to the equation \(x^n -1 = 0\), and can be represented by

    $$
    \omega_k = e^{\tfrac{2\pi i k}{n}},
    \quad
    k = 0,1,\dots,n-1
    $$

    Geometrically, these \(n\)-th roots of unity lie on the unit circle at equal angular intervals of \(\dfrac{2\pi}{n}\).

    An \(n\)-th root of unity \(\omega\) is called primitive if \(\omega^n = 1\) and, for every divisor \(d < n\), \(\omega^d \neq 1\). Equivalently, the order of \(\omega\) is exactly \(n\).

    Now let us see how the PRT can still be used when the suspected root is complex. Suppose \(P(x)\in \mathbb{Z}[x]\) and we guess that a non-rational complex number \(\omega\) might be a root of $P$. By the PRT,

    $$
    P(\omega) = 0
    \implies
    (x -\omega) \mid P(x) \quad \text{in the relevant extension field}
    $$

    Even though \(\omega\) is not rational, we can substitute \(x=\omega\) into \(P(x)\). If \(P(\alpha)=0\), the polynomial \(P\) must have \(\omega\)’s minimal polynomial (over \(\mathbb{Q}\)) as a factor. When \(\omega\) is a primitive $n$-th root of unity, its minimal polynomial is precisely a \(n\)-th cyclotomic polynomial $\Phi_n(x)$. (Wait, what is a \(n\)-th cyclotomic polynomial and its proof? Don’t worry, I’ll show you later.) Hence, by substituting \(\omega\) into \(P(x)\), we effectively confirm that

    $$
    \Phi_n(x) \mid P(x)
    \quad
    \text{if \(\omega\) is a primitive \(n\)-th root of unity}
    $$

    And the reason is because if $\alpha$ is a primitive root and $(x-\omega) \mid P(x)$, then all unique primitive roots $\omega_1, \omega_2, \dots, \omega_{\varphi(n)}$ (you will know what is $\varphi(n)$ later) must have

    $$
    (x-\omega_1)(x-\omega_2)\cdots(x-\omega_{\varphi(n)}) \mid P(x)
    $$

    Thus, an interesting fact about cyclotomic polynomial just revealed,

    $$
    \Phi_n(x) = (x-\omega_1)(x-\omega_2)\cdots(x-\omega_{\varphi(n)})
    $$

    The \(n\)-th cyclotomic polynomial, denoted by \(\Phi_n(x)\), is defined as the unique monic polynomial in \(\mathbb{Z}[x]\) whose roots are exactly the primitive \(n\)-th roots of unity. Symbolically,

    $$
    \Phi_n(x)
    =
    \prod_{\substack{1 \le d \le n \\ \gcd(d,n)=1}}
    \Bigl(x -e^{\tfrac{2\pi i d}{n}}\Bigr)
    $$

    A very important fact is that each cyclotomic polynomial \(\Phi_n(x)\) is irreducible over \(\mathbb{Q}\), and that’s why it is precisely a minimal polynomial stated previously. A common way to prove irreducibility uses Gauss’s lemma, which we won’t discuss here. Moreover, a classical result in number theory shows that the total number of the unique primitive \(n\)-th roots of unity is \(\varphi(n)\), where \(\varphi\) denotes Euler’s totient function:

    $$
    \deg(\Phi_n) = \varphi(n)
    $$

    A key theorem called Cyclotomic Polynomial Factorization Theorem states that

    $$
    x^n -1 = \prod_{d \,\mid\, n} \Phi_d(x)
    $$

    where the product is over all positive divisors \(d\) of \(n\). Because each factor \(\Phi_d(x)\) is irreducible in \(\mathbb{Q}[x]\), this gives a complete factorization of \(x^n -1\) over the integers.

    Several small cyclotomic polynomials appear frequently in factorization problems:

    $$
    \Phi_1(x) = x -1,
    \quad
    \Phi_2(x) = x + 1,
    \quad
    \Phi_3(x) = x^2 + x + 1,
    \quad
    \Phi_4(x) = x^2 + 1,
    \quad
    \Phi_6(x) = x^2 -x + 1,
    \quad\dots
    $$

    Using these, one can obtain some factorizations like

    $$
    x^6 -1
    =
    \Phi_1(x)\,\Phi_2(x)\,\Phi_3(x)\,\Phi_6(x)
    =
    (x-1)(x+1)(x^2 + x + 1)(x^2 -x + 1)
    $$

    Problem: Please factorize

    $$
    P(x) = x^5 + x^4 + x^2 + x + 2
    $$

    By the RRT, no rational root emerges from checking divisors of the constant term. We next consider \(\omega\), a primitive cube root of unity satisfying \(\omega^3 = 1\) and \(\omega \neq 1\). By the definition of primitive root, \(\omega\) also satisfies \(\omega^2 + \omega + 1 = 0\). Using the PRT perspective in complex field, we substitute \(x = \omega\):

    $$
    \omega^5 + \omega^4 + \omega^2 + \omega + 2
    =
    \omega^2 + \omega + \omega^2 + \omega + 2
    =
    2(\omega^2 + \omega) + 2
    =
    2(\,\omega^2 + \omega + 1\,)
    =
    2 \cdot 0
    =
    0
    $$

    Hence, \(\omega\) is a root of \(P(x)\). By the properties of the primitive root \(\omega\), \(\Phi_3(x) = x^2 + x + 1\) (again, the minimal polynomial of \(\omega\) over \(\mathbb{Q}\)) must divide \(P(x)\). Indeed, a polynomial long division confirms:

    $$
    x^5 + x^4 + x^2 + x + 2
    =
    (x^2 + x + 1)\,(x^3 + x^2 + 1)
    $$

    and both factors are irreducible over \(\mathbb{Q}\) by RRT. Thus, we have obtained the complete factorization of \(P(x)\) in \(\mathbb{Z}[x]\).

    Cyclotomic polynomials and primitive \(n\)-th roots of unity form a cornerstone of advanced polynomial factorization. Although the RRT succeeds in uncovering rational linear factors, many polynomials require identifying complex roots of unity. The PRT, when interpreted in the relevant extension field, tells us that if \(\alpha\) is a root of a polynomial \(P\), then the minimal polynomial of \(\alpha\) divides \(P(x)\). For the roots of unity, this minimal polynomial is precisely a cyclotomic polynomial. Consequently,

    $$
    \Phi_n(x)
    \mid
    P(x)
    \quad
    \text{if \(P(\omega)=0\) for a primitive \(n\)-th root of unity \(\omega\)}
    $$

    In practice, testing certain cyclotomic substitutions and applying polynomial long division can yield nontrivial factorizations that remain inaccessible via rational-root checks alone. The fundamental identity

    $$
    x^n -1 = \prod_{d \,\mid\, n} \Phi_d(x)
    $$

    provides the prototype for such factorizations, and memorizing small \(\Phi_n(x)\) values is often a substantial aid in problem-solving contexts.

    Eisenstein’s Criterion and Modular Methods

    Having explored the RRT and cyclotomic polynomials, we now turn to another cornerstone of polynomial factorization techniques: Eisenstein’s criterion and modular arithmetic checks. These methods are especially helpful when rational or obvious cyclotomic factors fail to show up, yet we still seek to prove irreducibility or discover a hidden factorization.

    Eisenstein’s Criterion provides a powerful and quick way to prove a polynomial is irreducible over $\mathbb{Q}$, relying on prime divisibility patterns in the coefficients. More precisely, Eisenstein’s Criterion says:

    Let $P(x) = a_n x^n + a_{n-1} x^{n-1} + \dots + a_1 x + a_0 \in \mathbb{Z}[x]$. If there exists a prime $p$ such that:

    • $p \mid a_k$ for all $k<n$ ($p$ divides every coefficient except possibly the leading one)
    • $p \nmid a_n$ (the leading coefficient is not divisible by $p$)
    • $p^2 \nmid a_0$ (the constant term is not divisible by $p^2$)

    then $P(x)$ is irreducible over $\mathbb{Q}$.

    In plain language, this means if all coefficients but the leading one are multiples of some prime $p$, yet the constant term is “not too divisible” by $p$ (that is, only by one power of $p$ but not $p^2$), then $P(x)$ cannot be factored into polynomials of smaller degree with rational coefficients.

    But, failure to meet these conditions (for every prime) does not imply reducibility. Many irreducible polynomials do not satisfy Eisenstein’s divisibility conditions. Why? Because Eisenstein’s Criterion is a sufficient condition for irreducibility, not a necessary one. If a polynomial $P(x)$ meets Eisenstein’s divisibility pattern for some prime $p$, it is guaranteed irreducible over $\mathbb{Q}$. Hence, it is a one-way test: if it works, you get an instant proof of irreducibility; if not, it gives no conclusion.

    Here is a typical example:

    Problem: Please factorize

    $$
    P(x) = x^2 + 1
    $$

    over the rational numbers field.

    Obviously it is irreducible by using quadratic formula. Yet, there is no prime $p$ dividing $1$ and also meeting the “$p^2 \nmid 1$” pattern in the sense required by Eisenstein. No single $p$ divides all coefficients except the leading one, so Eisenstein’s Criterion gives no verdict. Still, $x^2+1$ is irreducible in $\mathbb{Q}[x]$.

    Sometimes no prime $p$ directly fits $P(x)$’s coefficients, however, the polynomial

    $$
    P(x + c)
    $$

    (for some small integer shift $c$) might meet Eisenstein’s conditions. This trick can salvage many cases where direct Eisenstein fails. An example is, again:

    Problem: Please factorize

    $$
    P(x) = x^2 + 1
    $$

    over the rational numbers field.

    Set $x = y + 1$. Then $x^2 + 1 = (y+1)^2 + 1 = y^2 + 2y + 2$, hence, $p=2$ satisfies all the Eisenstein conditions for $P(y)$, so it is irreducible over $\mathbb{Q}$.

    Problem: Please factorize

    $$
    x^5 + 5x^3 + 10
    $$

    over the rational numbers field.

    As $n=5$ and pick $p=5$, then we have $p \mid a_{k}$ for any $k<n$, and $p \nmid n$, with $p \nmid a^2_{0}$, which satisfies the Eisenstein’s Criterion, so this polynomial is irreducible over $\mathbb{Q}$.

    When Eisenstein’s Criterion does not apply, one can still appeal to modular techniques (often reducing coefficients modulo a small prime $p$) to gather hints about whether a polynomial

    $$
    P(x) = a_n x^n + \cdots + a_0 \quad \in \quad \mathbb{Z}[x]
    $$

    is irreducible or not. The strategy is to reduce its coefficients modulo a prime $p$. We get $$ \overline{P}(x) = (a_n \bmod p)\,x^n + \dots +(a_0 \bmod p) \quad \in \quad \mathbb{F}_p[x] $$

    The overall idea is:

    • Pick a small prime $p$ (often $2,3,5,\dots$)
    • Reduce the coefficients of $P(x)$ modulo $p$, obtaining $\overline{P}(x) \in (\mathbb{Z}/p\mathbb{Z})[x]$
    • Check if $\overline{P}(x)$ factors in $\mathbb{F}_p[x]$
    • If $\overline{P}(x)$ does factor nontrivially over $\mathbb{F}_p$, that suggests (not guarantee) $P(x)$ might also factor over $\mathbb{Q}$. You can try lifting (via Hensel’s lemma or systematic guessing) to recover the factorization over $\mathbb{Z}$.
    • If $\overline{P}(x)$ remains irreducible modulo $p$ for several distinct primes $p$, you start suspecting $P(x)$ is irreducible over $\mathbb{Q}$. (Though keep in mind: a single prime $p$ giving irreducibility does not absolutely prove $P(x)$ irreducible in $\mathbb{Q}[x]$, but multiple prime checks strongly reinforce it.)

    But the question is, why does this help?

    If $P(x)$ factors over $\mathbb{Q}$, say

    $$
    P(x) = f(x)\,g(x),
    \quad
    f(x),\,g(x) \in \mathbb{Q}[x]
    $$

    then by multiplying through by a suitable integer to clear denominators, we get a factorization in $\mathbb{Z}[x]$. Reducing that factorization modulo $p$,

    $$
    P(x)\bmod p = \bigl(f(x)\bmod p\bigr)\,\bigl(g(x)\bmod p\bigr)
    \quad \text{in } \mathbb{F}_p[x].
    $$

    Hence, if $P(x)$ is reducible in $\mathbb{Q}[x]$, it will usually (not guarantee) appear reducible mod $p$ as well.

    So when doing such reduction, the factorization “transfers” (reduces) to a factorization in $\mathbb{F}_p[x]$ except in rare cases of so-called accidental factorization or accidental irreducibility. Checking multiple primes reduces the chance of such accidents.

    From my perspective, these modular checks are less straightforward or less commonly the “go-to” technique than methods which were already discussed in previous chapters. Therefore, we will not delve into the details of how a factorization found in $\mathbb{F}_p[x]$ can be systematically “lifted” to $\mathbb{Z}[x]$. It suffices to note that if such a modular factorization exists (and meets certain technical conditions), then in principle one can recover a genuine integer-coefficient factorization for $P(x)$ (due to Hensel’s Lemma).

    Thus, while modular methods can indeed be powerful (especially in computational settings or more advanced number theory), they are, in practice, not always the most efficient or elementary path to factorization in a contest or instructional context, particularly when simpler tools are already available…

    Symmetric Polynomials

    When dealing with factorization problems in multiple variables, one special class of polynomials stands out: symmetric polynomials. A polynomial $f(x_1, x_2, \dots, x_n)$ of $n$ variables is said to be symmetric if, for every permutation $\sigma$ of the set $\{1, 2, \dots, n\}$, we have

    $$
    P \left (x_{\sigma(1)}, x_{\sigma(2)}, \dots, x_{\sigma(n)} \right ) = P(x_1, x_2, \dots, x_n)
    $$

    In other words, swapping any two variables does not change the value of a symmetric polynomial. For example, $x^3+y^3$, $x^2+y^2+z^2-5xyz$, and $x^2y^2-x-y$ are symmetric polynomials, but $x^2+y^3$ is not one of them, because after swapping $x$ and $y$, the polynomial becomes $y^2+x^3 \ne x^2+y^3$.

    A central result in the theory of symmetric polynomials is the Fundamental Theorem of Symmetric Polynomials, it states that every symmetric polynomial can be expressed in terms of the elementary symmetric polynomials. The elementary symmetric polynomials are defined as follows:

    \begin{align*}
    e_1(x_1, x_2, \dots, x_n) &= x_1 + x_2 + \cdots + x_n \\[6pt]
    e_2(x_1, x_2, \dots, x_n) &= \sum_{1 \leq i < j \leq n} x_i x_j \\[6pt]
    e_3(x_1, x_2, \dots, x_n) &= \sum_{1 \leq i < j < k \leq n} x_i x_j x_k \\[6pt]
    &\vdots \\[6pt]
    e_n(x_1, x_2, \dots, x_n) &= x_1 x_2 \cdots x_n
    \end{align*}

    In general, for $1 \leq k \leq n$,

    $$
    e_k(x_1, x_2, \dots, x_n) = \sum_{1 \leq i_1 < i_2 < \cdots < i_k \leq n} x_{i_1} x_{i_2} \cdots x_{i_k}
    $$

    These elementary symmetric polynomials form a natural set of “building blocks” for any symmetric polynomial. Moreover, each $e_k$ is homogeneous of degree $k$, since every term in $e_k$ is a product of degree $k$. This homogeneity and the fundamental theorem of symmetric polynomials together imply that if you aim to factor a symmetric polynomial, it is often advantageous to consider factorization patterns that involve these elementary symmetric polynomials. In many problems, this approach simplifies the process dramatically.

    When factorizing symmetric polynomials, a natural strategy is to first identify factors using a substitution-based reasoning similar to the PRT, and then leverage the fundamental structure provided by the elementary symmetric polynomials to complete the factorization with MUC.

    Let $ P(x_1,x_2,\dots,x_n) $ be a symmetric polynomial in $ n $ variables over a field $\mathbb{K}$. Suppose there exists a polynomial function $ f:\mathbb{K}^n \to \mathbb{K} $ such that

    $$
    P\bigl(f(x_1,x_2,\dots,x_n),\,x_2,\dots,x_n\bigr) = 0
    $$

    By the symmetry of $ P $ and the bound variable renaming (formally known as $\alpha$-conversion), it follows that, for each $ i \in \{1,2,\dots,n\} $,

    $$
    P\bigl(x_i, x_2,\dots,x_{i-1},f(x_i,x_2,\dots,x_{i-1}, x_{1}, x_{i+1},\dots,x_n),x_{i+1},\dots,x_n\bigr) = 0
    $$

    By PRT, for every variable we have

    $$
    (x_i -f(x_i,x_1,\dots,x_{i-1},x_{i+1},\dots,x_n)) \mid P(x_1,x_2,\dots,x_n)
    $$

    Thus we can conclude

    $$
    (x_1 -f(x_1,x_2,\dots,x_n)) (x_2 -f(x_2,x_1,\dots,x_n)) \cdots (x_n -f(x_n,x_1,\dots,x_{n-1})) \mid P(x_1,x_2,\dots,x_n)
    $$

    Problem: Please factorize

    $$
    P(a,b,c) = a^3(b-c) + b^3(c-a) + c^3(a-b)
    $$

    First, we check what happens if we set $a=b$. Substitute $a=b$:

    $$
    P(b,b,c) = b^3(b-c) + b^3(c-b) + c^3(b-b) = b^4 -b^4 + c^3(0) = 0
    $$

    Since $P(b,b,c)=0$, so, again, by following the property of symmetric polynomials and bound variable renaming (formally known as $\alpha$-conversion), we know that $P(b,b,c)=P(a,c,c)=P(a,b,a)=0$, which indicates $(a-b)$, $(b-c)$, $(c-a)$ are also factors of $P$ by using PRT. Therefore, we have:

    $$
    (a-b) \mid P(a,b,c) \implies (a-b)(b-c)(c-a) \mid P(a,b,c)
    $$

    So we’ve identified a cubic factor $(a-b)(b-c)(c-a)$ in our homogeneous polynomial $P(a,b,c)$ of degree $4$. This leaves us needing one more factor of degree $1$ to match the total degree of $P(a,b,c)$. Since $P$ is symmetric and homogeneous, the missing factor must itself be a symmetric, homogeneous polynomial of degree $1$.

    Returning to our specific polynomial $P(a,b,c)$ in three variables, we need a symmetric, homogeneous polynomial of degree $1$. In three variables, the only such elementary symmetric polynomial of degree $1$ is $e_1(a,b,c) = a + b + c$.

    Thus, we propose that the missing factor is $e_1(a,b,c)$ and apply MUC, then we can assume:

    $$
    P(a,b,c) = k (a-b)(b-c)(c-a)\,e_1(a,b,c)
    $$

    for some constant $k \in \mathbb{R}$ that we must determine.

    To find the constant multiplier $k$, we can substitute convenient numeric values into $P(a,b,c)$ and into our proposed factorization. A convenient choice is to pick some values for $a,b,c$ that simplify computation. Note: These numeric values must satisfy $ a \ne b \wedge b \ne c \wedge c\ne a $ in this case, or that would trigger the PRT and the substitution would be meaningless. So, let us set $(a,b,c)=(0,1,2)$ for simplicity:

    \begin{align*}
    LHS &= P(0,1,2) = 0^3(1-2) + 1^3(2-0) + 2^3(0-1) = (0)(-1) + (1)(2) + (8)(-1) = 2 -8 = -6 \\
    RHS &= k (a-b)(b-c)(c-a)\,e_1(a,b,c) = k (0-1)(1-2)(2-0) (0+1+2) = 6k
    \end{align*}

    As $LHS = RHS$, so we must have $6k=-6$, giving $k=-1$. Thus:

    $$
    P(a,b,c) = -(a-b)(b-c)(c-a)(a+b+c)
    $$

    Problem: Please factorize

    $$
    P(a,b,c) = a^2(a-b-c)+b^2(b-a-c)+c^2(c-a-b)+2abc
    $$

    Similarly, let $a=b+c$, then $P(b+c,b,c) = 0$, which implies

    $$
    (a-(b+c)) \mid P(a,b,c) \implies (a-(b+c))(b-(a+c))(c-(a+b)) \mid P(a,b,c)
    $$

    By MUC, assume $P(a,b,c) = k(a-(b+c))(b-(a+c))(c-(a+b))$, then we do numeric values substitution to confirm the value of $k$, for simplicity, let $(a,b,c) = (1,0,0)$, then

    \begin{align*}
    LHS &= 1^2(1-0-0)+0+0+0 = 1 \\
    RHS &= k(1-(0+0))(0-(1+0))(0-(1+0)) = k(1)(-1)(-1)=k
    \end{align*}

    Therefore $LHS = RHS \implies k=1$, which implies

    $$
    P(a,b,c) = (a-(b+c))(b-(a+c))(c-(a+b))
    $$

    Problem: Please factorize

    $$
    P(a,b,c) = (x+y+z)^4-(x^2+y^2+z^2)^2-2(xy+yz+xz)((x+y+z)^2+(x^2+y^2+z^2))
    $$

    let $a=b$, then $P(b,b,c) = 0$, which implies

    $$
    (a-b) \mid P(a,b,c) \implies (a-b)(b-c)(c-a) \mid P(a,b,c)
    $$

    let $a=0$, then $P(0,b,c) = 0$, which implies

    $$
    (a-0) \mid P(a,b,c) \implies abc \mid P(a,b,c)
    $$

    So together, we have

    $$
    abc(a-b)(b-c)(c-a) \mid P(a,b,c)
    $$

    But $P(a,b,c)$ is a homogeneous symmetric polynomial of degree $4$, since it is divisible by a homogeneous symmetric polynomial of degree $6$, then $P(a,b,c)=0$.

    Problem: Please factorize

    $$
    P(a,b,c) = a^3+b^3+c^3-3abc
    $$

    let $a=-(b+c)$, then $P(-(b+c),b,c) = 0$, which implies

    $$
    (a+b+c) \mid P(a,b,c)
    $$

    Since $P(a,b,c)$ and $(a+b+c)$ are homogeneous, so $\dfrac{P(a,b,c)}{(a+b+c)}$ is homogeneous of degree $2$. By the fundamental theorem of symmetric polynomials and MUC, we can assume

    $$
    P(a,b,c) = (a+b+c)\left(k_1e_1^2(a,b,c)+k_2e_2(a,b,c)\right)
    $$

    By doing 2 sets of convenient numeric substitutions, we get

    $$
    P(a,b,c) = (a+b+c)\left(e_1^2(a,b,c)-3e_2(a,b,c)\right)
    $$

    In fact, $(e_1^2(a,b,c)-3e_2(a,b,c))$ is irreducible, this can be proven by using MUC with assuming $(e_1^2(a,b,c)-3e_2(a,b,c)) = (\alpha_1 a + \beta_1 b + \gamma_1 c)(\alpha_2 a + \beta_2 b + \gamma_2 c)$ and finding out that no solution exists.

    Problem: Please factorize

    $$
    P(a,b,c) = \left(y^2-z^2\right)(1+x y)(1+x z)+\left(z^2-x^2\right)(1+y z)(1+y x)+\left(x^2-y^2\right)(1+z x)(1+z y)
    $$

    This problem is a little bit tricky, since it is not homogeneous, so a natural approach is to rewrite it into the sum of several homogeneous polynomials:

    \begin{align*}
    P(a,b,c) = & \, \left(y^2-z^2\right)(1+x y)(1+x z)+\left(z^2-x^2\right)(1+y z)(1+y x)+\left(x^2-y^2\right)(1+z x)(1+z y) \\
    = & \, x y z\left ( x\left(y^2-z^2\right)+y\left(z^2-x^2\right)+z\left(x^2-y^2\right)\right) +\left ( \left(y^2-z^2\right)+\left(z^2-x^2\right)+\left(x^2-y^2\right)\right) \\
    & +\left(x(y+z)\left(y^2-z^2\right)+y(z+x)\left(z^2-x^2\right)+z(x+y)\left(x^2-y^2\right)\right) \\
    = & \, x y z\left(x\left(y^2-z^2\right)+y\left(z^2-x^2\right)+z\left(x^2-y^2\right)\right) \\
    & +\left(x(y+z)\left(y^2-z^2\right)+y(z+x)\left(z^2-x^2\right)+z(x+y)\left(x^2-y^2\right)\right)
    \end{align*}

    Then we can follow our common strategy to conquer these $2$ homogeneous polynomials respectively to finish factorizing the main goal $P(a,b,c)$:

    \begin{align*}
    P(a,b,c) = & \, x y z\left(x\left(y^2-z^2\right)+y\left(z^2-x^2\right)+z\left(x^2-y^2\right)\right) \\
    & +\left(x(y+z)\left(y^2-z^2\right)+y(z+x)\left(z^2-x^2\right)+z(x+y)\left(x^2-y^2\right)\right) \\
    = & \, xyz(x-y)(y-z)(z-x) + (x-y)(y-z)(z-x)(x+y+z) \\
    = & \, (xyz+x+y+z)(x-y)(y-z)(z-x)
    \end{align*}

    Some tips

    It is generally recommended to avoid immediately applying formulaic solutions without even thinking when encountering a problem, as taking some time to conduct initial observations can often lead to more effective problem-solving outcomes.

    If I have a question like factorize $x^2+x-6$ over the integer numbers field, will you consider applying the quadric formula $x=\dfrac{-b \pm \sqrt{b^2-4 a c}}{2 a}$ first?

    No (I mean, you can, but, it’s strongly not recommended to do that). Instead, we can do some simple transformations to generate the result easily:

    $$

    x^2+x-6=x^2+3x-2x-6=x(x+3)-2(x+3)=(x+3)(x-2)

    $$

    Or for this problem: Factorize $x^2-28x+195$ over the integer numbers field.

    Probably this one is not as simple as the previous one, because it contains larger numbers and is not obvious to observe anything… But, really?

    As long as you noticed $195=196-1$ and you are familiar with $196=14^2$, then you are able to solve this problem within 10 seconds, look:

    \begin{align*} x^2-28x+195&=x^2-28x+196-1\\&=(x^2-2\times 14x+14^2)-1^2\\&=(x-14)^2-1^2\\&=(x-14-1)(x-14+1)\\&=(x-15)(x-13)\end{align*}

    Factorize $x^2-28x+195$ over the integer numbers field.

    We can also apply the similar method: $0=8\times2a^2-8\times2a^2$

    $$ 64a^4+1 =(8^2a^4 + 8\times2a^2 +1) – 8\times2a^2 = (8a^2+1)^2 – (4a)^2=(8a^2-4a+1)(8a^2+4a+1) $$

    Upon reflection, you may be curious about how I was able to recognize the approach needed to solve these problems. The truth is, I wasn’t born with the knowledge. Rather, I have spent countless hours practicing and mastering various problem-solving techniques, which has allowed me to develop my mathematical intuition. What I want to emphasize is that humans have the ability to cultivate and refine their mathematical intuition (expanding your Maths database) through sufficient training and exposure, because this skill is about memorization and recognition (automatically retrieving or invoking a corresponding frame to solve the problem), etc… Just like developing a specific skill of a neural network through billions of training data… But for humans, the mechanized training process is a tedious and non-efficient process comparatively, since we are not as powerful as computers… However, we still need to practice as long as we aspire to participate in the Mathematical Olympiad or Putnam Maths Competition, these designed competitive mathematics for humans…

    Have you ever encountered a math problem that left you stumped, unable to even begin solving it? Chances are, you will at some point. But why does this happen?

    In competitive mathematics contests, problem setters strive to challenge well-prepared participants who have practiced typical problems extensively. To accomplish this, they must devise “good problems” that are difficult enough to separate the exceptional from the merely competent. These problems often require discovering a clever trick that is not immediately apparent.

    For instance, a problem like $64a^4+1=(64a^4 + 16a^2 +1) -16a^2$ may have been considered challenging in the past, but it has become too familiar to many participants. Therefore, problem setters must continue to raise the bar by increasing the difficulty of their problems.

    However, it’s important to remember that even the most challenging problems in a Mathematics contest are designed to be solved by humans within a limited time frame, so there’s no need to panic. Rest assured, you won’t encounter a problem as difficult as Goldbach’s conjecture, which is a extremely hard question that is yet to be proven, during the contest.

    Now, let’s delve into the Method of Trials and Errors (MTE):

    This approach is useful when your maths knowledge database is not sufficient to cover the problem directly, and you cannot call any existing methods from your database to solve the problem effectively. In such cases, try MTE. As we’ve mentioned earlier, even the most challenging problems in a Mathematics contest are designed to be solved by humans within a limited time frame. The difficulty of a problem may stem from the fact that you haven’t discovered the clever trick or technique that could solve it easily. It’s possible that a simple transformation to your approach could lead to a sudden insight or revelation from your observations that makes the solution obvious.

    For example, here is a very challenging one for you to solve:

    Problem: Please factorize

    $$
    x^8+x^4+1
    $$

    over the integer numbers field.

    At first sight, you may think applying MS is a good approach by letting $y=x^4$ since the relation of $(x^4)^2 = x^8$ is obvious, but after doing that, you would notice $y^2+y+1$ is not factorizable over the real number field as the discriminant is less than zero ($\Delta = 1-4 = -3 < 0$). Then you would apply RRT, and notice this polynomial doesn’t have any linear rational factor, as its degree is $\ge 4$. You may even start checking whether this polynomial is cyclotomic… But through some simple transformations, intuitively, we can do

    \begin{align*}x^8+x^4+1 &= x^8+2x^4+1-x^4 \\&= (x^4+1)^2-(x^2)^2 \\&= (x^4+x^2+1)(x^4-x^2+1) \\&= (x^4+2x^2+1-x^2)(x^4-x^2+1) \\&= \left ((x^2+1)^2-x^2) \right )(x^4-x^2+1)\\&=(x^2-x+1)(x^2+x+1)(x^4-x^2+1)\end{align*}


  • Why I Don’t Use Chinese Social Media Anymore…

    Why I Don’t Use Chinese Social Media Anymore…

    Note: This post is an English adaptation of my original Chinese article. Some parts have been modified for clarity, cultural relevance, or to better fit the English-speaking audience. The original Chinese text is provided on the next page (2nd page) of this post for reference and comparison.

    Preface: Due to identity-related reasons, I will not discuss details related to politically sensitive topics extensively.

    First off, I want to say that I love China and the culture and people there, as it is where I grew up. However, I am not particularly fond of China’s political environment in certain aspects, especially the excessive control over the internet.

    I remember during my junior high school years (around the second or third year (grade 7 or 8), which would be 2017 or 2018), in our ideology and morality class, our textbook (Shanghai Education Edition) mentioned that China is a democratic country and that the Chinese people have the human right to freedom of speech. But we know that’s not entirely the case.

    Suppose you express some sensitive truths about China online or present views that diverge from the official Chinese narrative. In that case, if your comments do not receive much dissemination, the online punishments you might face, ordered from least to most severe, include:

    • Your comments being systematically deleted, or your comments being “swallowed” (meaning it looks like your comments were posted, but in reality, only you can see them, indicating that your comments have been secretly hidden by the system).
    • Apart from comments being deleted or hidden, your account may also be temporarily muted by the system. If the comments you post are more direct or radical, your account might even be permanently banned. Also, since China enforces a real-name system on the internet, once you’re punished online for such sensitive comments, your name will be marked on a system list. This will lead to your account being “specially monitored” on all other Chinese platforms in the future.

    However, once the comments you post online gain a certain level of dissemination (whether intentionally or not), there’s a high probability that you will be summoned to the police station or the public security bureau for questioning (commonly referred to as “being invited for tea,” and this invitation is compulsory). Additionally, the charges against you could be baseless, such as “picking quarrels and provoking trouble” (since this charge is vaguely defined, it’s also known as the “universal charge” or “pocket crime”) or “defamation” (even though you were just stating objective facts), and so on.

    Nevertheless, the Chinese government cannot regulate the internet beyond China’s borders. Therefore, they have launched two types of countermeasures:

    • Full control over the internet information accessible by Chinese citizens within the country includes:
      • Setting up the “Great Firewall” (officially called the “Golden Shield Project“), which aims to thoroughly filter out information considered sensitive by the Chinese authorities from the domestic internet, thereby controlling all online content visible to Chinese netizens (I guess the “wall” uses a blacklist mechanism because when I first purchased my website domain, I had friends in China test it, and they could access it directly from within the country). This leads to a significant portion of Chinese netizens being isolated from the outside internet world, potentially causing some level of cognitive bias. What concerns me most is that due to the existence of the “Great Firewall,” we are unable to efficiently learn or keep up with the technological era, such as Chinese scholars being unable to access foreign forums or academic documents normally (there was a funny official mishap recently, haha, click here), and the recent ChatGPT cannot be used in China at all, etc. (March 10, 2024: Update, a while ago I even set up a VPN with a Raspberry Pi for my family back in China so they could use ChatGPT normally, since around December 2023, all ChatGPT access node IPs used by our ClashX VPN were blocked by OpenAI. Click here to check).

    • Forcefully preventing the publication of information sensitive to the Chinese authorities on the internet outside China includes:
      • In 2015, Chinese authorities employed DDoS attacks (which were not traditional DDoS attacks but utilized Man-on-the-Side Attacks, different from MITM Attacks). In simple terms, Baidu, the largest search engine in China at the time, was injected with malicious JS code, turning all normal internet requests sent by Chinese netizens at that time into targeted malicious traffic access, unwittingly turning them into temporary “puppet machines” for the Chinese side. Some technical details can be viewed here. This was aimed at overseas websites containing sensitive information about China, such as Github (the non-traditional DDoS attack caused the Github website to be paralyzed temporarily) because it hosted repositories containing sensitive information regarding China. Although this attack was not officially acknowledged by the Chinese authorities, the analysis and the bulk of the technical evidence suggest Chinese official involvement. The intent of this attack by Chinese authorities was to deter such websites and consequently force them to remove content sensitive to China.
      • Using human flesh search to locate the individual origin of the information and coercing them to stop the spread through various means of force.

    Now let’s return to the main topic: Why I no longer use Chinese social media?

    After experiencing the following incident, I realized how important the basic human right to freedom of speech is.

    Starting from March 2022, due to the lockdown in Shanghai caused by the pandemic, residents were required to quarantine at home. Actually, for me, a typical homebody, this didn’t seem to have much impact…since I generally don’t like going out unless necessary, such as only going out for school or family dinners, so usually, the virtual world created by electronic devices (phones, computers, game consoles, etc.) is my main activity area.

    In fact, at the beginning of the home quarantine policy, I even felt quite happy because, firstly, all schools in Shanghai (including my high school) shifted from offline to online education, so I didn’t need to go to school, haha. At the same time, I could spend all day in front of my computer at home, with my family around, without worrying about food and drink, which felt really great!

    However, the drawbacks of this policy gradually became apparent.

    (March 10, 2024: Update, actually, I originally wrote a lot about this, but considering my identity-related reasons, I decided to delete them. If you’re curious, you can search online with the keyword: Shanghai quarantine)

    Therefore, in the early morning of May 1, 2022, I posted a singing video in my WeChat Moments (below). I didn’t make it very clear but subtly expressed my complaints through singing. However, not long after, I learned that a few of my WeChat friends had been permanently banned, seemingly for political reasons. At the same time, friends advised me that posting such Moments could be risky and suggested I delete them. Then, about 6 hours after posting, I deleted the video from my Moments. But later, I couldn’t escape the “big gift” – I received a 24-hour ban from WeChat.

    (March 10, 2024: Update, I just re-uploaded the video on YouTube because I realized that the Bilibili video I initially embedded here was forcibly taken down on Bilibili…)

    After that, I no longer wanted to use any Chinese social media, such as WeChat, Zhihu, Bilibili, etc.

    However, since my family and friends, for various reasons, cannot completely detach themselves from these Chinese social media platforms, I also cannot fully separate myself from these Chinese apps.

    But my main battlefield has completely shifted.

    Well, that’s it.

    Pages: 1 2


  • A guide for preparing for the William Lowell Putnam Mathematical Competition

    A guide for preparing for the William Lowell Putnam Mathematical Competition

    The introduction (including the outline and syllabus) of the Putnam Maths Competition:

    Power Putnam Preparation — UT

    William Lowell Putnam Mathematical Competition — AoPS

    The textbooks that could provide a systematic intro study for the Maths Competition:

    数学奥林匹克小丛书

    My apology: Sorry that this textbooks series seems to have no English version.

    If you don’t have any past experience in the Maths Competition like MO (Maths Olympiad), (and neither do I), I strongly recommend you to read this textbooks series, since this is a very popular introductory Maths Competitions textbooks series in China for Maths Competitions beginners (BTW I’m currently reading it and I have to say it is so good!!!). And reading this textbooks series from middle-school volume to high-school volume would help you to build a very solid knowledge system for Maths Competitions, so please don’t feel embarrassed to start from the beginning — reading the middle-school volume part, even though you’re a undergraduate student now like me 🙂

    And after you finish reading the 数学奥林匹克小丛书, here is a harder and more advanced textbooks series for higher level Maths Competitions studies:

    数学奥林匹克命题人讲座

    My apology: Sorry that this textbooks series seems to have no English version either.

    In addition to the above, I would also suggest that you could search on the Internet to check out others’ comments on these textbooks before reading, because that may help you to avoid some bad contents or chapters and could save you a lot of times and energy in reading. Besides that, you should also try to check out the Maths Competitions textbooks with others suggested, because mine recommendation may not the most suitable choice for you, it is all possible…

    In short, please try to make the best textbook choice possible before you start slogging away, because that could help you to approach an efficient study pace and accelerate your progress indeed.

    The exercise books for preparing the Putnam Maths Competition:

    Resources for Putnam Problems — UIUC

    Talent, training and direction are the key factors to become a master.

    So keep practicing!

    One more thing, if you find yourself struggling with studying the Maths Competitions contents extremely hard, you better:

    • Keep going (maybe this part is just that tough?)
    • Get another textbook (maybe the textbook you are reading right now does not fit you?)
    • Quit if necessary (it is quite normal and there is no need to feel disappointed with yourself because maybe your talent is in the other fields? So it would be more wise for you to stop wasting time on it and try to find the area that you’re interested in)

    And…Good luck, my friend!


  • Why mathematicians choose “A linear subspace must have the additive identity” as one of the condition of the linear subspace but not “A linear subspace must be nonempty” ?

    Why mathematicians choose “A linear subspace must have the additive identity” as one of the condition of the linear subspace but not “A linear subspace must be nonempty” ?

    When I first meet that condition (A linear subspace must have the additive identity) in the book of “Linear algebra done right”, I felt it could be derived from “A linear subspace must be nonempty” + “A linear subspaces is closed under linear operations”, which indicated that “A linear subspace must be nonempty” is a more fundamental condition than “A linear subspace must have the additive identity”. So at that time, I believed that the replacement would definitely be correct, but I didn’t really think through why mathematicians choose that not-most-fundamental one as a condition until I was introduced to Modern Algebra…

    From the perspective of Modern Algebra, “A linear subspace must have the additive identity” is a more fundamental condition: Let me pull out a thing with the similar algebraic structure as an example — submonoid, its conditions also include “A submonoid must have the binary-operation identity of the monoid it is contained in”, but here we cannot replace this with “A submonoid must be nonempty”:

    Because let we construct a submonoid $(X,*)$, where

    $$ X = \left \{ \begin{bmatrix} x & 0\\\ 0 & 0 \end{bmatrix} \mid x \in \mathbb{R} \right \} \subset R^{2 \times 2} = \left\{ \begin{bmatrix} a & b\\\ c & d \end{bmatrix} \mid a,b,c,d \in \mathbb{R} \right \} $$

    And $*$ is the matrix multiplication.

    If we choose “A submonoid must be nonempty” not “A submonoid must have the binary-operation identity of the monoid it is contained in” as the condition, then $\begin{bmatrix} 1 & 0\\ 0 & 0 \end{bmatrix}$ would be the matrix multiplicative identity of the submonoid $(X,*)$, but this would conflict with the matrix multiplicative identity of the monoid $(R^{2 \times 2},*)$ which it is contained in, which is the $\begin{bmatrix} 1 & 0\\ 0 & 1 \end{bmatrix}$. Accordingly, “A submonoid must have the binary-operation identity of the monoid it is contained in” is proved to be a correct condition.

    Now, let’s get back to the topic of subspaces: Though the algebraic structure of the linear space allows the replacement of “A linear subspace must have the additive identity” with “A linear subspace must be nonempty” for the linear subspaces, considering other algebraic structures, it would be way more convenient if mathematicians use a generalized condition, and that’s why I think they finally choose “A linear subspace must have the additive identity” for the linear subspace, but not “A linear subspace must be nonempty”.


  • A simple physical approach to understand the Taylor series

    A simple physical approach to understand the Taylor series

    I still remember the first time that I meet the concept of Taylor series was in one AP calculus textbook. It’s kind of a pity that the AP calculus textbook I was reading at that time didn’t give any further explanation about why and how this formula came up, etc. So I just questioned myself about its formation and finally I did figured it out at that time by using the knowledge I’ve learned in Physics. I guess you may wonder why wouldn’t I just search on the Internet and see the proof of Taylor series, in fact, I did do that, but didn’t work for me at that point, since I lack too much Maths knowledge to understand that proof. Therefore I found a new way to help myself understand the Taylor series at that time.

    Firstly, let us derive the displacement formula with acceleration in one dimension (so we use the scalars here instead of vectors):

    $$ \begin{aligned} \frac{\mathrm{d} x}{\mathrm{d} t} &=v_t \\ \\ \mathrm{d} x&=v_t \times \mathrm{d} t \\ \int_{t_0}^{t} \mathrm{d} x&= \int_{t_0}^{t}\left(v_t \right) \ \mathrm{d} t \\ x_t&=\int_{t_0}^{t}\left(v_t \right) \ \mathrm{d} t + x_0 \end{aligned} $$

    Similarly, we can use the same deriving method of:

    $$ \frac{\mathrm{d} x}{\mathrm{d} t} = v_t \quad \Rightarrow \quad x_t=\int_{t_0}^{t}\left(v_t \right) \ \mathrm{d} t + x_0 $$

    To get:

    $$ \frac{\mathrm{d} v}{\mathrm{d} t} = a_t \quad \Rightarrow \quad v_t=\int_{t_0}^{t}\left(a_t \right) \ \mathrm{d} t + v_0 $$

    Then we substitute $v_t$ into $x_t$ , we would have:

    $$ x_t=\int_{t_0}^{t}\left(\int_{t_0}^{t}\left(a_t \right) \ \mathrm{d} t \right)\ \mathrm{d} t + v_0(t-t_0) + x_0 \tag{1} $$

    Note that since $a_t$ is a constant (In fact, this is related to the Principle of least action in Physics: We assume that the accleration of any system must be a constant,
    in other words: $\dfrac{\mathrm{d}^3 (x)}{(\mathrm{d} t)^3} = 0$ ), therefore we could get our displacement formula with acceleration:

    $$ x_t=\dfrac{a_t(t-t_0)^2}{2}+v_0(t-t_0)+x_0 $$

    But the problem is: What if $a_t$ is not a constant anymore (And that situations do happen a lot in real life), for example, have you heard about presence of jerk ( $j_t =\dfrac{\mathrm{d} a}{\mathrm{d} t}$ ) before?

    Then we need to deal with the equation $(1)$ again, through using the same deriving method stated above, we could get:

    $$ \frac{\mathrm{d} a}{\mathrm{d} t} = j_t \quad \Rightarrow \quad a_t=\int_{t_0}^{t}\left(j_t \right) \ \mathrm{d} t + a_0 $$

    Next we substitute $a_t$ into $x_t$ , we can have:

    $$ x_t=\int_{t_0}^{t}\left(\int_{t_0}^{t}\left(\int_{t_0}^{t}\left( j_t\right) \ \mathrm{d} t \right) \ \mathrm{d} t \right) \ \mathrm{d} t + \dfrac{a_0(t-t_0)^2}{2}+ v_0(t-t_0)+ x_0 $$

    And using some derivatives form to substitute in that equation:

    $$ x_t=\int_{t_0}^{t}\left(\int_{t_0}^{t}\left(\int_{t_0}^{t}\left( j_t\right) \ \mathrm{d} t \right) \ \mathrm{d} t \right) \ \mathrm{d} t + \dfrac{\ddot{x}_t|_{t=t_0}(t-t_0)^2}{2!}+\dfrac{\dot{x}_t|_{t=t_0}(t-t_0)}{1!}+ \dfrac{x_{t=t_0}}{0!} $$

    $$ \text{Where } \dot{x}_{t} = \dfrac{\mathrm{d} x}{\mathrm{d} t}, \ddot{x}_{t} =\dfrac{\mathrm{d}^2 x}{(\mathrm{d} t)^2} \text{ and so on.} $$

    Now I believe that you could clearly see the presence of the Taylor series in this equation right?

    Therefore if we keep iterating using the same method and let $x_{t}=f(t)$ , we would be able to get the real Taylor series formula:

    $$ f(t)=\sum_{n=0}^{\infty }\left( \frac{f^{(n)}(t)|_{t=t_0}}{n!} \left(t-t_0\right)^{n}\right) $$

    This also indicate us the essence of Taylor series: Knowing all of its $n$th ($n$ is natural numbers) derivatives value at one point is equivalent to Knowing the primitive expression of a function.


  • Intro to the Colemak keyboard layout

    Intro to the Colemak keyboard layout

    Nowadays, most people are using the QWERTY keyboard layout, because the QWERTY is the default the keyboard layout for nearly all the computers.

    But is the default one the best? Probably not…

    Here is a heatmap for the QWERTY keyboard layout (from Keyboard Heatmap Visualization), and where the color depth represents the frequency of the key is pressed during the daily typing.

    The QWERTY layout was designed in the 19th century. Colemak is a modern alternative to the QWERTY and Dvorak layouts, designed for efficient and ergonomic touch typing in English. Learning Colemak is a one-time investment that will allow you to enjoy faster and pain-free typing for the rest of your life. Colemak is now the 3rd most popular keyboard layout for touch typing in English, after QWERTY and Dvorak and comes pre-installed on Mac and Linux systems. — www.colemak.com

    And here is the heatmap of the Colemak keyboard layout (from Keyboard Heatmap Visualization).

    Two heatmaps’ contrast shows that the Colemak keyboard layout seems to have a more concentrated typing area for both hands, therefore using Colemak layout could increase the efficiency of typing. BTW, there are still many other keyboard layouts, but I’ll not introduce here, you can check them and their heatmaps out through visiting the Keyboard Heatmap Visualization.

    Then how would I be able to switch my keyboard layout to the Colemak one? And can I still keep the QWERTY because I want to switch back sometimes?

    Of course!

    For Windows OS: Since it does not have build-in Colemak layout, so we can visit Colemak, then click on the “Download” under the “Navigation” in the left column. Once the download is ready, you could open the folder, and click on the “setup.exe” file. And when the setup process is finished, you can now switch between the Colemak and QWERTY keyboard easily by pressing the shortcut: ⊞ Win + Space bar.

    For Mac OS: Luckily, Mac OS has many build-in keyboard layouts including Colemak and Dvorak, etc. So you can directly visit System Preference -> Keyboard -> Input Sources -> + -> English -> Colemak -> Add, then the setup is done. you can now switch between the Colemak and QWERTY keyboard layout easily by pressing the shortcut: Ctrl + Space bar.

    How can I practice and be familiar with this new keyboard layout?

    I highly recommend this website for practicing typing: www.keybr.com, because in this website, you could not only choose different keyboard layouts, but also customize the typing difficulty and certain typing keys that you want to practice. And you could always see the keyboard layout that you choose when practicing on this website, it is so helpful right?

    I also want to mention that I suggest you better not forget the use of QWERTY, because now, most people are still using it, not Colemak or other keyboard layouts. And if you do so unfortunately, you would probably not able to use others’ Window-OS-computer in the future.


  • My experience of U.S. Visa interview in Guangzhou China

    My experience of U.S. Visa interview in Guangzhou China

    Note: This post is an English adaptation of my original Chinese article (URL). Some parts have been modified for clarity, cultural relevance, or to better fit the English-speaking audience. The original Chinese text is provided on the next page (2nd page) of this post for reference and comparison.

    Just noting down my experience with the face-to-face interview at the American Consulate in Guangzhou today:

    We scheduled the interview for 9:15 on July 7, 2022. My DS-160 indicated Shanghai because that’s what I selected online when filling out the form. However, due to lockdown policies, the U.S. Consulate in Shanghai was closed, so I had to book the appointment in Guangzhou instead, which is why the appointment confirmation form shows Guangzhou. The day before going to Guangzhou, I realized the address on my DS-160 was different from the one on the appointment confirmation form and thought I had to refill it and reschedule (since the DS-160 can’t be changed, only resubmitted). But after checking the official website, I found out this discrepancy was not a problem. Phew, what a relief, haha.

    Today, we first stored our backpacks and cellphones at a newsstand near the entrance of the consulate (initially, while we were waiting for the traffic light, someone from the newsstand told us we could store our items there. At first, I was worried about the risk since it seemed a bit informal, but my companion reassured me that there was no storage inside the consulate and that they had seen tips on Zhihu about storing items at nearby newsstands, so I was reassured). Then we took the necessary documents and went inside the consulate.

    First, we queued up, and during this, a staff member would ask about the time we had scheduled for our interview and would need to see our appointment confirmation form (as it displays the scheduled time). Next, another staff member would ask us to take out our passports and I-20 forms (you need to remove your passport from its cover and hold it together with the I-20), then she would check the information and stick a barcode on the back of the passport. Then we went through security, where everyone was required to put their materials into a bag and then put it through the X-ray machine. Meanwhile, we walked through a metal detector. Oh, and the staff told me to expose my ears, probably because my hair was too long and covered them, haha. But after passing through security, I let my hair down again, and it didn’t affect the interview process. I suppose they just needed to make sure you aren’t wearing any earphones at the security checkpoint. After that, we queued up for the formal interview area. Before entering, a staff member would tell you which window to go to (but actually changing windows wouldn’t really affect anything, as it was just to maintain order and balance the queue lengths at each window). I was initially assigned to window 6, but there were many people ahead of me, so I switched to window 5. However, this wasn’t actually the moment for the formal interview yet; it was actually just for checking the documents. The staff member at the window asked for my I-20 and passport, reviewed them, then returned them to me and directed me to another window to get my fingerprints taken. There, I encountered an American staff member who first asked me to scan the back of my passport (where the barcode was attached) at the window, then asked me to place the four fingers of my left hand, excluding the thumb, on a small scanner emitting a green light to take the fingerprints, followed by the same with my right hand, and finally both thumbs together. After that, I was directed to another window to start the actual interview. The staff there would also tell you which window to approach.

    Then, at window 15 (where one of my companions was just ahead of me), I met the visa officer (also an American):

    The visa officer looked at my passport and I-20 and didn’t check anything else. Then he asked me four questions sequentially:

    1. What’s your major?
    2. Who will be your sponsor?
    3. What do they do?
    4. Have you been to the U.S. before?

    After that, he took my passport and gave me two small slips, one pink and one yellow:

    These two slips indicated that my visa had been approved and that my passport and visa would be mailed back to me (though I could also choose to pick them up myself). Then we left, showed our storage claim tickets at the newsstand, retrieved our books and cellphones, and paid a storage fee of 30 yuan.

    Pages: 1 2


  • Summation by Parts (Abel Transformation)

    Summation by Parts (Abel Transformation)

    Note: This post is an English adaptation of my original Chinese article (URL). Some parts have been modified for clarity, cultural relevance, or to better fit the English-speaking audience. The original Chinese text is provided on the next page (2nd page) of this post for reference and comparison.

    Summation by Parts (Abel Transformation)

    $$\displaystyle {\sum^{n}_{i=1}}(a_i b_i)=\sum^{n-1}_{i=1}\left (\sum^{i}_{j=1}\left ( (b_{j}\right ) (a_{i}-a_{i+1})) \right ) + \sum^{n}_{i=1}\left (b_{i} a_{n} \right )$$

    Proof of Summation by Parts Formula

    Algebraic Proof

    $$\begin{align} &\displaystyle {\sum^{n}_{i=1}}(a_i b_i) \\ =& \sum^{n}_{i=1} \left ((a_i)\left ( -\sum^{i-1}_{j=1}b_j + \sum^{i}_{j=1}b_j\right )\right) \\ =& + a_1 \color{blue}{\sum^{1}_{j=1}b_j} – a_2 \color{blue}{\sum^{1}_{j=1}b_j} \\& + a_2 \color{red}{\sum^{2}_{i=1}b_j} – a_3 \color{red}{\sum^{2}_{i=1}b_j} \\ &+\cdots \\ &+ a_{n-2} \color{green}{\sum^{n-2}_{i=1}b_{j}}- a_{n-1} \color{green}{\sum^{n-2}_{i=1}b_{j}} \\ &+ a_{n-1} \color{purple}{\sum^{n-1}_{i=1}b_{j}} – a_{n} \color{purple}{\sum^{n-1}_{i=1}b_{j}} \\ & + a_{n} \color{brown}{{\sum^{n}_{i=1}b_{j}}} \\ =&+ (a_1 – a_2) \color{blue}{\sum^{1}_{j=1}b_j} \\&+(a_2 – a_3) \color{red}{\sum^{2}_{j=1}b_j} \\&+ \cdots \\&+ (a_{n-2} – a_{n-3}) \color{green}{\sum^{n-2}_{j=1}b_j} \\&+ (a_{n-1} – a_{n-2}) \color{purple}{\sum^{n-1}_{j=1}b_j} \\&+ a_{n} \color{brown}{{\sum^{n}_{i=1}b_{j}}} \\=& + \sum^{1}_{j=1}\left (b_j(a_1 – a_2) \right ) \\&+ \sum^{2}_{j=1}\left ( b_j(a_2 – a_3) \right ) \\&+ \cdots \\&+ \sum^{n-2}_{j=1}\left ( b_j(a_{n-2} – a_{n-3})\right ) \\&+ \sum^{n-1}_{j=1}\left ( b_j(a_{n-1} – a_{n-2})\right ) \\&+ \sum^{n}_{i=1}(b_{j}a_{n}) \\=& \sum^{n-1}_{i=1}\left (\sum^{i}_{j=1}\left ( (b_{j}\right ) (a_{i}-a_{i+1})) \right ) + \sum^{n}_{i=1}\left (b_{i} a_{n} \right )\end{align}$$

    $\Box$

    Geometric Proof

    天才“阿贝尔”的灵感:梯形面积计算,直观地理解“阿贝尔公式” —— by Bilibili uploader:究尽数学

    $\Box$

    Problem

    1. Please apply “Summation by Parts” to prove the sum of squares of $n$ natural numbers formula: $1^2+2^2+ \cdots + (n-1)^2 +n^2 =\dfrac{2n^3+3n^2+n}{6}$

    Answer

    Reveal

    1. Proof $$\begin{align} \quad &1^2+2^2+ \cdots + (n-1)^2 +n^2 = \displaystyle \sum ^{n}_{i=1}i^2 \\=& \sum^{n-1}_{i=1}\left (\sum^{i}_{j=1}j(i-(i+1)) \right ) + n \sum^{n}_{i=1}i \\=&-\sum^{n-1}_{i=1}\left ( \sum^{i}_{j=1}j \right )+ n \sum^{n}_{i=1}i \\=& -\sum^{n-1}_{i=1}\left (\frac{(1+i)i}{2}\right ) + n \sum^{n}_{i=1}i \\=& -\frac{\displaystyle \sum^{n-1}_{i=1}i^2+\sum^{n-1}_{i=1}i}{2}+n \sum^{n}_{i=1}i \\=& -\frac{\displaystyle \sum^{n}_{i=1}i^2+\sum^{n-1}_{i=1}i-n^2}{2}+n \sum^{n}_{i=1}i \\\implies & \sum ^{n}_{i=1}i^2= -\frac{\displaystyle \sum^{n}_{i=1}i^2+\sum^{n-1}_{i=1}i-n^2}{2}+n \sum^{n}_{i=1}i \\ \implies & 3\sum ^{n}_{i=1}i^2= -\sum^{n-1}_{i=1}i+n^2+2n \sum^{n}_{i=1}i \\ \implies & \sum ^{n}_{i=1}i^2=\frac{-\frac{n(n-1)}{2}+n^2+(n+1)n^2}{3} \\ \implies & \sum ^{n}_{i=1}i^2=\frac{-n^2+n+2n^2+2n^3+2n^2}{6} \\ \implies & \sum ^{n}_{i=1}i^2=\frac{2n^3+3n^2+n}{6} \end{align}$$

    $\Box$

    Note:If you made the following transformation when solving the problem 1:

    $$-\sum^{n-1}_{i=1}\left ( \sum^{i}_{j=1}j \right )=-\sum^{n-1}_{i=1}i^2+n\sum^{n-1}_{i=1}i$$

    then you will transform it back to the original state of expression.

    Pages: 1 2


  • Some advice for the new learners to Python

    Some advice for the new learners to Python

    Note: This post is an English adaptation of my original Chinese article (URL). Some parts have been modified for clarity, cultural relevance, or to better fit the English-speaking audience. The original Chinese text is provided on the next page (2nd page) of this post for reference and comparison. I hope this translation bridges the understanding for those interested in computing concepts across different languages and cultures 🙂

    In ‘Learn Python the Hard Way’, it is advised that beginners should not use the IDLE that comes with Python. By following this advice, newbies will download other IDEs such as Sublime Text, Atom, Visual Studio Code, etc., and then set up the Python environment, install various related plugins, and subsequently learn some related shell commands in the CLI terminal to open and run Python files.

    However, from my personal perspective, although this advice helps Python beginners to better understand how Python files are run in a CLI interaction mode and accelerates learning efficiency with the help of various plugins, it also aids them in learning some shell commands and understanding some IDEs or their processes of running Python and their relationship with Python. On the other hand, starting off relying on various IDE features such as auto-completion, syntax hints, and even automatic formatting, could lead to Python beginners not having a solid foundation in learning Python. Additionally, many Python beginners start learning Python mainly for programming and might not need to initially delve into certain computer science concepts. Personally, I prefer to place this knowledge learning later since when I self-taught Python as a child, I found the initial “setting up a Python environment in an IDE” to be very troublesome as I didn’t understand what “environment setup” really meant. I simply followed the steps in the books or videos, like a thoughtless robot, and ended up failing anyway. It was very frustrating, especially since I was young and clueless about how to fix errors, leading me to give up in the end.

    To give another example, a first-grade math curriculum wouldn’t start with teaching Peano’s axioms or mathematical logic, let alone mathematical analysis, as these are too abstruse. Human cognitive development is not simply from the bottom to the top; neither is it linear — it might start with understanding logarithmic functions before moving to exponential ones. Thus, we should first let children grasp the simplest and most intuitive knowledge, like memorizing 1+1=2, before gradually delving into deeper and higher levels of mathematics. I believe this learning approach is most effective. After all, for an intelligent person, the method of learning is as important as the ability to learn. We need to choose the right method of learning for our current ability to achieve the most efficient progress.

    Therefore, I think beginners could actually start with Python’s own IDLE, as it doesn’t have any fancy stuff; just create a file, type in the code according to Python syntax, save it, and then run it, with the output displaying in the IDLE shell window. The steps are straightforward and entirely in line with most beginners’ wishes.

    However, I don’t support the long-term use of IDLE for learning Python code. As learning progresses, I believe Python learning requires some plugin support, such as syntax and format checking, and various debugging tools to enhance learning efficiency. Sticking with IDLE could cement poor formatting and other bad programming habits, which could become troublesome to change later. For example, when I was younger, I used to place my left hand on ‘asdf’ and my right hand fingers on ‘hjkl’, which I found odd due to the semicolon ‘;’ placement. This habit formed, and later, I realized it was inconvenient as my index fingers would cross and collide, and my right pinky would become very tired, forcing myself to correct this habit later, which was quite challenging. It’s better to start with the correct methods from the beginning, isn’t it? (While learning ability is important, choosing the right direction of effort is equally crucial).

    So, you could consider that moving from IDLE to an IDE is a step up for Python learners. IDLE can be seen as a simple environment just for beginners to meet basic programming needs, while an IDE is an environment for learners to truly understand and learn programming.

    After all, once learners reach a certain level, I believe they won’t always be satisfied with the requirements of the programming language alone; they’ll also need to delve into other related computer science knowledge. So, I think if beginners have roughly mastered the basics of Python and have become a little proficient, they can then switch from IDLE to an IDE for further learning. Because an IDE is really convenient, with the support of various plugins, the efficiency of writing code can be greatly improved, and it can even motivate and help learners to understand more about the underlying computer science. After I successfully set up a Python environment with Atom, I started searching for many related Python plugins such as Hydrogen, Kite, Linter-flake8, Minimap, and Python-runner (I think that’s the name? Anyway, it can display output directly in Atom on Mac, but can’t handle input), and also learned about different shell language syntax, gaining some one-sided understanding of different operating systems and various interaction methods (CLI or GUI), and even thought about playing with Raspberry Pi, setting up my own server, creating a blog site, writing automation scripts, or even making my own games (if possible, I would also like to try hacking for fun).

    Pages: 1 2