Mathematics of Madoka Magica: Difference between revisions

From Puella Magi Wiki
Jump to navigation Jump to search
(Added a solution for one of the math problems posed in Rebellion)
(→‎Question 4: Replaced non-TeX with TeX and minor cleanup)
(8 intermediate revisions by 4 users not shown)
Line 13: Line 13:


*<math>a \equiv 6 \pmod{14}</math>;
*<math>a \equiv 6 \pmod{14}</math>;
*<math>b \equiv 1 \pmod{14}</math>;
*<math>b \equiv 1 \pmod{14}</math>.
*<math>x \equiv r \pmod{14}</math>.


*<math>\displaystyle{x^2 - 2ax + b = 0}</math> is equivalent to
*<math>\displaystyle{x^2 - 2ax + b = 0}</math> implies


*<math>(x^2 - 12x + 1) \equiv 0 \pmod{14}</math>
*<math>x^2 - 12x + 1 \equiv 0 \pmod{14}</math>


*<math>x^2 + 2x + 1 \equiv 0 \pmod{14} </math> (because <math>-12 \equiv 2 \pmod{14}</math>)
*<math>x^2 + 2x + 1 \equiv 0 \pmod{14} </math> (because <math>-12 \equiv 2 \pmod{14}</math>)
Line 24: Line 23:
*<math>(x + 1)^2 \equiv 0 \pmod{14} </math>
*<math>(x + 1)^2 \equiv 0 \pmod{14} </math>


*<math> (x + 1) \equiv 0 \pmod{14} </math> (because 14 is square-free)
*<math> x + 1 \equiv 0 \pmod{14} </math> (because 14 is square-free)


*<math> x \equiv 13 \pmod{14}</math> (because <math> -1 \equiv 13 \pmod{14}</math>).
*<math> x \equiv 13 \pmod{14}</math> (because <math> -1 \equiv 13 \pmod{14}</math>).
Line 69: Line 68:
The problem can be solved with the [[wikipedia:binomial theorem|binomial theorem]]:
The problem can be solved with the [[wikipedia:binomial theorem|binomial theorem]]:


For a, b not equal to 0 and nonnegative integer p it holds that:
For <math>a, b</math> not equal to <math>0</math> and nonnegative integer <math>p</math> it holds that:


<!--(a + b)^p = sum (for k from 0 to p) of (p choose k) a^(p-k) b^k-->[[file:Q2 binomial theorem.png]]
<math>\displaystyle (a + b)^p = \sum_{k=0}^{p} \binom{p}{k} a^{p-k} b^k</math>


where the binomial coefficient <math>\binom{p}{k}</math> is the integer <!-- p(p-1)...(p-k+1)/(k(k-1)...1) --> [[file:Q2 binomial coefficient.png]] for 0 k p.
where the binomial coefficient <math>\binom{p}{k}</math> is the integer <math>\frac{p(p - 1) \cdots (p - k + 1)}{k(k-1) \cdots 1} </math> for <math>0 \leq k \leq p</math>.


Therefore,
Therefore,


<!--(1 + n)^p = sum (for k from 0 to p) of (p choose k) n^k-->[[file:Q2 equation 1.png]]
<math>\displaystyle (1 + n)^p = \sum_{k=0}^{p} \binom{p}{k} n^k</math>


and
and


<!-- (1+n)^p - n^p - 1 = sum (for k from 1 to p-1) of (p choose k) n^k -->[[file:Q2 equation 2.png]]
<math>\displaystyle (1 + n)^p - n^p - 1 = \sum_{k = 1}^{p - 1} \binom{p}{k} n^k</math>


since <math>\binom{p}{0} = \binom{p}{p} = 1</math>.
since <math>\binom{p}{0} = \binom{p}{p} = 1</math>.
Line 87: Line 86:


It holds that <math>\binom{p}{1} = p </math>.
It holds that <math>\binom{p}{1} = p </math>.
Since p is a prime number, the factor p in <math>\binom{p}{k}</math> is not divisible by k, k-1,...,2 for 2 k p-1.
Since <math>p</math> is a prime number, the factor <math>p</math> in <math>\binom{p}{k}</math> is not divisible by <math>k, k-1,\ldots, 2</math> for <math>2 \leq k \leq p-1</math>.
Therefore, p divides <math>\binom{p}{k}</math> for 1 k p-1.
Therefore, <math>p</math> divides <math>\binom{p}{k}</math> for <math>1 \leq k \leq p-1</math>.


Since each summand on the right side is divisible by p, the whole sum, i.e. the left side is also divisible by p.
Since each summand on the right side is divisible by <math>p</math>, the whole sum, i.e. the left side is also divisible by <math>p</math>.


===Question 3===
===Question 3===
[[file:Episode One Math Q3.jpg|thumb|Episode one Math question 3]]
[[file:Episode One Math Q3.jpg|thumb|Episode one Math question 3]]


 
Find the integer solutions <math>(a,b)</math> with <math>(a^3 + a^2 - 1) - (a - 1)b = 0 \,</math>.
Find the integer solutions (a,b) with <math>(a^3 + a^2 - 1) - (a - 1)b = 0 \,</math>


'''Solution:'''
'''Solution:'''
Line 113: Line 111:
<math>(a - 1)(a^2 + 2a - b + 2) = -1 \,</math>
<math>(a - 1)(a^2 + 2a - b + 2) = -1 \,</math>


a, b are integers, therefore the factors a - 1 and <math>a^2 + 2a - b + 2 \,</math> are integers too. Since the product is -1, one of the factors must be equal to -1, the other to 1.
<math>a, b</math> are integers, therefore the factors <math>a - 1</math> and <math>a^2 + 2a - b + 2 \,</math> are integers too. Since the product is <math>-1</math>, one of the factors must be equal to <math>-1</math>, the other to <math>1</math>.


If <math>a - 1 = -1</math> then a = 0 and from <math>a^2 + 2a - b + 2 = 1 \,</math> we obtain b = 1.
If <math>a - 1 = -1</math> then <math>a = 0</math> and from <math>a^2 + 2a - b + 2 = 1 \,</math> we obtain <math>b = 1</math>.


If  <math>a - 1 = 1</math> then a = 2 and <math>a^2 + 2a - b + 2 = -1 \,</math> implies that b = 11.
If  <math>a - 1 = 1</math> then <math>a = 2</math> and <math>a^2 + 2a - b + 2 = -1 \,</math> implies that <math>b = 11</math>.


There are two integer solutions: <math>(a,b) = (0,1) \,</math> or <math>(a,b) = (2,11) \,</math>.
There are two integer solutions: <math>(a,b) = (0,1) \,</math> or <math>(a,b) = (2,11) \,</math>.
Line 129: Line 127:
<math> b = \frac{a^3 + a^2 - 1}{a - 1} = a^2 + 2a + 2 + \frac{1}{a - 1} \,</math>
<math> b = \frac{a^3 + a^2 - 1}{a - 1} = a^2 + 2a + 2 + \frac{1}{a - 1} \,</math>


As <math>b \in \Z</math> is an integer, <math> a^2 + 2a + 2 + \frac{1}{a - 1} \in \Z</math>, so <math> \frac{1}{a - 1} \in \Z</math>
As <math>b \in \mathbb{Z}</math>, <math> a^2 + 2a + 2 + \frac{1}{a - 1} \in \mathbb{Z}</math>, so <math> \frac{1}{a - 1} \in \mathbb{Z}</math>


As <math> 1 </math> has only two factors: <math>1</math> and <math>-1</math>,  
As <math> 1 </math> has only two factors: <math>1</math> and <math>-1</math>,  
Line 139: Line 137:
Substituting the above values into the equation to find the corresponding <math> b </math>, we have  
Substituting the above values into the equation to find the corresponding <math> b </math>, we have  


<math> (a, b) = (0, 1) \,</math> or <math> (2, 11) \,</math>
<math> (a, b) = (0, 1) \,</math> or <math> (2, 11) </math>.


===Question 4===
===Question 4===
[[file:Episode One Math Q4.jpg|thumb|Episode one Math question 4]]
[[file:Episode One Math Q4.jpg|thumb|Episode one Math question 4]]
Given [[file:Math episode one question four.png]],
Given <math>\displaystyle F(x) = \frac{4x + \sqrt{4x^2 - 1}}{\sqrt{2x + 1} + \sqrt{2x-1}}</math>,


find the sum of <math> \displaystyle{F(1)+F(2)+F(3)+...+F(60)}</math>.
find the sum of <math> \displaystyle{F(1)+F(2)+F(3)+...+F(60)}</math>.
Line 152: Line 150:
Simplying the fraction:
Simplying the fraction:


Notice that for any variables a & b:
Notice that for any variables <math>a</math> and <math>b</math>:


<math> \displaystyle{(a-b)(a+b) = a^2-b^2} </math>.   
<math> \displaystyle{(a-b)(a+b) = a^2-b^2} </math>.   
Line 206: Line 204:
<math> \displaystyle{ b^3 = 1^\frac{3}{2}, 3^\frac{3}{2}, 5^\frac{3}{2}, 7^\frac{3}{2}, 9^\frac{3}{2}, \ldots, 119^\frac{3}{2} } </math>;
<math> \displaystyle{ b^3 = 1^\frac{3}{2}, 3^\frac{3}{2}, 5^\frac{3}{2}, 7^\frac{3}{2}, 9^\frac{3}{2}, \ldots, 119^\frac{3}{2} } </math>;


Taking the sum over <math> \displaystyle{F(x)} </math> for <math> \displaystyle{x} </math> between 1 and 60, observe that the majority of the terms in <math> \displaystyle{a^3} </math> and <math> \displaystyle{b^3} </math> cancel out, leaving:
Taking the sum over <math> \displaystyle{F(x)} </math> for <math> \displaystyle{x} </math> between <math>1</math> and <math>60</math>, observe that the majority of the terms in <math> \displaystyle{a^3} </math> and <math> \displaystyle{b^3} </math> cancel out, leaving:


<math>
<math>
Line 216: Line 214:
</math>
</math>


Thus, sum of <math> \displaystyle{F(x)} </math> for <math> \displaystyle{x} </math> between 1 and 60 is 665.  The solution can be generalized as equal to <math> \displaystyle{\frac{a(x_{max}^3) - b(x_{min}^3)}{2}} </math>. Where <math> \displaystyle{a} </math> and <math> \displaystyle{b} </math> are interpreted as functions of <math> \displaystyle{x} </math>.
Thus, sum of <math> \displaystyle{F(x)} </math> for <math> \displaystyle{x} </math> between <math>1</math> and <math>60</math> is <math>665</math>.  The solution can be generalized as equal to <math> \displaystyle{\frac{a(x_{\max}^3) - b(x_{\min}^3)}{2}} </math>. Where <math> \displaystyle{a} </math> and <math> \displaystyle{b} </math> are interpreted as functions of <math> \displaystyle{x} </math>.


==Episode 8==
==Episode 8==
Line 347: Line 345:
== Movie 3: Rebellion ==
== Movie 3: Rebellion ==
[[File:Rebellion Math 1.jpg|thumb]]
[[File:Rebellion Math 1.jpg|thumb]]
=== Problem A ===
The first problem posed, (a), was to calculate <math>\int\frac{\arcsin^3x}{\sqrt{1-x^2}}\,dx</math>
The first problem posed, (a), was to calculate <math>\int\frac{\arcsin^3x}{\sqrt{1-x^2}}\,dx</math>


Line 354: Line 355:


Undoing the substitution we get the solution: <math>\frac{1}{4}\arcsin^4x + C</math>
Undoing the substitution we get the solution: <math>\frac{1}{4}\arcsin^4x + C</math>
=== Problem B ===
The second problem, (b), was to calculate <math>\int x\ln(x^2+y)\,dx</math>
In order to solve it we'll assume <math>\displaystyle y</math> to be a parameter independent from the value of <math>\displaystyle x</math> and <math>\displaystyle\ln x</math> to denote the natural logarithm of <math>\displaystyle x</math>.
Performing the substitution <math>u=x^2+y\longrightarrow\frac{du}{dx}=2x</math> we can rewrite the integral as <math>\frac{1}{2}\int\ln u\,du</math>
This can be solved integrating by parts: <math>\frac{1}{2}\int \ln u\,du=\frac{1}{2}(u\ln u - \int1\,du)=\frac{1}{2}u(\ln u - 1)</math>
And the final answer in obtained undoing the substitution: <math>\frac{1}{2}(x^2+y)\ln((x^2+y)-1)+C</math>
=== Problem C ===


One of the problems posed, (c), was to calculate <math>\int\frac{x^3+2x^2+10x}{x^2-x+1}\, dx</math>.
One of the problems posed, (c), was to calculate <math>\int\frac{x^3+2x^2+10x}{x^2-x+1}\, dx</math>.
Line 369: Line 383:


<math>\int\frac{x^3+2x^2+10x}{x^2-x+1}\, dx = \frac{1}{2}x^2 + 3x + 6\ln(x^2-x+1) + 2\sqrt{3} \arctan \frac{2x-1}{\sqrt{3}} + C</math>
<math>\int\frac{x^3+2x^2+10x}{x^2-x+1}\, dx = \frac{1}{2}x^2 + 3x + 6\ln(x^2-x+1) + 2\sqrt{3} \arctan \frac{2x-1}{\sqrt{3}} + C</math>
==Fan Gallery ==
{{fanart}}
<gallery>
File:Yuri math.jpg|the value of purity
</gallery>

Revision as of 01:04, 1 February 2021

Homura said that she uses applied statistics in witch hunts

The cast of Mahou Shoujo Madoka Magica are students of Mitakihara Middle School. Even though it is merely a middle school, coursework in Mitakihara can be quite challenging. The following are Math problems that have appeared thus far in the show, and their solutions:

Episode 1

Episode one Math question 1

Question 1

Any integer divided by 14 will have a remainder between 0 and 13. Given that a has a remainder of 6 and b has a remainder of 1 when divided by 14, what is the remainder of x when divided by 14, given x is an integer solution to [math]\displaystyle{ x^2-2ax+b=0 }[/math]?

Solution:

This problem can be solved simply with modular arithmetic:

  • [math]\displaystyle{ a \equiv 6 \pmod{14} }[/math];
  • [math]\displaystyle{ b \equiv 1 \pmod{14} }[/math].
  • [math]\displaystyle{ \displaystyle{x^2 - 2ax + b = 0} }[/math] implies
  • [math]\displaystyle{ x^2 - 12x + 1 \equiv 0 \pmod{14} }[/math]
  • [math]\displaystyle{ x^2 + 2x + 1 \equiv 0 \pmod{14} }[/math] (because [math]\displaystyle{ -12 \equiv 2 \pmod{14} }[/math])
  • [math]\displaystyle{ (x + 1)^2 \equiv 0 \pmod{14} }[/math]
  • [math]\displaystyle{ x + 1 \equiv 0 \pmod{14} }[/math] (because 14 is square-free)
  • [math]\displaystyle{ x \equiv 13 \pmod{14} }[/math] (because [math]\displaystyle{ -1 \equiv 13 \pmod{14} }[/math]).

Second Solution:

Homura used in Episode 1 a basic approach with usual integer arithmetic.

Let [math]\displaystyle{ \displaystyle{x = 14q + r, a = 14s + 6, b = 14t + 1} }[/math].

Substitute into [math]\displaystyle{ \displaystyle{x^2 - 2ax + b = 0} }[/math] to get after some calculations

[math]\displaystyle{ \displaystyle{x^2 - 2ax + b = 14c + (r+1)^2 = 0} \mbox{ with } \displaystyle{c = 14q^2 + 2q - 28qs - 2rs - 12q + t - r} }[/math]

14 divides 14c and 0, hence it also divides [math]\displaystyle{ (r+1)^2 }[/math]. This implies that [math]\displaystyle{ r+1 }[/math] is divisible by 14.

The question asks for a remainder r between 0 and 13, so we obtain r = 13.

See also: http://archive.foolz.us/a/thread/44824340

Question 2

Episode one Math question 2

Assuming that p is a prime number and n is an arbitrary natural number, prove that [math]\displaystyle{ (1+n)^p - n^p - 1 \, }[/math] is divisible by p.

Solution:

By Fermat's Little Theorem, for any prime p and integer a,

[math]\displaystyle{ a^p \equiv a \pmod{p} \, }[/math]

Thus:

[math]\displaystyle{ (1+n)^p - n^p - 1 \pmod{p} \, }[/math] is equivalent to

[math]\displaystyle{ (1+n) - n - 1 \pmod{p} \, }[/math] is equivalent to

[math]\displaystyle{ 0 \pmod{p} \, }[/math]

So the overall expression is divisible by p.


Second solution:

The problem can be solved with the binomial theorem:

For [math]\displaystyle{ a, b }[/math] not equal to [math]\displaystyle{ 0 }[/math] and nonnegative integer [math]\displaystyle{ p }[/math] it holds that:

[math]\displaystyle{ \displaystyle (a + b)^p = \sum_{k=0}^{p} \binom{p}{k} a^{p-k} b^k }[/math]

where the binomial coefficient [math]\displaystyle{ \binom{p}{k} }[/math] is the integer [math]\displaystyle{ \frac{p(p - 1) \cdots (p - k + 1)}{k(k-1) \cdots 1} }[/math] for [math]\displaystyle{ 0 \leq k \leq p }[/math].

Therefore,

[math]\displaystyle{ \displaystyle (1 + n)^p = \sum_{k=0}^{p} \binom{p}{k} n^k }[/math]

and

[math]\displaystyle{ \displaystyle (1 + n)^p - n^p - 1 = \sum_{k = 1}^{p - 1} \binom{p}{k} n^k }[/math]

since [math]\displaystyle{ \binom{p}{0} = \binom{p}{p} = 1 }[/math].


It holds that [math]\displaystyle{ \binom{p}{1} = p }[/math]. Since [math]\displaystyle{ p }[/math] is a prime number, the factor [math]\displaystyle{ p }[/math] in [math]\displaystyle{ \binom{p}{k} }[/math] is not divisible by [math]\displaystyle{ k, k-1,\ldots, 2 }[/math] for [math]\displaystyle{ 2 \leq k \leq p-1 }[/math]. Therefore, [math]\displaystyle{ p }[/math] divides [math]\displaystyle{ \binom{p}{k} }[/math] for [math]\displaystyle{ 1 \leq k \leq p-1 }[/math].

Since each summand on the right side is divisible by [math]\displaystyle{ p }[/math], the whole sum, i.e. the left side is also divisible by [math]\displaystyle{ p }[/math].

Question 3

Episode one Math question 3

Find the integer solutions [math]\displaystyle{ (a,b) }[/math] with [math]\displaystyle{ (a^3 + a^2 - 1) - (a - 1)b = 0 \, }[/math].

Solution:

Episode one Math solution to question 3

[math]\displaystyle{ \begin{align} (&a^3 + a^2 - 1) - (a - 1)b \\ & = (a^3 - 1) + (a^2 - 1) + 1 - (a - 1)b \\ & = (a - 1)(a^2 + a + 1) + (a - 1)(a + 1) + 1 - (a - 1)b \\ & = (a - 1)(a^2 + 2a - b + 2) + 1 = 0 \end{align} }[/math]

Therefore,
[math]\displaystyle{ (a - 1)(a^2 + 2a - b + 2) = -1 \, }[/math]

[math]\displaystyle{ a, b }[/math] are integers, therefore the factors [math]\displaystyle{ a - 1 }[/math] and [math]\displaystyle{ a^2 + 2a - b + 2 \, }[/math] are integers too. Since the product is [math]\displaystyle{ -1 }[/math], one of the factors must be equal to [math]\displaystyle{ -1 }[/math], the other to [math]\displaystyle{ 1 }[/math].

If [math]\displaystyle{ a - 1 = -1 }[/math] then [math]\displaystyle{ a = 0 }[/math] and from [math]\displaystyle{ a^2 + 2a - b + 2 = 1 \, }[/math] we obtain [math]\displaystyle{ b = 1 }[/math].

If [math]\displaystyle{ a - 1 = 1 }[/math] then [math]\displaystyle{ a = 2 }[/math] and [math]\displaystyle{ a^2 + 2a - b + 2 = -1 \, }[/math] implies that [math]\displaystyle{ b = 11 }[/math].

There are two integer solutions: [math]\displaystyle{ (a,b) = (0,1) \, }[/math] or [math]\displaystyle{ (a,b) = (2,11) \, }[/math].

Second Solution

The question can also be solved by polynomial division.

[math]\displaystyle{ (a^3 + a^2 - 1) - (a - 1)b = 0 \, }[/math]

[math]\displaystyle{ b = \frac{a^3 + a^2 - 1}{a - 1} = a^2 + 2a + 2 + \frac{1}{a - 1} \, }[/math]

As [math]\displaystyle{ b \in \mathbb{Z} }[/math], [math]\displaystyle{ a^2 + 2a + 2 + \frac{1}{a - 1} \in \mathbb{Z} }[/math], so [math]\displaystyle{ \frac{1}{a - 1} \in \mathbb{Z} }[/math]

As [math]\displaystyle{ 1 }[/math] has only two factors: [math]\displaystyle{ 1 }[/math] and [math]\displaystyle{ -1 }[/math],

[math]\displaystyle{ a-1 = 1 \, }[/math] or [math]\displaystyle{ a-1 = -1 \, }[/math]

[math]\displaystyle{ a = 2 \, }[/math] or [math]\displaystyle{ a = 0 \, }[/math]

Substituting the above values into the equation to find the corresponding [math]\displaystyle{ b }[/math], we have

[math]\displaystyle{ (a, b) = (0, 1) \, }[/math] or [math]\displaystyle{ (2, 11) }[/math].

Question 4

Episode one Math question 4

Given [math]\displaystyle{ \displaystyle F(x) = \frac{4x + \sqrt{4x^2 - 1}}{\sqrt{2x + 1} + \sqrt{2x-1}} }[/math],

find the sum of [math]\displaystyle{ \displaystyle{F(1)+F(2)+F(3)+...+F(60)} }[/math].

Solution:

Episode one Math, partial solution to question 4. Note that there are errors.

Simplying the fraction:

Notice that for any variables [math]\displaystyle{ a }[/math] and [math]\displaystyle{ b }[/math]:

[math]\displaystyle{ \displaystyle{(a-b)(a+b) = a^2-b^2} }[/math].

Let [math]\displaystyle{ \displaystyle{a = \sqrt{2x + 1}} }[/math] and [math]\displaystyle{ \displaystyle{b = \sqrt{2x - 1}} }[/math].

Multiply [math]\displaystyle{ \displaystyle{F(x)} }[/math] by 1 or [math]\displaystyle{ \displaystyle{\frac{a-b}{a-b}} }[/math] which is equal to [math]\displaystyle{ \displaystyle{\frac{\sqrt{2x + 1} - \sqrt{2x - 1}}{\sqrt{2x + 1} - \sqrt{2x - 1}}} }[/math]. The denominator becomes:

[math]\displaystyle{ \begin{align} &(\sqrt{2x + 1} + \sqrt{2x - 1})(\sqrt{2x + 1} - \sqrt{2x - 1})\\ &= (2x + 1) - (2x - 1)\\ &= 2 \end{align} }[/math]

The numerator becomes:

[math]\displaystyle{ \begin{align} &(4x + \sqrt{4x^2 - 1} ) (\sqrt{2x + 1} - \sqrt{2x - 1})\\ &=(4x + \sqrt{(2x)^2 - 1)}) (a - b)\\ &=(4x + \sqrt{2x - 1} \sqrt{2x + 1} ) (a-b)\\ &=(4x + a b ) (a - b)\\ &=4x (a - b) + a^2 b - a b^2\\ &=4x (a - b) + (2x + 1) b - a (2x - 1)\\ &=4x (a - b) - 2x (a - b) + a + b\\ &=2x ( a - b) + a + b\\ &=(2x + 1) a - (2x - 1) b\\ &=a^3 - b^3 \end{align} }[/math]

Therefore:

[math]\displaystyle{ \displaystyle {F(x) = \frac{a^3 - b^3 }{2}} }[/math]

Note that when [math]\displaystyle{ \displaystyle{ x = 1, 2, 3, 4, \ldots, 60} }[/math];

[math]\displaystyle{ \displaystyle{ a^3 = 3^\frac{3}{2}, 5^\frac{3}{2}, 7^\frac{3}{2}, 9^\frac{3}{2}, \ldots, 119^\frac{3}{2}, 121^\frac{3}{2}} }[/math];

[math]\displaystyle{ \displaystyle{ b^3 = 1^\frac{3}{2}, 3^\frac{3}{2}, 5^\frac{3}{2}, 7^\frac{3}{2}, 9^\frac{3}{2}, \ldots, 119^\frac{3}{2} } }[/math];

Taking the sum over [math]\displaystyle{ \displaystyle{F(x)} }[/math] for [math]\displaystyle{ \displaystyle{x} }[/math] between [math]\displaystyle{ 1 }[/math] and [math]\displaystyle{ 60 }[/math], observe that the majority of the terms in [math]\displaystyle{ \displaystyle{a^3} }[/math] and [math]\displaystyle{ \displaystyle{b^3} }[/math] cancel out, leaving:

[math]\displaystyle{ \begin{align} \sum_{x=1}^{60}F(x) &= \frac{121^\frac{3}{2} - 1^\frac{3}{2}}{2}\\ &=\frac{(11^2)^\frac{3}{2} - 1}{2}\\ &= 665 \end{align} }[/math]

Thus, sum of [math]\displaystyle{ \displaystyle{F(x)} }[/math] for [math]\displaystyle{ \displaystyle{x} }[/math] between [math]\displaystyle{ 1 }[/math] and [math]\displaystyle{ 60 }[/math] is [math]\displaystyle{ 665 }[/math]. The solution can be generalized as equal to [math]\displaystyle{ \displaystyle{\frac{a(x_{\max}^3) - b(x_{\min}^3)}{2}} }[/math]. Where [math]\displaystyle{ \displaystyle{a} }[/math] and [math]\displaystyle{ \displaystyle{b} }[/math] are interpreted as functions of [math]\displaystyle{ \displaystyle{x} }[/math].

Episode 8

Homura triangulated the likely location of Walpurgis Night to be the clock tower using Statistics, a branch of Mathematics that determines the probability of a future event by analysis of data from past events of similar nature.

Episode 9

Fibonacci sequence question that appeared in Episode 9

This advanced Algebra problem previously appeared in the first Tokyo University Entrance Exam:

Problem

A number sequence [math]\displaystyle{ \displaystyle{ \{F(n)\} } }[/math] that can be defined as [math]\displaystyle{ \displaystyle{F(1) = 1, F(2) = 1} }[/math], [math]\displaystyle{ \displaystyle{F(n+2) = F(n) + F(n+1)} }[/math] (where [math]\displaystyle{ \displaystyle{n \in \mathbb{N}} }[/math]) is called the Fibonacci sequence and its general solution is given by,

File:Fibonacci.png

File:Golden ratio.png

Answer the following questions by using this fact if needed:


Define a sequence of natural numbers [math]\displaystyle{ \displaystyle{ \{X(n)\} } }[/math] (where n is any natural number), in which each digit is either 0 or 1, set by the following rules:

(i) [math]\displaystyle{ \displaystyle{X(1) = 1} }[/math]

(ii) We define [math]\displaystyle{ \displaystyle{X(n+1)} }[/math] as a natural number, which can be obtained by replacing the digits of [math]\displaystyle{ \displaystyle{X(n)} }[/math] with 1 if the digit is 0, and with 10 if the digit is 1.

For example, [math]\displaystyle{ \displaystyle{X(1) = 1, X(2) = 10, X(3) = 101, X(4) = 10110, X(5) = 10110101, \ldots} }[/math]

Anecdote: [math]\displaystyle{ \displaystyle{X(n)} }[/math] can be considered a clever analogy to the show, where Episode 10 should replaces Episode 1 and Episode 1 replaces Episode 0 in the viewer's next viewing.

(1) Find [math]\displaystyle{ \displaystyle{A(n)} }[/math], defined as the number of digits of [math]\displaystyle{ \displaystyle{X(n)} }[/math].

(2) Find [math]\displaystyle{ \displaystyle{B(n)} }[/math], defined as the numbers of times '01' appears in [math]\displaystyle{ \displaystyle{X(n)} }[/math]? For example, [math]\displaystyle{ \displaystyle{B(1) = 0, B(2) = 0, B(3) = 1, B(4) = 1, B(5) = 3, \ldots} }[/math]


Solution

Part 1

Let [math]\displaystyle{ \displaystyle{A(n)} }[/math] equal to the number of digits in X(n), which consists solely of 1s and 0s. Let's suppose [math]\displaystyle{ \displaystyle{x(n)} }[/math] is the number of 0s in [math]\displaystyle{ \displaystyle{X(n)} }[/math] at the n-th iteration (poor choice of variable by the student). Let's suppose [math]\displaystyle{ \displaystyle{y(n)} }[/math] is the number of 1s in [math]\displaystyle{ \displaystyle{X(n)} }[/math] in the n-th iteration, then [math]\displaystyle{ \displaystyle{x(n) + y(n) = A(n)} }[/math]. Since

  • Every time a 0 appears, it is replaced with 1 at the next iteration, contributing to a single 1 in [math]\displaystyle{ \displaystyle{X(n+1)} }[/math].
  • Every time a 1 appears, it is replaced with 10 at t he next iteration, contributing to a single 1 and a single 0 in [math]\displaystyle{ X(n+1) }[/math].

it follows that the number of 0s in the next iteration is equal to the number of 1s previously:

[math]\displaystyle{ \displaystyle{x(n+1)= y(n)} }[/math] ;

and the number of 1s in the next iteration is equal to the number of 0s AND the numbers of 1s previously:

[math]\displaystyle{ y(n+1)= \displaystyle{x(n)+y(n)} }[/math] .


Next, prove that x(n) is a Fibonacci sequence, since we know that:

  • [math]\displaystyle{ \displaystyle{y(n+1) = x(n) + y(n)} }[/math] ;
  • [math]\displaystyle{ \displaystyle{x(n+2) = y(n+1)} }[/math] ;
  • [math]\displaystyle{ \displaystyle{x(n+1) = y(n)} }[/math] ;

by substition we can show,

[math]\displaystyle{ \begin{align} &x(n+2)\\ &= y(n+1)\\ &= x(n) + y(n)\\ &= x(n) + x(n+1) \end{align} }[/math]

Hence, [math]\displaystyle{ \displaystyle{x(n+2) = x(n+1) + x(n)} }[/math].

Thus [math]\displaystyle{ \displaystyle{x(n)} }[/math] fits the definition of a Fibonacci sequence. Since [math]\displaystyle{ \displaystyle{x(n)} }[/math] is a Fibonacci sequence, it follows that [math]\displaystyle{ \displaystyle{y(n)} }[/math] is also a Fibonacci sequence (given that [math]\displaystyle{ \displaystyle{x(n+1) = y(n)} }[/math]). Therefore, since it has already been shown that:

  • [math]\displaystyle{ \displaystyle{x(n+2)=x(n+1)+x(n)} }[/math]
  • [math]\displaystyle{ \displaystyle{y(n+2)=y(n+1)+y(n)} }[/math]

It follows that [math]\displaystyle{ \displaystyle {x(n+2)+y(n+2)=x(n+1)+y(n+1)+x(n)+y(n)} }[/math].

Recall that [math]\displaystyle{ \displaystyle{A(n)=x(n)+y(n)} }[/math], therefore

[math]\displaystyle{ \displaystyle{A(n+2)=A(n+1)+A(n)} }[/math] .

Since, [math]\displaystyle{ \displaystyle{X(1) = 1, X(2) = 10, X(3) = 101, X(4) = 10110, X(5) = 10110101, \ldots} }[/math]

It follows that [math]\displaystyle{ \displaystyle{A(1) = 1, A(2) = 2, A(3) = 3, A(4) = 5, A(5) = 8, \ldots} }[/math]

Recall by definition of the Fibonacci sequence: [math]\displaystyle{ \displaystyle{\{F(n)\} = \{1, 1, 2, 3, 5, 8, \ldots\}} }[/math]. Therefore [math]\displaystyle{ \displaystyle{A(n) = F(n+1)} }[/math], or

File:An.png

Part 2

Let B(n) be the number of times '01' appears in X(n). Any two digits in X(n) may be 00, 01, 10, 11, and the corresponding digits in the next iteration X(n+1) will be

  • 00 -> 11
  • 01 -> 110
  • 10 -> 101
  • 11 -> 1010

Thus, any two digit sequence in X(n) that begins with 1* will contribute to a 01 sequence in the next iteration. In other words, B(n+1) equals y(n), except when unit digit of X(n) is 1, or:

B(n+1) = y(n) - odd(X(n))

where

  • odd(n) = 1 if n is odd (unit digit is 1)
  • odd(n) = 0 if n is even (unit digit is 0)

It can be seen that odd(n) = odd(X(n)) for all n. To prove this inductively: observe that odd(X(1)) = odd(1). Now let odd(X(n)) = odd(n), then if n is even, X(n) is even, thus X(n) ends with 0, which gets mapped to 1, making X(n+1) odd and so odd(X(n+1)) = odd(n+1). And if n is odd, then X(n) is odd, thus X(n) ends with 1, which gets mapped to 10, making X(n+1) even, and so odd(X(n+1)) = odd(n+1).

y(n) is a fibonacci sequence with starting values: y(1) = 1, y(2) = 1, y(3) = 2 thus y(n) = F(n)

B(n+1) = F(n) - odd(n)

B(n) = F(n-1) - odd(n-1), or

File:Bn.png

Episode 10

Same as Episode 1.

Episode 11

Homura Walpurgis Ballistics Calculations.jpg

Pieces of papers floats by Homura as she faces Walpurgis Night. On it are calculations done by hand by Homura. Most likely, these are wikipedia:ballistic of the big guns. Two pairs of Xs and Ys on each of the four pieces of paper, making it 8 shots in all.

Movie 3: Rebellion

Rebellion Math 1.jpg

Problem A

The first problem posed, (a), was to calculate [math]\displaystyle{ \int\frac{\arcsin^3x}{\sqrt{1-x^2}}\,dx }[/math]

We can perform the substitution [math]\displaystyle{ u=\arcsin x \longrightarrow \frac{du}{dx}=\frac{1}{\sqrt{1-x^2}} }[/math] and so rewrite the integral as [math]\displaystyle{ \int u^3\,du }[/math]

This can be easily solved via basic integration formulas: [math]\displaystyle{ \int u^3\,du=\frac{1}{4}u^4+C }[/math]

Undoing the substitution we get the solution: [math]\displaystyle{ \frac{1}{4}\arcsin^4x + C }[/math]

Problem B

The second problem, (b), was to calculate [math]\displaystyle{ \int x\ln(x^2+y)\,dx }[/math] In order to solve it we'll assume [math]\displaystyle{ \displaystyle y }[/math] to be a parameter independent from the value of [math]\displaystyle{ \displaystyle x }[/math] and [math]\displaystyle{ \displaystyle\ln x }[/math] to denote the natural logarithm of [math]\displaystyle{ \displaystyle x }[/math].

Performing the substitution [math]\displaystyle{ u=x^2+y\longrightarrow\frac{du}{dx}=2x }[/math] we can rewrite the integral as [math]\displaystyle{ \frac{1}{2}\int\ln u\,du }[/math]

This can be solved integrating by parts: [math]\displaystyle{ \frac{1}{2}\int \ln u\,du=\frac{1}{2}(u\ln u - \int1\,du)=\frac{1}{2}u(\ln u - 1) }[/math]

And the final answer in obtained undoing the substitution: [math]\displaystyle{ \frac{1}{2}(x^2+y)\ln((x^2+y)-1)+C }[/math]

Problem C

One of the problems posed, (c), was to calculate [math]\displaystyle{ \int\frac{x^3+2x^2+10x}{x^2-x+1}\, dx }[/math].

The answer is to first simplify the function: [math]\displaystyle{ \frac{x^3+2x^2+10x}{x^2-x+1} = x + 3 + \frac{12x - 3}{x^2-x+1} = x + 3 + 6\frac{2x - 1}{x^2-x+1} + \frac{3}{x^2-x+1} }[/math]. Note that [math]\displaystyle{ x^2-x+1 }[/math] has only simple complex zeros.

It holds [math]\displaystyle{ \int x + 3 \, dx = \frac{1}{2}x^2 + 3x + C }[/math].

The general formula [math]\displaystyle{ \int\frac{f'(x)}{f(x)}\, dx = \ln|f(x)| dx + C }[/math] can be used to calculate [math]\displaystyle{ \int \frac{2x - 1}{x^2-x+1} \, dx = \ln(x^2-x+1) + C }[/math].


For the last term, [math]\displaystyle{ \int\frac{dx}{a^2 + x^2} = \frac{1}{a}\arctan \frac{x}{a} + C }[/math] can be used (with some additional calculations) to obtain the solution

[math]\displaystyle{ \int\frac{x^3+2x^2+10x}{x^2-x+1}\, dx = \frac{1}{2}x^2 + 3x + 6\ln(x^2-x+1) + 2\sqrt{3} \arctan \frac{2x-1}{\sqrt{3}} + C }[/math]