ATAR Notes: Forum

VCE Stuff => VCE Mathematics/Science/Technology => VCE Subjects + Help => VCE Mathematics => Topic started by: TheBigC on December 20, 2018, 11:17:34 am

Title: "Challenge" Math Qs - Can You Figure It Out?
Post by: TheBigC on December 20, 2018, 11:17:34 am
Hello everyone,

In my spare time, I have constructed some mathematics questions for those who want to push themselves... the following is Question Set #1. Good luck.
PM me your solutions and I will identify whether or not you are correct! Solutions will be posted in a couple of days.
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 20, 2018, 11:34:14 am
Should Q2 also say "leading up to and including"? The way it's written would make the answer just be \(a+b\).

(Similarly for Q3.)

Also, is it meant to be assumed that Q1 begins counting from 1?
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: TheBigC on December 20, 2018, 12:24:19 pm
Should Q2 also say "leading up to and including"? The way it's written would make the answer just be \(a+b\).

(Similarly for Q3.)

Also, is it meant to be assumed that Q1 begins counting from 1?

lol. oops! haha. poor wording - you are correct! (up to and including!)
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: TheBigC on December 21, 2018, 11:58:13 am
Congratulation to all winners (solvers):

RuiAce

Our entrances were short and sweet with neater solutions than my own! Feel free to post your own solutions if you desire :)
My (convoluted) solution is as follows in the attachment.

Please Note: Some non-standard contrived notation is used at times.



Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 21, 2018, 12:46:08 pm
I'll post up my solution as well for anyone who's interested. I basically just did a combinatorics bash on it. I considered how many times each digit appeared to add them up.

Q2: Suppose the number was \([ab]\). (For visual purposes, I will set \( [ab] = 57\).)
Units digits:
- For each \( k \in \{0, \dots, a\}\), the number \( 1, \dots, 9\) all appeared exactly once, contributing \( \sum_{k=0}^9 k \), \(a\) times. This adds \( a \times \frac{9\times 10}{2} \) to the sum. These \(k\)'s represent all the tens values prior to \( [a0]\).
- Then, for that current tens value, we only add the units from \(0\) up to \(b\), which basically contributes \( \sum_{k=0}^b k = \frac{b(b+1)}{2} \) to the sum.

So in the number 57,
For each \(k \in \{0, \dots, 5\} \) we add \( \frac{9\times 10}{2} \) to the sum. One lot comes from 0 to 9, the next lot from 10 to 19, and so on up to 40 to 49.
Then we just add 0+1+...+7

Tens digits:
- For each of the previous 10s values, i.e. each \( \ell \in \{0, \dots, a-1\} \), the number \(\ell\) gets contributed exactly \(10\) times to the sum. So this gives \( 10\times \sum_{\ell = 0}^{a-1} k = 10\times \frac{(a-1)a}{2} \).
- Then, for the current tens value (i.e. \(a\)), we just add \(a\) to the count the number of times as specified by \(b\). This contributes \( \sum_{k=0}^b a = (b+1)a \) to the sum.

So in the number 57,
For the units, we just add 0 ten times, For \( [1b]\), we add 1 ten times. For \([2b]\), we add 2 ten times and so on until we reach 4.
Then, because we have 50, 51, ..., 57, we need to add 5 eight times.
\[ \text{Answer to Q2: }\boxed{45a + \frac{b(b+1)}{2} + 5(a-1)a + (b+1)a}\]
Slight subtlety: If \(a=0\), i.e. we tried applying this formula on a one digit number, the formula will work but the part where it says \( \ell \in \{ 0, \dots, a-1\} \) will appear nonsensical. Essentially for this case, just interpret that set on the right to be empty, i.e. \( \ell \in \emptyset \). (This is a bit of an abuse of notation but still commonly used in combinatorics to represent an empty sum.)
___________________________________________________________________________

Q3: The idea now follows similarly to the previous one so I won't do a numeric example anymore, but it's important to keep track with all the progress.

Units:
- Starts the exact same way, but now we need to go up to the two-digit number \([ab]\) now. So this adds \( \boxed{[ab] \sum_{k=1}^9 k} \) to the sum.
- Finishes the exact same way in that now we just sum the integers up to \(z\) instead, hence contributing \( \boxed{\sum_{k=0}^z k } \) to the sum.

Hundreds:
- Starts the exact same way for the tens in the previous one. We basically do it for each of the previous hundreds values \( \ell \in \{ 0, \dots, a-1\} \), and the idea is that each of these numbers will appear 100 times instead, giving \( \boxed{\sum_{k=0}^{a-1}k} \)
- Finishes pretty much the exact same way as well now, but because we're working modulo 100 we want to terminate at \( [bz]\) instead. So this contributes \( \boxed{\sum_{k=0}^{[bz]} a} \)

Tens: This is the new one - it sorta combines and mixes the methods used in the other cases.
- For each of the previous hundreds values, i.e. \( \ell \in \{0, \dots, a-1\} \), each of the values 0 to 9 will have appeared ten times. (Ten 0's from 0-9, ten 1's from 10-19 and so on, up till ten 9's from 90-99.) This therefore contributes \( 10 \sum_{\ell=0}^{a-1} \sum_{k=0}^9 k \), but since the outer sum really represents summing over constants, I'll at least write \( \boxed{10 (a-1) \sum_{k=0}^9 k} \).
- Then we can narrow our focus to the current hundreds value \(a\). Once we're here, we repeat what we did for the two digit case. For each tens digit \( k \in \{0, \dots, b-1\} \) the same \(k\) appears 10 times, so we have \( \boxed{10 \sum_{k=0}^{b-1} k} \)
- Lastly, keep adding the current tens value \(b\), as required by the current value of \(z\): \( \boxed{\sum_{k=0}^z b} \).

Again, add and simplify using \( \sum_{k=0}^n k = \frac{n(n+1)}{2} \) to get the answer. Note that this formula can easily be derived as it is the partial sum of an arithmetic progression.
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: TheBigC on December 21, 2018, 09:22:39 pm
Great stuff Rui! A much nicer solution than my own ;)

A note to anyone: I recently received a message that requested to post a fun question up. If anyone feels like posting a question - please feel free to do so! This is all about promoting the fun and creativity that mathematics has to offer! I might impose limits on daily novel question posts, however only if things start getting hectic (in an effort to substantiate a notion of time to complete and submit answers to problem sets!). :)
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: AlphaZero on December 21, 2018, 10:20:33 pm
Hey everyone. (It was me that asked to post a problem lol).

Perhaps if we can get some regulars here, we could rotate posting problems? (Just a thought).

Anyway, here is my problem :D

(https://i.imgur.com/beCfG4r.png)
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 21, 2018, 10:30:49 pm
Is this thread intended to go beyond VCE maths and into university level stuff?
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: TheBigC on December 21, 2018, 10:35:00 pm
Is this thread intended to go beyond VCE maths and into university level stuff?

Preferably, it'd be great if we could make it solvable at a high school level (even though it may require some level of advanced understanding), however university level is fine as well - though it just limits the demographic of those who can solve the problem.

It would be awesome if everyone who posts could delineate their target audiences from now on :)
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: AlphaZero on December 21, 2018, 10:46:23 pm
Is this thread intended to go beyond VCE maths and into university level stuff?

Preferably, it'd be great if we could make it solvable at a high school level (even though it may require some level of advanced understanding), however university level is fine as well - though it just limits the demographic of those who can solve the problem.

It would be awesome if everyone who posts could delineate their target audiences from now on :)

I think it would be best to keep it within VCE, but as @TheBigC, it is limiting.

I mean, we technically already exceeded VCE level with the first question set when we introduced summation notation (I actually can't believe it isn't taught/required in VCE).

So that people know, the question I posted requires no university level knowledge other than what's given in the "Some useful information" paragraph about \(\mathbb{F}_2\). In fact, other than that, we only require knowledge of Year 11 Specialist Maths. The question is structured in a way so that you only have to know: how to multiply matrices, what an inverse is, and some basic knowledge of logic and proof.

In saying that though, the question does require a very high understanding of those topics. (It also still gives me nightmares lol :o )
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 22, 2018, 12:31:51 pm
Hey everyone. (It was me that asked to post a problem lol).

Perhaps if we can get some regulars here, we could rotate posting problems? (Just a thought).

Anyway, here is my problem :D

(https://i.imgur.com/beCfG4r.png)
Not saying this is the best approach and I needed some external help for one tiny bit in the middle but here goes. Parts a)-c):
\[\text{Then }\boxed{MK = \begin{pmatrix} \sum_{i=1}^n m_{1i} & \sum_{i=1}^n m_{1i}& \dots & \sum_{i=1}^n m_{1i}\\ \sum_{i=1}^n m_{2i} & \sum_{i=1}^n m_{2i}& \dots & \sum_{i=1}^n m_{2i}\\ \vdots &\vdots& \ddots& \vdots\\ \sum_{i=1}^n m_{ni} &\sum_{i=1}^n m_{ni} & \dots & \sum_{i=1}^n m_{ni} \end{pmatrix}}\]
_________________________________________________________________________________________________
\[\text{Recall that over }\mathbb{Z}_2 \text{ subtraction and addition are equivalent.}\]



\[\text{We find this, because given }M+M^{-1}K\text{ we also have }\boxed{M^{-2} = I + M^{-1}K}.\\ \text{So only displaying row 1 and column 1:}\\ M^{-2}=\begin{pmatrix} 1+n + \sum_{i=1}^n m_{1i} & n+\sum_{i=1}^n m_{1i} & \dots &n+ \sum_{i=1}^n m_{1i} \\ n+\sum_{i=1}^n m_{2i} \\ \vdots & & \ddots \\ n+\sum_{i=1}^n m_{ni} \end{pmatrix}\]
_________________________________________________________________________________________________









Haven't had a proper go at part d) yet - trying to stick to 2x2 matrices didn't work out easily enough for me. Can probably take advantage of these constructions to produce an example of a 4x4 matrix though. (Otherwise there's a 2x2 that I just missed the first time round.)

Edit: Ran a hard-coded program on R to find a matrix for me. Turns out this one works but I wouldn't know how to construct it at this stage.
\[ M = \begin{pmatrix} 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\\ 0 & 1 & 1 & 1\\ 1 & 0 & 1 & 1\end{pmatrix} \]
I did do some math before attempting hard-coding though. Basically I saw that if \(n\) were even, we would have \(M^2 = M^{-2}\). This would give \(M^{-1} = M^3\) and also \(M^4 = I\). So I wrote a program to check each 4x4 matrix over \( \mathbb{Z}_2\), and told it to stop if it found a matrix satisfying \( \boxed{M^4= I} \) and \( \boxed{M + M^3 = K} \) simultaneously.

The code is ugly. It stabs my soul as a programmer repeatedly. It's literally just a 16-nested loop.
Code: (test.R) [Select]
require(expm)

identity <- diag(4)
kk <- matrix(rep(1,16), nrow=4, ncol=4)

for(A in 0:1) {
  for (B in 0:1) {
    for (C in 0:1) {
      for (D in 0:1) {
        for (E in 0:1) {
          for (FF in 0:1) {
            for (G in 0:1) {
              for (H in 0:1) {
                for (I in 0:1) {
                  for (J in 0:1) {
                    for (K in 0:1) {
                      for (L in 0:1) {
                        for (M in 0:1) {
                          for (N in 0:1) {
                            for (O in 0:1) {
                              for (P in 0:1) {
                                found <- TRUE
                                mm <- matrix(c(A,B,C,D,E,FF,G,H,I,J,K,L,M,N,O,P), nrow=4, ncol=4)
                                mm4 <- (mm %^% 4) %% 2
                                mm3 <- (mm %^% 3) %% 2
                                for (i in 1:4) {
                                  for (j in 1:4) {
                                    if (mm4[i,j] != identity[i,j]) found <- FALSE
                                    if (mm[i,j] + mm3[i,j] != 1) found <- FALSE
                                  }
                                }
                                if (found) stop("stopped!")
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: AlphaZero on December 22, 2018, 03:10:16 pm
...
Not saying this is the best approach and I needed some external help for one tiny bit in the middle but here goes.
...
Haven't had a proper go at part d) yet - trying to stick to 2x2 matrices didn't work out easily enough for me. Can probably take advantage of these constructions to produce an example of a 4x4 matrix though. (Otherwise there's a 2x2 that I just missed the first time round.)
...
I did do some math before attempting hard-coding though. Basically I saw that if \(n\) were even, we would have \(M^2 = M^{-2}\). This would give \(M^{-1} = M^3\) and also \(M^4 = I\). So I wrote a program to check each 4x4 matrix over \( \mathbb{Z}_2\), and told it to stop if it found a matrix satisfying \( \boxed{M^4= I} \) and \( \boxed{M + M^3 = K} \) simultaneously.
...

Super job! You did the exact approach that was intended by the question. I'm not actually sure there's a more economical/efficient solution.

I think part d is really interesting, and you're right to not find any \(2\times 2\) matrices that work - I'm quite sure there are none, and proving it is pretty straight forward. (It's pretty much a brute force method since there are only 16 \(2\times2\) matrices over \(\mathbb{Z}_2\)) that actually exist.

Start by noticing that if \(a+b=1\), then exactly one of \(a\) and \(b\) must be \(1\). That is, [\(a=1\) and \(b=0\)] or [\(a=0\) and \(b=1\)]. So, to produce \(K\), the matrices \(M\) and \(M^{-1}\) must have opposite entries. This fact actually allows us to eliminate all possible \(2\times 2\) matrices.

We'll start with the 0 matrix and consider replacing entries with ones. First, let's get rid of any matrices that are not invertible. \begin{align*}\text{Replacing no entries: }&M=\begin{bmatrix}0 & 0 \\ 0 & 0\end{bmatrix}\text{ is not invertible.}\\
\text{Replacing one entry: }&M=\begin{bmatrix}1 & 0 \\ 0 & 0\end{bmatrix},\ \begin{bmatrix}0 & 1 \\ 0 & 0\end{bmatrix},\ \begin{bmatrix}0 & 0 \\ 1 & 0\end{bmatrix},\ \begin{bmatrix}0 & 0 \\ 0 & 1\end{bmatrix}\ \text{are not invertible (always exists a zero row)}\\
\text{Replacing two entries: }&M=\begin{bmatrix}1 & 1 \\ 0 & 0\end{bmatrix},\ \begin{bmatrix}1 & 0 \\ 1 & 0\end{bmatrix},\ \begin{bmatrix}0 & 1 \\ 0 & 1\end{bmatrix},\ \begin{bmatrix}0 & 0 \\ 1 & 1\end{bmatrix}\ \text{are not invertible (always exists a zero row or zero column)}\\
\text{Replacing four entries: }&M=\begin{bmatrix}1 & 1 \\ 1 & 1\end{bmatrix}\ \text{is not invertible (zero determinant / two rows are the same)}\end{align*}
Now, let's use the property we discussed above. Replacing three entries so that \[M=\begin{bmatrix}1 & 1 \\ 1 & 0\end{bmatrix},\ \begin{bmatrix}1 & 1 \\ 0 & 1\end{bmatrix},\ \begin{bmatrix}0 & 1 \\ 1 & 1\end{bmatrix},\ \begin{bmatrix}1 & 0 \\ 1 & 1\end{bmatrix}\] would require \[M^{-1}=\begin{bmatrix}0 & 0 \\ 0 & 1\end{bmatrix},\ \begin{bmatrix}0 & 0 \\ 1 & 0\end{bmatrix},\ \begin{bmatrix}1 & 0 \\ 0 & 0\end{bmatrix},\ \begin{bmatrix}0 & 1 \\ 0 & 0\end{bmatrix}\text{ respectively,}\] if \(M+M^{-1}=K\). But, none of the stated \(M^{-1}\) are invertible since there always exists a zero row.

There are only two matrices left to investigate: \[M=\begin{bmatrix}1 & 0 \\ 0 & 1\end{bmatrix}\text{ and }\begin{bmatrix}0 & 1 \\ 1 & 0\end{bmatrix}\] If \(M\) is the former, then \[M+M^{-1}=I+I=\begin{bmatrix}0 & 0 \\ 0 & 0\end{bmatrix}\neq K.\]If \(M\) is the latter, then we would require \[M^{-1}=\begin{bmatrix}1 & 0 \\ 0 & 1\end{bmatrix}=I\] so that \(M+M^{-1}=K\), but this is nonsense since \((M^{-1})^{-1}=M=I\), forming a contradiction.

Hence, there are no \(2\times 2\) matrices \(M\) over \(\mathbb{Z}_2\) that have the property \(M+M^{-1}=K\).

Part d is interesting. The original question didn't actually have it. I just added it because I thought it was cool to investigate. So, I don't actually have a neat solution to constructing \(4\times4\) matrices without technology. I literally just used MATLAB to go through all \(2^{16}\) possible \(4\times 4\) matrices over \(\mathbb{Z}_2\).
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 24, 2018, 02:36:37 pm
\[ \text{Let}\\ \begin{align*}A &= \begin{pmatrix} 1/3 & 1/4 & 1/4\\ 1/3 & 1/2 & 1/4\\ 1/3 & 1/4 & 1/2\end{pmatrix}\\ Q &= \begin{pmatrix} 3 & 0 & -2\\ 4 & -1 & 1\\ 4 & 1 & 1\end{pmatrix}\\ D &= \begin{pmatrix} 1 & 0 & 0\\ 0 & 1/4 & 0\\ 0& 0 & 1/12 \end{pmatrix}\end{align*} \]
\[ \text{1. Verify that }QDQ^{-1} = A.\\ \text{2. Hence find }\lim_{k\to \infty}A^k. \]
[First Year Uni]
3. Explain in one sentence why the result in Q2 is unsurprising.
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: lzxnl on December 24, 2018, 05:28:24 pm
I'm not going to spoil RuiAce's question so I'm going to let it be.

The solution to these questions are well within the confines of a VCE Specialist Mathematics 3/4 student or the HSC equivalent (highest level of mathematics offered in high school), even if it doesn't look simple.

Evaluate the integral


If you think this one is too easy, try
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 24, 2018, 05:44:39 pm
If you think this one is too easy, try

Shouldn't the upper boundary be \( \frac\pi2\) here if you're trying to allude to a classic?

(In any case it can't be \(\pi\) because "\(\sec\) is negative in the second quadrant", so \(\ln (\sec x) \) would be non-real)
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: lzxnl on December 24, 2018, 07:00:26 pm
Shouldn't the upper boundary be \( \frac\pi2\) here if you're trying to allude to a classic?

(In any case it can't be \(\pi\) because "\(\sec\) is negative in the second quadrant", so \(\ln (\sec x) \) would be non-real)
I mean you probably could still define this integral perfectly the way I originally wrote it, but you're right; I really shouldn't make this more complicated than it already is. Fixed.
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: AlphaZero on December 24, 2018, 10:59:49 pm
My Set 3 Solutions

Question 1 Solution
\begin{align*}\Big[Q\mid I\Big]&=\begin{bmatrix}3&0&-2&1&0&0\\4&-1&1&0&1&0\\4&1&1&0&0&1\end{bmatrix}\\
&\sim\begin{bmatrix}1&0&-2/3&1/3&0&0\\1&-1/4&1/4&0&1/4&0\\1&1/4&1/4&0&0&1/4\end{bmatrix}\\
&\sim\begin{bmatrix}1&0&-2/3&1/3&0&0\\0&-1/4&11/12&-1/3&1/4&0\\0&1/4&11/12&-1/3&0&1/4\end{bmatrix}\\
&\sim\begin{bmatrix}1&0&-2/3&1/3&0&0\\0&1&-11/3&4/3&-1&0\\0&0&11/6&-2/3&1/4&1/4 \end{bmatrix}\\
&\sim\begin{bmatrix}1&0&-2/3&1/3&0&0\\0&1&0&0&-1/2&1/2\\0&0&1&-4/11&3/22&3/22 \end{bmatrix}\\
&\sim\begin{bmatrix}1&0&0&1/11&1/11&1/11\\0&1&0&0&-1/2&1/2\\0&0&1&-4/11&3/22&3/22 \end{bmatrix}\\
&=\Big[I\mid Q^{-1}\Big]\end{align*}Hence, we have \begin{align*}QDQ^{-1}&=\begin{bmatrix}3&0&-2\\4&-1&1\\4&1&1\end{bmatrix}\begin{bmatrix}1&0&0\\0&1/4&0\\0&0&1/12\end{bmatrix}\begin{bmatrix}1/11&1/11&1/11\\0&-1/2&1/2\\-4/11&3/22&3/22\end{bmatrix}\\
&=\begin{bmatrix}3&0&-2\\4&-1&1\\4&1&1\end{bmatrix}\begin{bmatrix}1/11&1/11&1/11\\0&-1/8&1/8\\-1/33&1/88&1/88 \end{bmatrix}\\
&=\begin{bmatrix}1/3&1/4&1/4\\1/3&1/2&1/4\\1/3&1/4&1/2 \end{bmatrix}\\
&=A \end{align*}

Question 2 Solution
First, note that \[A^k=(QDQ^{-1})^k=\underbrace{QDQ^{-1}\;QDQ^{-1}\dots QDQ^{-1}\;QDQ^{-1}}_{k\text{ times}}=Q\underbrace{D\dots D}_{k\text{ times}}Q^{-1}=QD^kQ^{-1}\] and that \[D^k=\begin{bmatrix}1^k&0&0\\0&(1/4)^k&0\\0&0&(1/12)^k \end{bmatrix}=\begin{bmatrix}1&0&0\\0&(1/4)^k&0\\0&0&(1/12)^k \end{bmatrix}.\] Hence, \begin{align*}\lim_{k\to\infty}A^k&=\lim_{k\to\infty}(QD^kQ^{-1})\\
&=\begin{bmatrix}3&0&-2\\4&-1&1\\4&1&1\end{bmatrix}\begin{bmatrix}1&0&0\\0&0&0\\0&0&0 \end{bmatrix}\begin{bmatrix}1/11&1/11&1/11\\0&-1/2&1/2\\-4/11&3/22&3/22 \end{bmatrix}\quad\quad\Big[(1/4)^k,(1/2)^k\to0\ \text{as}\ k\to\infty\Big]\\
&=\begin{bmatrix}3&0&-2\\4&-1&1\\4&1&1\end{bmatrix}\begin{bmatrix}1/11&1/11&1/11\\0&0&0\\0&0&0\end{bmatrix}\\
&=\begin{bmatrix}3/11&3/11&3/11\\4/11&4/11&4/11\\4/11&4/11&4/11\end{bmatrix} \end{align*}

Question 3 Solution
\(A\) is a right stochastic matrix.

Great questions @Rui :)



My Set 4 Solutions

Question 1 Solution
\[I=\int_0^{\pi/2}\frac{\sin^\pi(x)}{\sin^\pi(x)+\cos^\pi(x)}\;dx\] We will make use of the substitution \(u=\dfrac{\pi}{2}-x\implies -\dfrac{du}{dx}=1\) so that \[I=-\int_{\pi/2}^0\frac{\sin^\pi(\pi/2-u)}{\sin^\pi(\pi/2-u)+\cos^\pi(\pi/2-u)}\;du=\int_0^{\pi/2}\frac{\cos^\pi(u)}{\sin^\pi(u)+\cos^\pi(u)}\;du.\]Thus, \begin{align*}2I&=\int_0^{\pi/2}\frac{\sin^\pi(x)}{\sin^\pi(x)+\cos^\pi(x)}\;dx+\int_0^{\pi/2}\frac{\cos^\pi(x)}{\sin^\pi(x)+\cos^\pi(x)}\;dx\\
&=\int_0^{\pi/2}dx\\
&=\frac{\pi}{2}. \end{align*}Hence, \(I=\dfrac{\pi}{4}\).

Question 2 Solution
\[I=\int_0^{\pi/2}\log(\sec(x))\;dx\] We will use the substitution \(u=\dfrac{\pi}{2}-x\implies -\dfrac{du}{dx}=1\) so that \[I=-\int_{\pi/2}^0\log\left[\sec\left(\frac{\pi}{2}-u\right)\right]\;du=\int_0^{\pi/2}\log(\csc(u))\;du\]Thus, we have \begin{align*}2I&=\int_0^{\pi/2}\log(\sec(x))\;dx+\int_0^{\pi/2}\log(\csc(x))\;dx\\
&=\int_0^{\pi/2}\log(2\csc(2x))\;dx\\
&=\int_0^{\pi/2}\log(2)\;dx+\int_0^{\pi/2}\log(\csc(2x))\;dx \end{align*} Now, we use the substitution \(v=2x\implies\dfrac12\dfrac{dv}{dx}=1\) so that \[2I=\frac{\pi}{2}\log(2)+\frac{1}{2}\int_0^\pi\log(\csc(v))\;dv.\]But, \(\csc(\pi-\theta)\equiv\csc(\theta)\), so \begin{align*}2I&=\frac{\pi}{2}\log(2)+\int_0^{\pi/2}\log(\csc(x))\;dx\\
&=\frac{\pi}{2}\log(2)+\int_0^{\pi/2}\log(\sec(x))\;dx\\
&=\frac{\pi}{2}\log(2)+I\end{align*}Hence, \(I=\dfrac{\pi}{2}\log(2)\).

Thanks @lzxnl. I've always loved these types of integrals. They're difficult, but once you see it, it looks super obvious (esp. the first one) :P
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 25, 2018, 08:50:31 am
May be worth mentioning that the first one can be generalised. It turns out that \( \int_0^{\pi/2} \frac{\sin^A x}{\cos^A x + \sin^A x}dx = \int_0^{\pi/2} \frac{\cos^A x}{\cos^A x + \sin^A x} dx = \frac\pi4 \) for all \( A \in \mathbb{R} \). Basically that working out can be replicated for any power, and that power of \(\pi\) was just some arbitrary choice for \(A\).

But yeah my question was basically teasing at stochastic matrices and also eigenvalues :P

NEXT QUESTION: Got given this one ages ago and it was just ugly. (Merry Christmas.)
\[ \int \frac{(x-1)\sqrt{x^4+2x^3 +4x^2+2x+1}}{x^2(x+1)}dx \]
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: TheBigC on December 25, 2018, 02:11:42 pm
Just wanted to throw in a quick comment.

I love the way this thread has taken off! I am seeing some really fun questions here! ;) Cannot wait for more awesome stuff... Merry Christmas everyone!
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: lzxnl on December 25, 2018, 09:57:46 pm
May be worth mentioning that the first one can be generalised. It turns out that \( \int_0^{\pi/2} \frac{\sin^A x}{\cos^A x + \sin^A x}dx = \int_0^{\pi/2} \frac{\cos^A x}{\cos^A x + \sin^A x} dx = \frac\pi4 \) for all \( A \in \mathbb{R} \). Basically that working out can be replicated for any power, and that power of \(\pi\) was just some arbitrary choice for \(A\).

But yeah my question was basically teasing at stochastic matrices and also eigenvalues :P

NEXT QUESTION: Got given this one ages ago and it was just ugly. (Merry Christmas.)
\[ \int \frac{(x-1)\sqrt{x^4+2x^3 +4x^2+2x+1}}{x^2(x+1)}dx \]

Indeed. I like picking strange values for A because it throws people off :D

I was waiting for someone to comment on eigenvalues for that one.

RuiAce's integral is absolutely terrible to do. I'm not going to fully back-substitute, because that answer becomes a gargantuan mess.



Man, had to dig a bit into my bag of tricks for that one.

Here is an easy one suitable for year 12 students.

1. Differentiate \(\frac{e^{ix}}{\cos(x) + i\sin(x)}\) with respect to \(x\) where \( i\) is the imaginary unit. Comment on your result.

Here is a harder one.

Given that \( \int_{-\infty}^\infty e^{-x^2}\,dx = \sqrt{\pi} \), calculate

Yes, the technique could be followed by a high school student, but I don't expect them to think of this.
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: GMT. -_- on December 25, 2018, 10:37:22 pm
For lzxnl's first question, the derivative would be 0 (numerator would have e^ix(cos(x) +i sin(x)) - (i cos(x) - sin(x)) which when expanded becomes 0 ). However, e^ix is defined as cos(x)+isin(x). You would think that anything besides 0 divided by itself would be 1 but apparently not for this case!
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: lzxnl on December 25, 2018, 10:55:58 pm
For lzxnl's first question, the derivative would be 0 (numerator would have e^ix(cos(x) +i sin(x)) - (i cos(x) - sin(x)) which when expanded becomes 0 ). However, e^ix is defined as cos(x)+isin(x). You would think that anything besides 0 divided by itself would be 1 but apparently not for this case!
The point is more to show that this definition makes sense to a high school student, not to prove the definition. Then, it's about making an appropriate comment regarding zero derivative. I think you're overlooking something in your answer there.
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 25, 2018, 10:57:18 pm
snip
Haha, this was a rare integral where I found that using a trigonometric substitution was better than a hyperbolic substitution. That route made it a bit harder ;)
\[ u+1 = \tan \theta \implies du = \sec^2\theta \,d\theta. \]
\begin{align*} \int \frac{\sqrt{(u+1)^2 + 1}}{u+2}du&= \int \frac{\sqrt{\tan^2\theta +1}}{\tan\theta+1}\sec^2\theta \, d\theta\\ &= \int \frac{\sec^3\theta}{\tan\theta+1}d\theta\\&= \int \frac{\sec^2\theta}{1+\tan\theta}\sec\theta\,d\theta\\ &= \int \frac{\tan^2\theta+1}{\tan\theta+1}\sec\theta \\ &= \int \tan\theta\sec\theta-\sec\theta - \frac{2\sec\theta}{\tan \theta+1}\,d\theta\\ &= \sec\theta - \ln |\sec\theta+\tan\theta| - 2\int \frac{d\theta}{\sin\theta+\cos\theta}\end{align*}
\[ \text{of which that last integral can be treated as}\\ \int \frac{d\theta}{\sin\theta+\cos\theta} = \int \frac{d\theta}{\sqrt{2} \sin\left (\theta + \frac\pi4 \right)}\\ \text{and }\int \csc x \,dx = -\ln |\csc x + \cot x|+C \]
For lzxnl's first question, the derivative would be 0 (numerator would have e^ix(cos(x) +i sin(x)) - (i cos(x) - sin(x)) which when expanded becomes 0 ). However, e^ix is defined as cos(x)+isin(x). You would think that anything besides 0 divided by itself would be 1 but apparently not for this case!
You're right about the final answer but I think the intended approach was to use the quotient rule to bash that the derivative was equal to 0, before justifying it by Euler's formula.

Also, I don't think \(e^{ix}\) is 'defined' as \(\cos x + i \sin x\). It is something that can be proven via Taylor series
________________________________________

Anyway won't steal that integral (although hahaha, \(n\)-th moment of a normal distribution). But I just wanted to put up some C code for problem set 2 because I thought it was a fun programming exercise.
Code: (22dec2018question.c) [Select]
// Finds and prints the first matrix that works
// If none exists, mention that none exists
// Designed specifically for matrices over Z_2

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

// Size of matrix - can be changed
#define SIZE 4

typedef struct matrixRep *Matrix;
typedef struct matrixRep {
  int mm[SIZE][SIZE];
} _matrix;

Matrix newMatrix();
void destroyMatrix(Matrix m);
unsigned long long maxNumIterations(unsigned int size);
void matrixInit(Matrix m, int i);
void idInit(Matrix id);
void kkInit(Matrix k);
bool matrixCmp(Matrix a, Matrix b);
Matrix matrixAdd(Matrix a, Matrix b);
Matrix matrixMult(Matrix a, Matrix b);
Matrix matrixCube(Matrix m);
Matrix matrixFourth(Matrix m);
void printMatrix(Matrix m);

int main() {

  Matrix m, mcubed, mfourth, msum;
  Matrix id, kk;
  unsigned long long n = maxNumIterations(SIZE);
  bool found = false;

  id = newMatrix();
  idInit(id);
  kk = newMatrix();
  kkInit(kk);

  m = newMatrix();

  for (unsigned long long i = 0; i < n; i++) {
    if (found) break;
    matrixInit(m, i);
    mcubed = matrixCube(m);
    msum = matrixAdd(mcubed, m);
    mfourth = matrixFourth(m);

    if (matrixCmp(msum, kk) && matrixCmp(mfourth, id)) found = true;
    destroyMatrix(mcubed);
    destroyMatrix(msum);
    destroyMatrix(mfourth);
  }

  if (found) {
    printf("Found matrix:\n");
    printMatrix(m);
    printf("\n");
  } else {
    printf("Not found.\n");
  }

  destroyMatrix(id);
  destroyMatrix(kk);
  destroyMatrix(m);
  return 0;
}

// newMatrix: allocates memory for a new matrix
Matrix newMatrix() {
  Matrix new = calloc(1, sizeof(struct matrixRep));
  return new;
}

// destroyMatrix: frees up memory associated with a matrix
void destroyMatrix(Matrix m) {
  free(m);
}

// maxNumIterations: computes 2^(size^2) - the max amount of times
// the loop in the main function can run for
unsigned long long maxNumIterations(unsigned int size) {
  unsigned long long n = 1;
  unsigned long int sizeSq = size*size;
  for (unsigned long int i = 0; i < sizeSq; i++) {
    n <<= 1;
  }
  return n;
}

// matrixInit: sets up m for the current value of i in the main function's loop
void matrixInit(Matrix m, int n) {
  int mask = 1;
  for (int i = 0; i < SIZE; i++) {
    for (int j = 0; j < SIZE; j++) {
      m->mm[i][j] = n & mask;
      mask <<= 1;
      m->mm[i][j] = (m->mm[i][j] == 0) ? 0 : 1;
    }
  }
}

// idInit: sets up the identity matrix
void idInit(Matrix id) {
  int posOfOne = 0;
  for (int i = 0; i < SIZE; i++) {
    for (int j = 0; j < SIZE; j++) {
      if (j == posOfOne) id->mm[i][j] = 1;
      else id->mm[i][j] = 0;
    }
    posOfOne++;
  }
}

// kkInit: sets up the matrix of 1's
void kkInit(Matrix k) {
  for (int i = 0; i < SIZE; i++)
    for (int j = 0; j < SIZE; j++)
      k->mm[i][j] = 1;
}

// matrixCmp: checks if two
bool matrixCmp(Matrix a, Matrix b) {
  bool same = true;
  for (int i = 0; i < SIZE; i++) {
    if (!same) break;
    for (int j = 0; j < SIZE; j++) {
      if (a->mm[i][j] != b->mm[i][j]) {
        same = false;
        break;
      }
    }
  }
  return same;
}

// matrixAdd: computes the sum of two matrices
Matrix matrixAdd(Matrix a, Matrix b) {
  Matrix sum = newMatrix();
  for (int i = 0; i < SIZE; i++)
    for (int j = 0; j < SIZE; j++)
      sum->mm[i][j] = a->mm[i][j] ^ b->mm[i][j];
  return sum;
}

// matrixMult: computes the product of two matrices
Matrix matrixMult(Matrix a, Matrix b) {
  Matrix prod = newMatrix();
  for (int i = 0; i < SIZE; i++) {
    for (int j = 0; j < SIZE; j++) {
      for (int k = 0; k < SIZE; k++)
        prod->mm[i][j] += a->mm[i][k] * b->mm[k][j];
       
      prod->mm[i][j] &= 1;
    }
  }
  return prod;
}

// matrixCube: computes the cube of a matrix
Matrix matrixCube(Matrix m) {
  Matrix msq = matrixMult(m, m);
  Matrix mcb = matrixMult(msq, m);
  destroyMatrix(msq);
  return mcb;
}

// matrixFourth: computs the fourth power of a matrix
Matrix matrixFourth(Matrix m) {
  Matrix msq = matrixMult(m, m);
  Matrix mfr = matrixMult(msq, msq);
  destroyMatrix(msq);
  return mfr;
}

// printMatrix: displays a matrix to stdout
void printMatrix(Matrix m) {
  for (int i = 0; i < SIZE; i++) {
    for (int j = 0; j < SIZE; j++)
      printf("%d ", m->mm[i][j]);
    printf("\n");
  }
}
...but then soon enough I realised how shit this code was because it's an \( \mathcal{O}(2^{n^2}) \) algorithm (slow when \(n=5\)) :'( wonder if improvements can be made to it. I know that right now it's checking matrices which aren't of full rank which is redundant. Anyone got suggestions on some easy math that I can probably convert into code to make it faster?
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: lzxnl on December 25, 2018, 11:15:51 pm
Haha, this was a rare integral where I found that using a trigonometric substitution was better than a hyperbolic substitution. That route made it a bit harder ;)
\[ u+1 = \tan \theta \implies du = \sec^2\theta \,d\theta. \]
\begin{align*} \int \frac{\sqrt{(u+1)^2 + 1}}{u+2}du&= \int \frac{\sqrt{\tan^2\theta +1}}{\tan\theta+1}\sec^2\theta \, d\theta\\ &= \int \frac{\sec^3\theta}{\tan\theta+1}d\theta\\&= \int \frac{\sec^2\theta}{1+\tan\theta}\sec\theta\,d\theta\\ &= \int \frac{\tan^2\theta+1}{\tan\theta+1}\sec\theta \\ &= \int \tan\theta\sec\theta-\sec\theta - \frac{2\sec\theta}{\tan \theta+1}\,d\theta\\ &= \sec\theta - \ln |\sec\theta+\tan\theta| - 2\int \frac{d\theta}{\sin\theta+\cos\theta}\end{align*}
\[ \text{of which that last integral can be treated as}\\ \int \frac{d\theta}{\sin\theta+\cos\theta} = \int \frac{d\theta}{\sqrt{2} \sin\left (\theta + \frac\pi4 \right)}\\ \text{and }\int \csc x \,dx = -\ln |\csc x + \cot x|+C \]You're right about the final answer but I think the intended approach was to use the quotient rule to bash that the derivative was equal to 0, before justifying it by Euler's formula.

Also, I don't think \(e^{ix}\) is 'defined' as \(\cos x + i \sin x\). It is something that can be proven via Taylor series
________________________________________

Anyway won't steal that integral (although hahaha, \(n\)-th moment of a normal distribution). But I just wanted to put up some C code for problem set 2 because I thought it was a fun programming exercise.
Code: (22dec2018question.c) [Select]
// Finds and prints the first matrix that works
// If none exists, mention that none exists
// Designed specifically for matrices over Z_2

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

// Size of matrix - can be changed
#define SIZE 4

typedef struct matrixRep *Matrix;
typedef struct matrixRep {
  int mm[SIZE][SIZE];
} _matrix;

Matrix newMatrix();
void destroyMatrix(Matrix m);
unsigned long long maxNumIterations(unsigned int size);
void matrixInit(Matrix m, int i);
void idInit(Matrix id);
void kkInit(Matrix k);
bool matrixCmp(Matrix a, Matrix b);
Matrix matrixAdd(Matrix a, Matrix b);
Matrix matrixMult(Matrix a, Matrix b);
Matrix matrixCube(Matrix m);
Matrix matrixFourth(Matrix m);
void printMatrix(Matrix m);

int main() {

  Matrix m, mcubed, mfourth, msum;
  Matrix id, kk;
  unsigned long long n = maxNumIterations(SIZE);
  bool found = false;

  id = newMatrix();
  idInit(id);
  kk = newMatrix();
  kkInit(kk);

  m = newMatrix();

  for (unsigned long long i = 0; i < n; i++) {
    if (found) break;
    matrixInit(m, i);
    mcubed = matrixCube(m);
    msum = matrixAdd(mcubed, m);
    mfourth = matrixFourth(m);

    if (matrixCmp(msum, kk) && matrixCmp(mfourth, id)) found = true;
    destroyMatrix(mcubed);
    destroyMatrix(msum);
    destroyMatrix(mfourth);
  }

  if (found) {
    printf("Found matrix:\n");
    printMatrix(m);
    printf("\n");
  } else {
    printf("Not found.\n");
  }

  destroyMatrix(id);
  destroyMatrix(kk);
  destroyMatrix(m);
  return 0;
}

// newMatrix: allocates memory for a new matrix
Matrix newMatrix() {
  Matrix new = calloc(1, sizeof(struct matrixRep));
  return new;
}

// destroyMatrix: frees up memory associated with a matrix
void destroyMatrix(Matrix m) {
  free(m);
}

// maxNumIterations: computes 2^(size^2) - the max amount of times
// the loop in the main function can run for
unsigned long long maxNumIterations(unsigned int size) {
  unsigned long long n = 1;
  unsigned long int sizeSq = size*size;
  for (unsigned long int i = 0; i < sizeSq; i++) {
    n <<= 1;
  }
  return n;
}

// matrixInit: sets up m for the current value of i in the main function's loop
void matrixInit(Matrix m, int n) {
  int mask = 1;
  for (int i = 0; i < SIZE; i++) {
    for (int j = 0; j < SIZE; j++) {
      m->mm[i][j] = n & mask;
      mask <<= 1;
      m->mm[i][j] = (m->mm[i][j] == 0) ? 0 : 1;
    }
  }
}

// idInit: sets up the identity matrix
void idInit(Matrix id) {
  int posOfOne = 0;
  for (int i = 0; i < SIZE; i++) {
    for (int j = 0; j < SIZE; j++) {
      if (j == posOfOne) id->mm[i][j] = 1;
      else id->mm[i][j] = 0;
    }
    posOfOne++;
  }
}

// kkInit: sets up the matrix of 1's
void kkInit(Matrix k) {
  for (int i = 0; i < SIZE; i++)
    for (int j = 0; j < SIZE; j++)
      k->mm[i][j] = 1;
}

// matrixCmp: checks if two
bool matrixCmp(Matrix a, Matrix b) {
  bool same = true;
  for (int i = 0; i < SIZE; i++) {
    if (!same) break;
    for (int j = 0; j < SIZE; j++) {
      if (a->mm[i][j] != b->mm[i][j]) {
        same = false;
        break;
      }
    }
  }
  return same;
}

// matrixAdd: computes the sum of two matrices
Matrix matrixAdd(Matrix a, Matrix b) {
  Matrix sum = newMatrix();
  for (int i = 0; i < SIZE; i++)
    for (int j = 0; j < SIZE; j++)
      sum->mm[i][j] = a->mm[i][j] ^ b->mm[i][j];
  return sum;
}

// matrixMult: computes the product of two matrices
Matrix matrixMult(Matrix a, Matrix b) {
  Matrix prod = newMatrix();
  for (int i = 0; i < SIZE; i++) {
    for (int j = 0; j < SIZE; j++) {
      for (int k = 0; k < SIZE; k++)
        prod->mm[i][j] += a->mm[i][k] * b->mm[k][j];
       
      prod->mm[i][j] &= 1;
    }
  }
  return prod;
}

// matrixCube: computes the cube of a matrix
Matrix matrixCube(Matrix m) {
  Matrix msq = matrixMult(m, m);
  Matrix mcb = matrixMult(msq, m);
  destroyMatrix(msq);
  return mcb;
}

// matrixFourth: computs the fourth power of a matrix
Matrix matrixFourth(Matrix m) {
  Matrix msq = matrixMult(m, m);
  Matrix mfr = matrixMult(msq, msq);
  destroyMatrix(msq);
  return mfr;
}

// printMatrix: displays a matrix to stdout
void printMatrix(Matrix m) {
  for (int i = 0; i < SIZE; i++) {
    for (int j = 0; j < SIZE; j++)
      printf("%d ", m->mm[i][j]);
    printf("\n");
  }
}
...but then soon enough I realised how shit this code was because it's an \( \mathcal{O}(2^{n^2}) \) algorithm (slow when \(n=5\)) :'( wonder if improvements can be made to it. I know that right now it's checking matrices which aren't of full rank which is redundant. Anyone got suggestions on some easy math that I can probably convert into code to make it faster?
I'm not convinced your method is easier. You needed to recognise that compound angle formula, and even at the end, you have to expand both resulting compound angle trig functions back, and that's a bit of algebra too. Initially, I did a trig sub, saw the sec cubed, and thought it was needlessly complicated because of the high power :P

The intent with my question was as follows.
1. Show that the derivative vanishes.
2. Note that zero derivative means function is constant.
3. Find the value of the constant by plugging in x = 0 to get \(\frac{e^{ix}}{\cos(x) + i\sin(x)} = 1\)

Now it's a matter of semantics. If you define the exponential function by a Taylor series, which is probably the sensible thing to do, Taylor series are initially only defined for real arguments; you have to assume that the Taylor series also holds for complex arguments, which is a priori not a given because we previously have no understanding of the meaning of e^complex number. Once you assume this definition for complex arguments, Euler's identity follows immediately.
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 25, 2018, 11:19:02 pm
I'm not convinced your method is easier. You needed to recognise that compound angle formula, and even at the end, you have to expand both resulting compound angle trig functions back, and that's a bit of algebra too. Initially, I did a trig sub, saw the sec cubed, and thought it was needlessly complicated because of the high power :P
See, maybe I'm wrong because of the HSC vs VCE context, but the auxiliary transform is actually a part of the HSC MX1 syllabus and basically a one-liner :P it's a buzz-kill for those problems here to those who've integrated for a bit too long in their life

Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: lzxnl on December 25, 2018, 11:23:01 pm
See, maybe I'm wrong because of the HSC vs VCE context, but the auxiliary transform is actually a part of the HSC MX1 syllabus and basically a one-liner :P it's a buzz-kill for those problems here to those who've integrated for a bit too long in their life



Fair enough. That was never actually covered in VCE or at university (afaik), so while I learned it in high school (from a HSC textbook ironically), most of my classmates wouldn't have. It really is the same as finding the argument of a complex number though. I didn't even know it was called that tbh.
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: AlphaZero on December 26, 2018, 12:15:21 am
\[ \int \frac{(x-1)\sqrt{x^4+2x^3 +4x^2+2x+1}}{x^2(x+1)}dx \]
Ewwwwwwwwwwww. That's probably the worst I've seen :P  (what a great christmas gift lol)

I'm not going to write out the full working for the Gaussian integral stuff because I'm so tired, but I'll write some brief notes. Perhaps someone can finish it off :D

_______________________________________________________________

Define \[I_n(\alpha)=\int_{-\infty}^\infty x^ne^{-\alpha x^2}dx,\quad\alpha>0,\ n\in\mathbb{N}.\] We are given that \(I_0(1)=\sqrt{\pi}\) and so by scaling \(x\) appropriately, we find that \[I_0(\alpha)=\sqrt{\frac{\pi}{\alpha}}.\]Now, note that if \(n\) is odd, then the integrand is an odd function, and so \[I_{2k-1}(\alpha)\equiv0,\quad k\in\mathbb{N}.\] Therefore, we consider even \(n\).

Making use of the fact that \[I_n(\alpha)=-\frac{\partial}{\partial\alpha}\big[I_{n-2}(\alpha)\big],\]we find that for even \(n\), \[I_n(\alpha)=\frac{(n-1)!!}{(2\alpha)^{n/2}}\sqrt{\frac{\pi}{\alpha}}.\] Substituting in \(\alpha=1\) gives us the final result of \[\int_{-\infty}^\infty x^ne^{-x^2}dx=\begin{cases}0 & \text{odd }n\\ \dfrac{(n-1)!!}{2^{n/2}}\sqrt{\pi} & \text{even }n\end{cases},\quad n\in\mathbb{N}.\]

_______________________________________________________________

But I just wanted to put up some C code for problem set 2 because I thought it was a fun programming exercise.
Code: (22dec2018question.c) [Select]
// Finds and prints the first matrix that works
// If none exists, mention that none exists
// Designed specifically for matrices over Z_2

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

// Size of matrix - can be changed
#define SIZE 4

typedef struct matrixRep *Matrix;
typedef struct matrixRep {
  int mm[SIZE][SIZE];
} _matrix;

Matrix newMatrix();
void destroyMatrix(Matrix m);
unsigned long long maxNumIterations(unsigned int size);
void matrixInit(Matrix m, int i);
void idInit(Matrix id);
void kkInit(Matrix k);
bool matrixCmp(Matrix a, Matrix b);
Matrix matrixAdd(Matrix a, Matrix b);
Matrix matrixMult(Matrix a, Matrix b);
Matrix matrixCube(Matrix m);
Matrix matrixFourth(Matrix m);
void printMatrix(Matrix m);

int main() {

  Matrix m, mcubed, mfourth, msum;
  Matrix id, kk;
  unsigned long long n = maxNumIterations(SIZE);
  bool found = false;

  id = newMatrix();
  idInit(id);
  kk = newMatrix();
  kkInit(kk);

  m = newMatrix();

  for (unsigned long long i = 0; i < n; i++) {
    if (found) break;
    matrixInit(m, i);
    mcubed = matrixCube(m);
    msum = matrixAdd(mcubed, m);
    mfourth = matrixFourth(m);

    if (matrixCmp(msum, kk) && matrixCmp(mfourth, id)) found = true;
    destroyMatrix(mcubed);
    destroyMatrix(msum);
    destroyMatrix(mfourth);
  }

  if (found) {
    printf("Found matrix:\n");
    printMatrix(m);
    printf("\n");
  } else {
    printf("Not found.\n");
  }

  destroyMatrix(id);
  destroyMatrix(kk);
  destroyMatrix(m);
  return 0;
}

// newMatrix: allocates memory for a new matrix
Matrix newMatrix() {
  Matrix new = calloc(1, sizeof(struct matrixRep));
  return new;
}

// destroyMatrix: frees up memory associated with a matrix
void destroyMatrix(Matrix m) {
  free(m);
}

// maxNumIterations: computes 2^(size^2) - the max amount of times
// the loop in the main function can run for
unsigned long long maxNumIterations(unsigned int size) {
  unsigned long long n = 1;
  unsigned long int sizeSq = size*size;
  for (unsigned long int i = 0; i < sizeSq; i++) {
    n <<= 1;
  }
  return n;
}

// matrixInit: sets up m for the current value of i in the main function's loop
void matrixInit(Matrix m, int n) {
  int mask = 1;
  for (int i = 0; i < SIZE; i++) {
    for (int j = 0; j < SIZE; j++) {
      m->mm[i][j] = n & mask;
      mask <<= 1;
      m->mm[i][j] = (m->mm[i][j] == 0) ? 0 : 1;
    }
  }
}

// idInit: sets up the identity matrix
void idInit(Matrix id) {
  int posOfOne = 0;
  for (int i = 0; i < SIZE; i++) {
    for (int j = 0; j < SIZE; j++) {
      if (j == posOfOne) id->mm[i][j] = 1;
      else id->mm[i][j] = 0;
    }
    posOfOne++;
  }
}

// kkInit: sets up the matrix of 1's
void kkInit(Matrix k) {
  for (int i = 0; i < SIZE; i++)
    for (int j = 0; j < SIZE; j++)
      k->mm[i][j] = 1;
}

// matrixCmp: checks if two
bool matrixCmp(Matrix a, Matrix b) {
  bool same = true;
  for (int i = 0; i < SIZE; i++) {
    if (!same) break;
    for (int j = 0; j < SIZE; j++) {
      if (a->mm[i][j] != b->mm[i][j]) {
        same = false;
        break;
      }
    }
  }
  return same;
}

// matrixAdd: computes the sum of two matrices
Matrix matrixAdd(Matrix a, Matrix b) {
  Matrix sum = newMatrix();
  for (int i = 0; i < SIZE; i++)
    for (int j = 0; j < SIZE; j++)
      sum->mm[i][j] = a->mm[i][j] ^ b->mm[i][j];
  return sum;
}

// matrixMult: computes the product of two matrices
Matrix matrixMult(Matrix a, Matrix b) {
  Matrix prod = newMatrix();
  for (int i = 0; i < SIZE; i++) {
    for (int j = 0; j < SIZE; j++) {
      for (int k = 0; k < SIZE; k++)
        prod->mm[i][j] += a->mm[i][k] * b->mm[k][j];
       
      prod->mm[i][j] &= 1;
    }
  }
  return prod;
}

// matrixCube: computes the cube of a matrix
Matrix matrixCube(Matrix m) {
  Matrix msq = matrixMult(m, m);
  Matrix mcb = matrixMult(msq, m);
  destroyMatrix(msq);
  return mcb;
}

// matrixFourth: computs the fourth power of a matrix
Matrix matrixFourth(Matrix m) {
  Matrix msq = matrixMult(m, m);
  Matrix mfr = matrixMult(msq, msq);
  destroyMatrix(msq);
  return mfr;
}

// printMatrix: displays a matrix to stdout
void printMatrix(Matrix m) {
  for (int i = 0; i < SIZE; i++) {
    for (int j = 0; j < SIZE; j++)
      printf("%d ", m->mm[i][j]);
    printf("\n");
  }
}
...but then soon enough I realised how shit this code was because it's an \( \mathcal{O}(2^{n^2}) \) algorithm (slow when \(n=5\)) :'( wonder if improvements can be made to it. I know that right now it's checking matrices which aren't of full rank which is redundant. Anyone got suggestions on some easy math that I can probably convert into code to make it faster?

Yeah, it just grows super really really really fast lol. When I got this problem I did have a think about how to search efficiently, but failed horribly because I'm a terrible programmer. Here were my thoughts nonetheless:

First, take your \(n\times n\) matrix for even \(n\) and form a binary number by taking each row of the matrix and placing them next to each other. That is, \[M=\begin{bmatrix}m_{11} & \dots & m_{1n}\\ \vdots & \ddots & \vdots\\ m_{n1} & \dots & m_{nn} \end{bmatrix}\ \ \text{becomes}\ \ D=\big[m_{11}...m_{1n}\dots m_{n1}...m_{nn}\big].\] Now, there's no point checking matrices that have zero rows or columns, so we can check the digits of \(D\) in blocks of \(n\) for any \(1\)'s. Clearly, if we start checking from \(M=0\) (corresponding to \(D=0\)), then we're going to be checking many matrices with zero rows, so, we should start checking from the lowest number \(D\) that contains at least a \(1\) in every row and column. That number would be formed from matrix with \(1\)'s only on the minor diagonal (with \(0\)'s everywhere else). Then, just start adding \(1\) to \(D\) and if the corresponding matrix contains no zero rows/columns, then check if \(M=M^3\) and \(M^4=I\) simultaneously.

Then again, I'm not sure this would have a great affect though :/
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 26, 2018, 06:09:37 pm
Ewwwwwwwwwwww. That's probably the worst I've seen :P  (what a great christmas gift lol)
Be careful what you wish for ;)
\[ \int \sqrt[4]{\tan x}\,dx \]
(That's not the next question and I ain't touching it either, but you can if you really want to.)

But yeah I give up on that code. After thinking about it again, if I still need to "check" the obvious before computing the matrix powers (e.g. no 0 in each row and column) it's still gonna be an inefficient algorithm.
______________________________________________________

NEXT QUESTION: Ok I'm bored of integrals for now. For the high schoolers:
\[ \text{Find the implied domain of}\\ f(x) = \ln (x^2-4x) \arcsin (x^2-4x-3).\]
For the university students:
\[ \text{Let }X_1, \dots, X_n\text{ be an i.i.d. sequence of }\operatorname{Ber}(p)\text{ random variables.}\\ \text{Prove that }S := \sum_{i=1}^n X_i \sim \operatorname{Bin}(n,p). \]
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: AlphaZero on December 26, 2018, 07:52:49 pm
Be careful what you wish for ;)
\[ \int \sqrt[4]{\tan x}\,dx \]
...

(https://i.imgur.com/ejXFluB.png)

;D lol, there's no way I'm attempting that.

As for the probability question, I'm not too sure how to argue it succinctly. I'm a jaffy, so I haven't taken (and probably won't be able to take) any probability or statistics subjects in Uni. Nonetheless, I'll give the question a go. Probably gonna need some correcting though. I'm just doing a combinatorics argument.
_______________________________________________________________

My dodgy proof
\(S=X_1+\dots+X_n\) counts the number of Bernoulli variables that are equal to \(1\), so \(S\in\left\{0,\dots,n\right\}\). We start by noticing that if we wish to calculate \(\Pr(S=k)\), where \(k\in\left\{0,\dots,n\right\}\), there are \(\binom{n}{k}\) possible cases to consider. Let \(A\) be one of those specific cases. Since \(X_1,\dots,X_n\) are independent, \[\Pr(A)=p^k(1-p)^{n-k}\] because there are \(k\) Bernoulli variables equal to \(1\) with probability \(p\) and \(n-k\) variables equal to \(0\) with probability \(1-p\). Hence, \[\Pr(S=k)=\binom{n}{k}p^k(1-p)^{n-k},\] which is the probability mass function of the binomial distribution. Thus, \(S\sim\text{Bi}(n,p)\).
_______________________________________________________________

I'm having trouble clearly describing what I mean by the event \(A\) being a "specific case". Help?
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 26, 2018, 08:02:25 pm
(https://i.imgur.com/ejXFluB.png)

;D lol, there's no way I'm attempting that.

As for the probability question, I'm not too sure how to argue it succinctly. I'm a jaffy, so I haven't taken (and probably won't be able to take) any probability or statistics subjects in Uni. Nonetheless, I'll give the question a go. Probably gonna need some correcting though. I'm just doing a combinatorics argument.
_______________________________________________________________

My dodgy proof
\(S=X_1+\dots+X_n\) counts the number of Bernoulli variables that are equal to \(1\), so \(S\in\left\{0,\dots,n\right\}\). We start by noticing that if we wish to calculate \(\Pr(S=k)\), where \(k\in\left\{0,\dots,n\right\}\), there are \(\binom{n}{k}\) possible cases to consider. Let \(A\) be one of those specific cases. Since \(X_1,\dots,X_n\) are independent, \[\Pr(A)=p^k(1-p)^{n-k}\] because there are \(k\) Bernoulli variables equal to \(1\) with probability \(p\) and \(n-k\) variables equal to \(0\) with probability \(1-p\). Hence, \[\Pr(S=k)=\binom{n}{k}p^k(1-p)^{n-k},\] which is the probability mass function of the binomial distribution. Thus, \(S\sim\text{Bi}(n,p)\).
_______________________________________________________________

I'm having trouble clearly describing what I mean by the event \(A\) being a "specific case". Help?
(Yeah. Told you to be careful :D)
(Background context - basically \( \int \sqrt{\tan x}\,dx\) is a very popular painful integral. It's so popular that people have went on to discovering more efficient ways of solving it, but they lack a lot less intuition than the original approach. But I didn't want to put that one up because that one is either barely easier or 'on par' with the painful one above. So I just decided to revamp up the power a bit instead 8))

I mean, that proof is fair enough at the first year level I think :P it's basically using enumerative combinatorics here instead. To make \(A\) rigourous, you could comment on something along the lines of for a fixed \(k\), let \(A\) be a particular configuration (or sequence) of the \(n\) Ber(p)'s, and then provide an example - e.g. if \(n=2\) and \(k=1\), a particular configuration could be \(X_1 = 0\) and \(X_2 = 1\)). But if you wanna do a bit of reading, look up "sums of independent random variables" and "convolutions" :)
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: AlphaZero on December 26, 2018, 08:15:59 pm
(Yeah. Told you to be careful :D)
(Background context - basically \( \int \sqrt{\tan x}\,dx\) is a very popular painful integral. It's so popular that people have went on to discovering more efficient ways of solving it, but they lack a lot less intuition than the original approach. But I didn't want to put that one up because that one is either barely easier or 'on par' with the painful one above. So I just decided to revamp up the power a bit instead 8))

I mean, that proof is fair enough at the first year level I think :P it's basically using enumerative combinatorics here instead. To make \(A\) rigourous, you could comment on something along the lines of for a fixed \(k\), let \(A\) be a particular configuration (or sequence) of the \(n\) Ber(p)'s, and then provide an example - e.g. if \(n=2\) and \(k=1\), a particular configuration could be \(X_1 = 0\) and \(X_2 = 1\)). But if you wanna do a bit of reading, look up "sums of independent random variables" and "convolutions" :)

Haha, indeed, even I've tried (and failed) finding more efficient methods for \(\int\sqrt{\tan(x)}\,dx\). (It really is a pain in the a**). I just wanted to see how messy the answer for the fourth root case is :P

For rigorously defining \(A\), I was trying really hard not to give an example lol, though I guess it doesn't hurt to clarify what I mean. I'll be sure to read up on the stuff you mentioned :)
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 26, 2018, 08:35:54 pm
Haha, indeed, even I've tried (and failed) finding more efficient methods for \(\int\sqrt{\tan(x)}\,dx\). (It really is a pain in the a**). I just wanted to see how messy the answer for the fourth root case is :P

For rigorously defining \(A\), I was trying really hard not to give an example lol, though I guess it doesn't hurt to clarify what I mean. I'll be sure to read up on the stuff you mentioned :)
Idk maybe I've just done too much combinatorics over my life but I think giving examples are a great thing.to help illustrate your point. Some things are just hard to explain by nature (especially in combinatorics anyway).

For a clever way of approaching \( \int \sqrt{\tan x} dx\) you may want to consider \( \int \sqrt{\tan x} + \sqrt{\cot x}\,dx \) and \( \int \sqrt{\tan x} - \sqrt{\cot x} \,dx\), and taking half the sum of that.

Anyway just gonna bump this because it fell into the previous page
NEXT QUESTION: Ok I'm bored of integrals for now. For the high schoolers:
\[ \text{Find the implied domain of}\\ f(x) = \ln (x^2-4x) \arcsin (x^2-4x-3).\]
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: Unsplash on December 26, 2018, 11:20:20 pm
\[ \text{Find the implied domain of}\\ f(x) = \ln (x^2-4x) \arcsin (x^2-4x-3).\]

Hope it's ok if answer this question, even though I just finished high school. Don't plan on studying maths at uni so don't think I have too much of an advantage! However, I'm missing my high school maths subjects already, so I thought I could give it a go...

Also, hopefully its correct!

Spoiler

\[ \text{Let} \: f(x)=g(x) \times h(x) \\ \begin{align*} \therefore g(x) &= ln(x^2-4x) \\ h(x) &= arcsin(x^2-4x-3) \end{align*} \\ \implies \text{Domain of } \: f: \text{Dom} \: g \cap \text{Dom} \: h \]

\[ \text{Inside of a log function must be greater than zero.} \\ \therefore x^2-4x>0 \\ \text{By considering the graph, we obtain:} \\ \text{Dom} \: g: (-\infty,0) \cup (4,\infty) \]

\[ \text{Inside of a arcsin function must be between or equal to, -1 and 1.} \\ \therefore -1 \leq x^2-4x-3 \leq 1 \\ 2 \leq x^2-4x \leq 4 \]

\[ \text{Comparing to above, we identify that this domain is a subset of the domain of} \: g \:  \\ \therefore \text{The domain of} \: f \: \text{is the same as the domain of} \: h.\\ \text{Let the domain of} \: h \: \text{be}\: [a,b] \cup [c,d] \\ \text{Solve for the endpoints:} \]

\[x^2-4x=2 \\ \therefore b=2-\sqrt{6} \quad \& \quad c=2+\sqrt{6}\]

\[x^2-4x=4 \\ \therefore a=2-2\sqrt{2}\quad  \& \quad  d=2+2\sqrt{2}\]

\[\therefore \text{Dom} \: h: [2-2\sqrt{2},2-\sqrt{6}] \cup [2+\sqrt{6},2+2\sqrt{2}]\]

\[\implies  \text{Dom} \: f: [2-2\sqrt{2},2-\sqrt{6}] \cup [2+\sqrt{6},2+2\sqrt{2}]\]


EDITS: Many edits to correct poor LaTeX, still probability mistakes lol.
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: lzxnl on December 27, 2018, 01:30:59 am
Be careful what you wish for ;)
\[ \int \sqrt[4]{\tan x}\,dx \]
(That's not the next question and I ain't touching it either, but you can if you really want to.)

But yeah I give up on that code. After thinking about it again, if I still need to "check" the obvious before computing the matrix powers (e.g. no 0 in each row and column) it's still gonna be an inefficient algorithm.
______________________________________________________

NEXT QUESTION: Ok I'm bored of integrals for now. For the high schoolers:
\[ \text{Find the implied domain of}\\ f(x) = \ln (x^2-4x) \arcsin (x^2-4x-3).\]
For the university students:
\[ \text{Let }X_1, \dots, X_n\text{ be an i.i.d. sequence of }\operatorname{Ber}(p)\text{ random variables.}\\ \text{Prove that }S := \sum_{i=1}^n X_i \sim \operatorname{Bin}(n,p). \]

This is how I would attempt to integrate tan(x)^(1/4), although my answer looks a little more complicated than Wolfram Alpha's. Amazingly, all the complex parts cancel out exactly. You're seriously making me dig into my bag of tricks now. I'm going to run out soon.

First step: convert to a rational function.

Second step: do partial fractions with a twist. Keep in mind that in this section, outside summation symbols, k is an integer between 0 and 7 inclusive.

Here, if we pick a value of k=p, and make the following substitution, then for all other values of k, the product will contain a term where j=p and this will vanish the product. Hence, the only value of k that doesn't vanish is the term k=p.

Third step: we will evaluate this product using the factor theorem in reverse. The next statement is true because the zeros are exactly the eight eighth roots of 1. Then, the product we want is the product of all 8 terms divided by 1 specific term, which happens to be 0/0, so use L'Hopital.


Fourth step: I don't want complex numbers, so I will group pair together terms where the zeros of the denominator are conjugate pairs. If you plug in k = 0 to k = 7, you'll find that the denominator for k = 0 and k = 7 are conjugates, k = 1 and k  = 6 are conjugates etc. This motivates the next step. Split the sum into two parts, take m = 7 - k and note that instead of summing k from 4 to 7, you're summing m from 0 to 3, just like the other k values.

Fifth step: our partial fraction decomposition is 'complete'; it turns out that the coefficients are real. I really should have done the simplification here, but no worry. Now we have to actually integrate this.

Sixth step: actually make everything real.

I'm pretty proud of myself for coming up with this. Mathematica confirms that my final integration is indeed correct and it looks neat. Kids, this is what maths is about: solving problems you've not ever seen before in class and feeling good about it afterwards. I've never done partial fractions this way before and I've done one question with a similar polynomial trick. I don't think I could tackle many other values of t, however.

Also, define 'binomial distribution' and 'Bernoulli distribution'. I would argue that a binomial distribution is defined as a sum of iid Bernoulli trials, thus your result is true trivially. If you define them in terms of pmfs, generating functions are handy too. This calculation, however, is trivial compared to that integral. Fark. Thank goodness for Mathematica to check my working along the way.
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 27, 2018, 09:14:15 am
Also, define 'binomial distribution' and 'Bernoulli distribution'. I would argue that a binomial distribution is defined as a sum of iid Bernoulli trials, thus your result is true trivially. If you define them in terms of pmfs, generating functions are handy too. This calculation, however, is trivial compared to that integral. Fark. Thank goodness for Mathematica to check my working along the way.
Yep PMFs. MGFs would make the computations doable in just a few lines so that would work. Didn't think about it at the time but I wasn't trying to make that one hard.
Hope it's ok if answer this question, even though I just finished high school. Don't plan on studying maths at uni so don't think I have too much of an advantage! However, I'm missing my high school maths subjects already, so I thought I could give it a go...

Also, hopefully its correct!

Spoiler

\[ \text{Let} \: f(x)=g(x) \times h(x) \\ \begin{align*} \therefore g(x) &= ln(x^2-4x) \\ h(x) &= arcsin(x^2-4x-3) \end{align*} \\ \implies \text{Domain of } \: f: \text{Dom} \: g \cap \text{Dom} \: h \]

\[ \text{Inside of a log function must be greater than zero.} \\ \therefore x^2-4x>0 \\ \text{By considering the graph, we obtain:} \\ \text{Dom} \: g: (-\infty,0) \cup (4,\infty) \]

\[ \text{Inside of a arcsin function must be between or equal to, -1 and 1.} \\ \therefore -1 \leq x^2-4x-3 \leq 1 \\ 2 \leq x^2-4x \leq 4 \]

\[ \text{Comparing to above, we identify that this domain is a subset of the domain of} \: g \:  \\ \therefore \text{The domain of} \: f \: \text{is the same as the domain of} \: h.\\ \text{Let the domain of} \: h \: \text{be}\: [a,b] \cup [c,d] \\ \text{Solve for the endpoints:} \]

\[x^2-4x=2 \\ \therefore b=2-\sqrt{6} \quad \& \quad c=2+\sqrt{6}\]

\[x^2-4x=4 \\ \therefore a=2-2\sqrt{2}\quad  \& \quad  d=2+2\sqrt{2}\]

\[\therefore \text{Dom} \: h: [2-2\sqrt{2},2-\sqrt{6}] \cup [2+\sqrt{6},2+2\sqrt{2}]\]

\[\implies  \text{Dom} \: f: [2-2\sqrt{2},2-\sqrt{6}] \cup [2+\sqrt{6},2+2\sqrt{2}]\]


EDITS: Many edits to correct poor LaTeX, still probability mistakes lol.
It looked right after you fixed it :D

Next question: Prove the Cauchy-Schwarz inequality for vectors in \(\mathbb{R}^3\) (however you like, but if there's a VCE method then go with that)
\[ |\underset{\sim}{a} \cdot \underset{\sim}{b}| \leq | \underset{\sim}{a} | |\underset{\sim}{b}| \]
(Someone else take over writing questions after this one pls.)

Edit: Yeah no square oops
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: lzxnl on December 27, 2018, 01:30:49 pm
Yep PMFs. MGFs would make the computations doable in just a few lines so that would work. Didn't think about it at the time but I wasn't trying to make that one hard.It looked right after you fixed it :D

Next question: Prove the Cauchy-Schwarz inequality for vectors in \(\mathbb{R}^3\) (however you like, but if there's a VCE method then go with that)
\[ |\underset{\sim}{a} \cdot \underset{\sim}{b}|^2 \leq | \underset{\sim}{a} | |\underset{\sim}{b}| \]
(Someone else take over writing questions after this one pls.)
I'm going to leave this one for someone else. The simplest method for doing this would be related to thinking about why this is true geometrically (I don't think RuiAce wants someone to say 'because \(\cos(\theta) \in [-1,1]\)' btw; this should motivate a proof, however, which is certainly doable at VCE level).

Here's a fun question for you guys. Can \( \int_0^\infty f(x)\,dx\) exist if \(f(x)\) does not decay to zero as \(x\rightarrow\infty\)?
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: AlphaZero on December 27, 2018, 03:22:33 pm
\[ |\underset{\sim}{a} \cdot \underset{\sim}{b}|^2 \leq | \underset{\sim}{a} | |\underset{\sim}{b}| \]
Shouldn't the RHS be \(\left|\underset{\sim}{\text{a}}\right|^2\left|\underset{\sim}{\text{b}}\right|^2\)?

Very cheap solution (sorry)
It's clear that the inequality holds if \(\underset{\sim}{\text{a}}=\underset{\sim}{0}\) or \(\underset{\sim}{\text{b}}=\underset{\sim}{0}\), so we will consider \(\underset{\sim}{\text{a}}\neq \underset{\sim}{0}\) and \(\underset{\sim}{\text{b}}\neq \underset{\sim}{0}\).
\begin{align*}\left|\underset{\sim}{\text{a}}\cdot\underset{\sim}{\text{b}}\right|&=\left|\left|\underset{\sim}{\text{a}}\right|\left|\underset{\sim}{\text{b}}\right|\cos(\theta)\right|\\
&=\left|\underset{\sim}{\text{a}}\right|\left|\underset{\sim}{\text{b}}\right|\left|\cos(\theta)\right|\\
&\leq \left|\underset{\sim}{\text{a}}\right|\left|\underset{\sim}{\text{b}}\right|\quad \Big(0\leq\left|\cos(\theta)\right|\leq 1\Big)\end{align*}


Here's a fun question for you guys. Can \( \int_0^\infty f(x)\,dx\) exist if \(f(x)\) does not decay to zero as \(x\rightarrow\infty\)?

Fun example I came across some time ago
\[\text{Let }f(x)=\begin{cases}1, & x\in[n,\ n+2^{-n}]\\ 0, & \text{elsewhere}\end{cases},\ \ n\in\mathbb{N}\cup\{0\}.\] \[\int_0^\infty f(x)\;dx=\sum_{n=0}^\infty 2^{-n}=2\ \text{ and }\ f(x)\nrightarrow 0\ \text{as}\ x\to\infty.\] So, the answer is yes, it is possible.


Next Questions

For highschool students:
Find the magnitude of the acute angle formed by the two lines in \(\mathbb{R}^2\) given by
\[5\sqrt{3}x+9y=9\ \ \text{and}\ -\!\sqrt{3}x+6y=6.\]
For uni students:
Prove Lagrange's identity
\[\|\mathbf{u}\times\mathbf{v}\|^2=\|\mathbf{u}\|^2\|\mathbf{v}\|^2-(\mathbf{u}\cdot\mathbf{v})^2.\]
Or, if you're not a fan of the algebra required in the above question:

Solve for \(y(t)\) the initial value problem \[\frac{dy}{dt}=\sin(y),\quad y(0)=\alpha\in\mathbb{R}\setminus\{k\pi\mid k\in\mathbb{Z}\}.\] Then, show that \[\lim_{t\to\infty}y(t)=(2m+1)\pi,\quad \text{for some }m\in\mathbb{Z}.\]
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 27, 2018, 03:42:53 pm
Shouldn't the RHS be \(\left|\underset{\sim}{\text{a}}\right|^2\left|\underset{\sim}{\text{b}}\right|^2\)?

Very cheap solution (sorry)
It's clear that the inequality holds if \(\underset{\sim}{\text{a}}=\underset{\sim}{0}\) or \(\underset{\sim}{\text{b}}=\underset{\sim}{0}\), so we will consider \(\underset{\sim}{\text{a}}\neq \underset{\sim}{0}\) and \(\underset{\sim}{\text{b}}\neq \underset{\sim}{0}\).
\begin{align*}\left|\underset{\sim}{\text{a}}\cdot\underset{\sim}{\text{b}}\right|&=\left|\left|\underset{\sim}{\text{a}}\right|\left|\underset{\sim}{\text{b}}\right|\cos(\theta)\right|\\
&=\left|\underset{\sim}{\text{a}}\right|\left|\underset{\sim}{\text{b}}\right|\left|\cos(\theta)\right|\\
&\leq \left|\underset{\sim}{\text{a}}\right|\left|\underset{\sim}{\text{b}}\right|\quad \Big(0\leq\left|\cos(\theta)\right|\leq 1\Big)\end{align*}


Fun example I came across some time ago
\[\text{Let }f(x)=\begin{cases}1, & x\in[n,\ n+2^{-n}]\\ 0, & \text{elsewhere}\end{cases},\ \ n\in\mathbb{N}\cup\{0\}.\] \[\int_0^\infty f(x)\;dx=\sum_{n=0}^\infty 2^{-n}=2\ \text{ and }\ f(x)\nrightarrow 0\ \text{as}\ x\to\infty.\] So, the answer is yes, it is possible.


Next Questions

For highschool students:
Find the magnitude of the acute angle formed by the two lines in \(\mathbb{R}^2\) given by
\[5\sqrt{3}x+9y=9\ \ \text{and}\ -\!\sqrt{3}x+6y=6.\]
For uni students:
Prove Lagrange's identity
\[\|\mathbf{u}\times\mathbf{v}\|^2=\|\mathbf{u}\|^2\|\mathbf{v}\|^2-(\mathbf{u}\cdot\mathbf{v})^2.\]
Or, if you're not a fan of the algebra required in the above question:

Solve for \(y(t)\) the initial value problem \[\frac{dy}{dt}=\sin(y),\quad y(0)=\alpha\in\mathbb{R}\setminus\{k\pi\mid k\in\mathbb{Z}\}.\] Then, show that \[\lim_{t\to\infty}y(t)=(2m+1)\pi,\quad \text{for some }m\in\mathbb{Z}.\]
Maybe I should've put Minkowski's instead.

But yeah, those rectangles remind me about the fun times in real analysis :P exploiting the natural numbers for the triangles/rectangles. (I think I usually used triangles to preserve the continuity of the function, but it wasn't specified here so no matter.) There's also the fancy complex analysis answer of \( \int_0^\infty \cos (x^2) \,dx \) but of course that takes more effort to derive an answer to.
\begin{align*}&\quad\| \mathbf{u}\|^2 \| \mathbf{v} \|^2 - (\mathbf{u} \cdot \mathbf{v})^2\\ &= (u_1^2+u_2^2+u_3^2)(v_1^2+v_2^2+v_3^2) - (u_1v_1+u_2v_2+u_3v_3)^2\\ &= (u_1^2v_1^2+u_2^2v_2^2+u_3^2v_3^2) + (u_1^2v_2^2 + u_1^2v_3^2 + u_2^2v_1^2 + u_2^2 v_3^2 + u_3^2 v_1^2 + u_3^2 v_2^2)\\ &\qquad - (u_1^2 v_1^2 + u_2^2 v_2^2 + u_3^2 v_3^2) - 2(u_1v_1u_2v_2 + u_1v_1u_3v_3 + u_2v_2u_3v_3)\\ &= (u_2^2v_3^2 - 2u_2v_3u_3v_2 + u_3^2v_2^2) + (u_3^2 v_1^2 - 2u_3v_1u_1v_3 + u_1^2v_3^2) + (u_1^2v_2^2 - 2u_1v_2u_2v_1 + u_2^2v_1^2)\\ &= (u_2v_3-u_3v_2)^2 + (u_3v_1-u_1v_3)^2 + (u_1v_2-u_2v_1)^2\\ &= \| \mathbf{u} \times \mathbf{v} \|^2\end{align*}
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: lzxnl on December 27, 2018, 04:09:20 pm
Shouldn't the RHS be \(\left|\underset{\sim}{\text{a}}\right|^2\left|\underset{\sim}{\text{b}}\right|^2\)?

Very cheap solution (sorry)
It's clear that the inequality holds if \(\underset{\sim}{\text{a}}=\underset{\sim}{0}\) or \(\underset{\sim}{\text{b}}=\underset{\sim}{0}\), so we will consider \(\underset{\sim}{\text{a}}\neq \underset{\sim}{0}\) and \(\underset{\sim}{\text{b}}\neq \underset{\sim}{0}\).
\begin{align*}\left|\underset{\sim}{\text{a}}\cdot\underset{\sim}{\text{b}}\right|&=\left|\left|\underset{\sim}{\text{a}}\right|\left|\underset{\sim}{\text{b}}\right|\cos(\theta)\right|\\
&=\left|\underset{\sim}{\text{a}}\right|\left|\underset{\sim}{\text{b}}\right|\left|\cos(\theta)\right|\\
&\leq \left|\underset{\sim}{\text{a}}\right|\left|\underset{\sim}{\text{b}}\right|\quad \Big(0\leq\left|\cos(\theta)\right|\leq 1\Big)\end{align*}


Fun example I came across some time ago
\[\text{Let }f(x)=\begin{cases}1, & x\in[n,\ n+2^{-n}]\\ 0, & \text{elsewhere}\end{cases},\ \ n\in\mathbb{N}\cup\{0\}.\] \[\int_0^\infty f(x)\;dx=\sum_{n=0}^\infty 2^{-n}=2\ \text{ and }\ f(x)\nrightarrow 0\ \text{as}\ x\to\infty.\] So, the answer is yes, it is possible.


Next Questions

For highschool students:
Find the magnitude of the acute angle formed by the two lines in \(\mathbb{R}^2\) given by
\[5\sqrt{3}x+9y=9\ \ \text{and}\ -\!\sqrt{3}x+6y=6.\]
For uni students:
Prove Lagrange's identity
\[\|\mathbf{u}\times\mathbf{v}\|^2=\|\mathbf{u}\|^2\|\mathbf{v}\|^2-(\mathbf{u}\cdot\mathbf{v})^2.\]
Or, if you're not a fan of the algebra required in the above question:

Solve for \(y(t)\) the initial value problem \[\frac{dy}{dt}=\sin(y),\quad y(0)=\alpha\in\mathbb{R}\setminus\{k\pi\mid k\in\mathbb{Z}\}.\] Then, show that \[\lim_{t\to\infty}y(t)=(2m+1)\pi,\quad \text{for some }m\in\mathbb{Z}.\]

I am not a fan of that solution :P although I should really have specified conditions on f, like differentiability. How about proving that RuiAce's solution, \(\int_0^\infty \cos(x^2)\,dx\) actually converges? That's a fairly simple exercise.

RuiAce, you should have specified a general inner product tbh.

Lagrange's identity is really just \(\sin^2(x) + \cos^2(x) = 1\).

The asymptotics of your IVP problem is just a matter of showing that there are stable fixed points. I'll leave that to someone else and do the integration.

etc
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: fun_jirachi on December 27, 2018, 06:49:09 pm
For highschool students:
Find the magnitude of the acute angle formed by the two lines in \(\mathbb{R}^2\) given by
\[5\sqrt{3}x+9y=9\ \ \text{and}\ -\!\sqrt{3}x+6y=6.\]



Was thinking I might get baited because the answer seemed a bit too clean, but here is what I got anyway. :)
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 28, 2018, 09:09:44 am
Yeah I wanted to keep the question within the bounds of VCE terminology so I tried just doing the R^3 case, but now I see that was a mistake lol.

Just gonna prove the convergence because ceebs looking up how to solve that integral right now.
\[ x = \sqrt{u} \implies dx = \frac1{2\sqrt{u}}\,du.\\ u = \frac{1}{s} \implies ds = -\frac{1}{s^2}\,ds.\\ \begin{align*} \int_0^\infty \cos (x^2)\,dx &= \int_0^\infty\frac{1}{2}u^{-1/2}\cos (u)\,du\\ &= \int_0^1 \frac12 u^{-1/2} \cos (u^2)\,du + \int_1^\infty \frac12 u^{-1/2}\cos u\,du \\ &= \int_1^\infty \frac12 s^{1/2} \cos \left( \frac{1}{s^2} \right) s^{-2}\,ds +\int_1^\infty \frac12 u^{-1/2}\cos u\,du \end{align*} \]
\[ \text{For the second integral}\\ \begin{align*} \int_1^\infty u^{-1/2} \cos u\,du &= u^{-1/2} \sin u \big|_1^\infty + \frac12 \int_1^\infty u^{-3/2} \sin u\,du. \end{align*}\\ \text{The former is finite and equals }\sin 1\\ \text{and the latter converges via comparison with the }p\text{-integral }\int_1^\infty u^{-3/2}\,du. \]
Squeeze theorem limit used
\[ 0 = \lim_{u\to \infty} -u^{-1/2} \leq \lim_{u\to \infty} u^{-1/2}\sin u \leq \lim_{u\to \infty} u^{-1/2} = 0\\ \implies \lim_{u\to \infty} u^{-1/2}\sin u = 0 \]
The first integral converges using the same comparison. So puzzling everything together the whole thing converges.


Was thinking I might get baited because the answer seemed a bit too clean, but here is what I got anyway. :)
It's harder for the VCE students because they don't have that nice formula that we do. In the HSC your approach would be the intended approach
_________________________________________________________

Continuing,
\begin{align*}e^t &= \frac{\tan \frac{y}{2}}{\tan \frac{\alpha}{2}} \\ y &= 2 \arctan \left( e^t \tan \frac{\alpha}{2} \right) + 2m\pi \end{align*}
where \(m \in \mathbb{Z}\).
\[ \text{As }\alpha\text{ is not an integer multiple of }\pi,\\ \tan \frac{\alpha}{2} \text{ is well defined and not equal to 0.}\\ \text{If }\tan \alpha > 0,\, 2\arctan \left( e^t \tan \frac{\alpha}{2} \right) \to 2\times \frac\pi2 = \pi\text{ and we're done.}\\ \text{Otherwise it just approaches }-\frac\pi2\text{ instead, but then sub }m=n+1\text{ and we're also done.} \]
_________________________________________________________

Next question:
High school:
\[ \text{1. Prove that }\sum_{k=1}^n k^2 = \frac16 n (n+1)(2n+1)\\ \text{2. Now derive it from scratch.} \]
First year/Second year university:
\[ \text{Show that in general, }\lim_{x\to a} \lim_{y\to b} f(x,y) \neq \lim_{y\to b} \lim_{x\to a} f(x,y)\\ \text{where }a, b \in \mathbb{R} \cup \{\infty\} \]
Try to construct a routine counterexample, and also a creative counterexample.

Beyond:
Label the vertices of \(K_5\) 1, 2, 3, 4 and 5, where \(K_n\) is the complete graph on \(n\) vertices. Suppose that two Euler circuits are the same if their sequences of edges are up to the same rotational symmetry. (For example 1-2-3-4-5-1-3-5-2-4-1 would be the same as 2-3-4-5-1-3-5-2-4-1-2).
1. Explain why \(K_3\) has only two distinct Euler circuits (easy warm-up)
2. Carefully prove that \(K_5\) has 264 distinct Euler circuits.
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: lzxnl on December 28, 2018, 11:47:10 am
Yeah I wanted to keep the question within the bounds of VCE terminology so I tried just doing the R^3 case, but now I see that was a mistake lol.

Just gonna prove the convergence because ceebs looking up how to solve that integral right now.
\[ x = \sqrt{u} \implies dx = \frac1{2\sqrt{u}}\,du.\\ u = \frac{1}{s} \implies ds = -\frac{1}{s^2}\,ds.\\ \begin{align*} \int_0^\infty \cos (x^2)\,dx &= \int_0^\infty\frac{1}{2}u^{-1/2}\cos (u)\,du\\ &= \int_0^1 \frac12 u^{-1/2} \cos (u^2)\,du + \int_1^\infty \frac12 u^{-1/2}\cos u\,du \\ &= \int_1^\infty \frac12 s^{1/2} \cos \left( \frac{1}{s^2} \right) s^{-2}\,ds +\int_1^\infty \frac12 u^{-1/2}\cos u\,du \end{align*} \]
\[ \text{For the second integral}\\ \begin{align*} \int_1^\infty u^{-1/2} \cos u\,du &= u^{-1/2} \sin u \big|_1^\infty + \frac12 \int_1^\infty u^{-3/2} \sin u\,du. \end{align*}\\ \text{The former is finite and equals }\sin 1\\ \text{and the latter converges via comparison with the }p\text{-integral }\int_1^\infty u^{-3/2}\,du. \]
Squeeze theorem limit used
\[ 0 = \lim_{u\to \infty} -u^{-1/2} \leq \lim_{u\to \infty} u^{-1/2}\sin u \leq \lim_{u\to \infty} u^{-1/2} = 0\\ \implies \lim_{u\to \infty} u^{-1/2}\sin u = 0 \]
The first integral converges using the same comparison. So puzzling everything together the whole thing converges.It's harder for the VCE students because they don't have that nice formula that we do. In the HSC your approach would be the intended approach
_________________________________________________________

Continuing,
\begin{align*}e^t &= \frac{\tan \frac{y}{2}}{\tan \frac{\alpha}{2}} \\ y &= 2 \arctan \left( e^t \tan \frac{\alpha}{2} \right) + 2m\pi \end{align*}
where \(m \in \mathbb{Z}\).
\[ \text{As }\alpha\text{ is not an integer multiple of }\pi,\\ \tan \frac{\alpha}{2} \text{ is well defined and not equal to 0.}\\ \text{If }\tan \alpha > 0,\, 2\arctan \left( e^t \tan \frac{\alpha}{2} \right) \to 2\times \frac\pi2 = \pi\text{ and we're done.}\\ \text{Otherwise it just approaches }-\frac\pi2\text{ instead, but then sub }m=n+1\text{ and we're also done.} \]
_________________________________________________________

Next question:
High school:
\[ \text{1. Prove that }\sum_{k=1}^n k^2 = \frac16 n (n+1)(2n+1)\\ \text{2. Now derive it from scratch.} \]
First year/Second year university:
\[ \text{Show that in general, }\lim_{x\to a} \lim_{y\to b} f(x,y) \neq \lim_{y\to b} \lim_{x\to a} f(x,y)\\ \text{where }a, b \in \mathbb{R} \cup \{\infty\} \]
Try to construct a routine counterexample, and also a creative counterexample.

Beyond:
Label the vertices of \(K_5\) 1, 2, 3, 4 and 5, where \(K_n\) is the complete graph on \(n\) vertices. Suppose that two Euler circuits are the same if their sequences of edges are up to the same rotational symmetry. (For example 1-2-3-4-5-1-3-5-2-4-1 would be the same as 2-3-4-5-1-3-5-2-4-1-2).
1. Explain why \(K_3\) has only two distinct Euler circuits (easy warm-up)
2. Carefully prove that \(K_5\) has 264 distinct Euler circuits.
Yeah that's how you would prove the convergence. As for actually calculating the integral, you would consider the real part of \(\int_0^\infty e^{ix^2}\,dx\) and consider a sector of angle \(\frac{\pi}{4}\) in the complex plane; the arc at infinity vanishes, the total integral is zero by Cauchy's integral theorem, and the integral along the ray is a Gaussian integral.

I love the sum question. I think I posted a solution to this on a VCE maths thread somewhere.

For the limit question, the cheapest example I can think of is non-uniform convergence, if we take one of x, y to be an index for a sequence of functions.

My graph theory is horrendous so I'm going to sit out the second one. The first one looks like mirror images though. I'm going to refrain from actually solving questions now to give others a shot too.

Here are some for high school students.
1. Prove the cosine rule in trigonometry using properties of the vector dot product
2. Fully expand \(\sin(5x)\) in terms of powers of \(\sin(x)\). Use this result to find \(\sin\left(\frac{2\pi}{5}\right)\). You may encounter a quintic equation. One of the solutions, which you should be able to show isn't \(\sin\left(\frac{2\pi}{y}\right)\), should be easy to find/guess. Factorise that, and the resulting quartic should be easily solvable.
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: fun_jirachi on December 28, 2018, 02:21:15 pm
High school:
\[ \text{1. Prove that }\sum_{k=1}^n k^2 = \frac16 n (n+1)(2n+1)\\ \text{2. Now derive it from scratch.} \]

1. Rephrasing the question,


Before I start Q2, am I allowed to know the result from Q1 and work towards it? Or do I have to derive derive it? :(
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 28, 2018, 02:29:23 pm
Before I start Q2, am I allowed to know the result from Q1 and work towards it? Or do I have to derive derive it? :(
It says from scratch. So derive derive it. :P

Never anything wrong with rephrasing it but may be worth noting that it can still be done in the sigma notation form.
\[ \text{Assuming that }\sum_{k=1}^K k^2 = \frac{1}{6}K(K+1)(2K+1)\text{ we have}\\ \begin{align*}\sum_{k=1}^{K+1}k^2 &= \sum_{k=1}^K k^2 + (K+1)^2\\ &= \frac16K(K+1)(2K+1) \tag{assumption}\end{align*}\\ \text{and then continue as you've already done so} \]
Basically this is the technique of "pulling terms out of the sum".
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: fun_jirachi on December 28, 2018, 03:37:47 pm
2. Fully expand \(\sin(5x)\) in terms of powers of \(\sin(x)\). Use this result to find \(\sin\left(\frac{2\pi}{5}\right)\). You may encounter a quintic equation. One of the solutions, which you should be able to show isn't \(\sin\left(\frac{2\pi}{y}\right)\), should be easy to find/guess. Factorise that, and the resulting quartic should be easily solvable.



The derivation derivation is coming, this question just seemed a lot friendlier. :)

EDIT: working on that right now, but also if you guys have time can you try and find the mistakes in the code? I've been trying for about 45 minutes (15 minutes typing, 45 minutes looking for errors) and I can't find them, super frustrating :(
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 28, 2018, 04:03:00 pm
Quote tags intentionally removed, but for the sake of reference this is basically from the post immediately above.
\\ \\ \\ \\

The derivation derivation is coming, this question just seemed a lot friendlier. :)

EDIT: working on that right now, but also if you guys have time can you try and find the mistakes in the code? I've been trying for about 45 minutes (15 minutes typing, 45 minutes looking for errors) and I can't find them, super frustrating :(
end quote

The enter keys in the align* environment damaged most of the code. Once I took all of them out a lot of it fixed itself automatically. Following that I've chopped your code up into bits and pieces (you can use Ctrl+F and search tex) to find where the chopping up occurred. From what I can see, some \right) 's are missing!

Also a set of newline \\ characters are missing after your align* environment I think
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: fun_jirachi on December 28, 2018, 04:23:01 pm
Okay, thanks so much Rui! I'll edit that right now, it looks awful.

I'm going to drop the solutions for the derivation of the sum of squares. I panicked a little bit for about the first half hour, but once I realised the end result was a polynomial, and the intuition behind plugging a number into a function and getting a number back, it wasn't that much harder than the induction proof.
Hope you guys can read my handwriting, haven't posted a picture in a while.
Page 1
(https://i.imgur.com/LKRYgT5.jpg)
Page 2
(https://i.imgur.com/dASansM.jpg)
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 28, 2018, 04:41:13 pm
Okay, thanks so much Rui! I'll edit that right now, it looks awful.

I'm going to drop the solutions for the derivation of the sum of squares. I panicked a little bit for about the first half hour, but once I realised the end result was a polynomial, and the intuition behind plugging a number into a function and getting a number back, it wasn't that much harder than the induction proof.
Hope you guys can read my handwriting, haven't posted a picture in a while.
Page 1
(https://i.imgur.com/LKRYgT5.jpg)
Page 2
(https://i.imgur.com/dASansM.jpg)
Nice solution! To make the pattern you identified in part iii) appear a bit more obvious to the reader, you can argue it like this.
\[ \text{Claim: Given a sequence defined by a quadratic function, the common difference of }\textit{those}\text{ terms form an A.P.}\\ \text{Proof: Let }T_k = f(k)\text{ where }f(x) = ax^2+bx+c.\text{ Then,}\\ \begin{align*}T_{k+1} - T_k &= f(k+1) - f(k)\\ &= a(k+1)^2 + b(k+1) + c - ak^2 - bk - c\\ &= 2ak + (1+b) \end{align*}\\ \text{hence the differences form an arithmetic progression with common difference }2a. \]
You can then replicate this proof to make your claim about the common difference with sequences defined by cubic equations. That's enough to suggest that \(T_k = \text{some cubic function in terms of }k\) can be used to model the scenario you have right there! And of course, nothing else to comment on with the simultaneous equations.

The usual method is to consider the expression \( \sum_{k=1}^n (k+1)^3 + \sum_{k=1}^n (k-1)^3 \). On one hand,
\begin{align*} \sum_{k=1}^n (k+1)^3 - \sum_{k=1}^n (k-1)^3 &= \sum_{k=1}^n [(k+1)^3 - (k-1)^3]\\ &\vdots\\ &= 2\sum_{k=1}^n k^2 + 2\sum_{k=1}^n1 \end{align*}
And on the other hand,
\begin{align*}\sum_{k=1}^n (k+1)^3 - \sum_{k=1}^n (k-1)^3 &=[2^3 + \dots + (n-1)^3+ n^3 + (n+1)^3] - [0^3 + 1^3 + 2^3 + \dots + (n-1)^3]\\ &= n^3 + (n+1)^3 - 1^3\end{align*}
You can fill in the details of this proof if you want to or someone else can :P
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: AlphaZero on December 28, 2018, 04:52:27 pm
Fixing code (and condensing it) for @fun_jirachi. Few closing brackets missing and random returns in align environment where there shouldn't be one.
________________________________________________________________
\begin{align*}\sin(5x)&=\text{Im}\Big[\cos(5x)+i\sin(5x)\Big]\\
&=\text{Im}\Big[\big(\cos(x)+i\sin(x)\big)^5\Big]\\
&=\text{Im}\Big[\cos^5(x)+5\cos^4(x)\cdot i\sin(x)+10\cos^3(x)\cdot i^2\sin^2(x)+10\cos^2(x)\cdot i^3\sin^3(x)+5\cos(x)\cdot i^4\sin^4(x)+i^5\sin^5(x)\Big]\\
&\vdots\\
&=16\sin^5(x)-20\sin^3(x)+5\sin(x)\end{align*}
Subbing in \(x=\dfrac{2\pi}{5}\) gives \[0=16\sin^5\left(\frac{2\pi}{5}\right)-20\sin^3\left(\frac{2\pi}{5}\right)+5\sin\left(\frac{2\pi}{5}\right).\] Since \(\sin\left(\dfrac{2\pi}{5}\right)\neq0\), we have \[0=16\sin^4\left(\frac{2\pi}{5}\right)-20\sin^2\left(\frac{2\pi}{5}\right)+5.\]
Using the quadratic formula,
\begin{align*}\sin^2\left(\frac{2\pi}{5}\right)&=\frac{20\pm\sqrt{400-320}}{32}\\
&=\frac{5\pm\sqrt{5}}{8}\\
&\vdots\\
&\vdots\ \ (\text{more work required.}) \end{align*}
_______________________________________________________________

I'm going to stop it here since your solution isn't complete.
\(\sin^2\left(\dfrac{2\pi}{5}\right)\) can't be two values at the same time and you also need to justify taking the positive root both times.
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: fun_jirachi on December 28, 2018, 06:05:50 pm
2. Fully expand \(\sin(5x)\) in terms of powers of \(\sin(x)\). Use this result to find \(\sin\left(\frac{2\pi}{5}\right)\). You may encounter a quintic equation. One of the solutions, which you should be able to show isn't \(\sin\left(\frac{2\pi}{y}\right)\), should be easy to find/guess. Factorise that, and the resulting quartic should be easily solvable.


Sorry for the repost, but this is the full solution (given that Dan kindly pointed out that I'm missing a few things at the end (oops, totally uncharacteristic of me to overlook such obvious things)). Also, it's a lot neater than the pile of trash I posted a few hours ago :P



EDIT:
You can fill in the details of this proof if you want to or someone else can :P

After today's frustration both at my lack of coding skill and intuition, I literally can't be bothered. :P
 
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 28, 2018, 06:14:28 pm
snip
To argue the choice of the positive root you're okay to assume that \(y = \sin^2 x\) is monotonic increasing for all \(0 < x < \frac\pi2\), however you haven't used that to convince me about anything. You're just saying that \(\sin^2 \frac{2\pi}{5} \) is closer to \( \sin^2\frac\pi2 \) than \(\sin^2 0\), but it doesn't tell us any information of "by how much is it closer".

One way to work around this issue is to note furthermore that \( \sin^2 \frac{\pi}{4} = \frac12 \). Note that \( \frac{5-\sqrt5}{8} < \frac12 < \frac{5 + \sqrt5}{8} \), and also because \(\sin^2x \) is monotonic increasing, we also have \( \sin^2 \frac{\pi}{4} < \sin^2 \frac{2\pi}{5} \). Thus by pairing it off we end up with \(\sin^2 \frac{2\pi}{5} = \frac{5+\sqrt5}{8} \)

Man, you have so much time on your hands with these questions! You must be done with all two of your TuteSmart assignments already! :P
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: fun_jirachi on December 28, 2018, 06:28:09 pm
To argue the choice of the positive root you're okay to assume that \(y = \sin^2 x\) is monotonic increasing for all \(0 < x < \frac\pi2\), however you haven't used that to convince me about anything. You're just saying that \(\sin^2 \frac{2\pi}{5} \) is closer to \( \sin^2\frac\pi2 \) than \(\sin^2 0\), but it doesn't tell us any information of "by how much is it closer".

One way to work around this issue is to note furthermore that \( \sin^2 \frac{\pi}{4} = \frac12 \). Note that \( \frac{5-\sqrt5}{8} < \frac12 < \frac{5 + \sqrt5}{8} \), and also because \(\sin^2x \) is monotonic increasing, we also have \( \sin^2 \frac{\pi}{4} < \sin^2 \frac{2\pi}{5} \). Thus by pairing it off we end up with \(\sin^2 \frac{2\pi}{5} = \frac{5+\sqrt5}{8} \)

Huh, I really don't know why that didn't occur to me. Every time I read what I wrote, I feel more and more stupid, but I'll keep inequalities in mind when doing stuff like this in the future.

Man, you have so much time on your hands with these questions! You must be done with all two of your TuteSmart assignments already! :P

Nope, just a fat cbbs :P
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on December 30, 2018, 04:04:49 pm
And yeah non-uniform convergence works. I would've just used this guy:
\[ f(x,y) = \frac{x^2}{x^2+y^2}\text{ with limits as }x\to 0, \, y\to 0 \]
Alternatively just use the example in the previous question:
\[ f(x,y) = 2\arctan \left(e^x \tan \frac{y}{2} \right)\text{ with limits as }y\to 0, x\to \infty\]
High school questions: Well firstly there's still this one which I will leave alone.
1. Prove the cosine rule in trigonometry using properties of the vector dot product
Otherwise this is a relatively straightforward matrix question provided you know what induction is.
\[ \text{Let }D\text{ be a diagonal matrix. Use mathematical induction to prove that for }n\in \mathbb{Z}_+\\ \text{the terms of }D^n\text{ are just the individual components raised to the }n\text{-th power.} \]
First year university: Another straightforward one.
\[ \text{Let }A\text{ be a square matrix with eigenvalue }\lambda \text{ and eigenvector }\mathbf{v}.\\ \text{Prove by induction that }\mathbf{v}\text{ is an eigenvalue of }A^n\text{ where }n \in \mathbb{Z}_+\\ \text{and find the corresponding eigenvalue.}\]
First year university:
\[ \text{Show that if }\lambda\text{ is an eigenvalue of }A\in \mathbb{R}^{n\times n}\\ \text{then it is also an eigenvalue of }A^T\]
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: lzxnl on December 30, 2018, 06:43:56 pm
And yeah non-uniform convergence works. I would've just used this guy:
\[ f(x,y) = \frac{x^2}{x^2+y^2}\text{ with limits as }x\to 0, \, y\to 0 \]
Alternatively just use the example in the previous question:
\[ f(x,y) = 2\arctan \left(e^x \tan \frac{y}{2} \right)\text{ with limits as }y\to 0, x\to \infty\]
High school questions: Well firstly there's still this one which I will leave alone.Otherwise this is a relatively straightforward matrix question provided you know what induction is.
\[ \text{Let }D\text{ be a diagonal matrix. Use mathematical induction to prove that for }n\in \mathbb{Z}_+\\ \text{the terms of }D^n\text{ are just the individual components raised to the }n\text{-th power.} \]
First year university: Another straightforward one.
\[ \text{Let }A\text{ be a square matrix with eigenvalue }\lambda \text{ and eigenvector }\mathbf{v}.\\ \text{Prove by induction that }\mathbf{v}\text{ is an eigenvalue of }A^n\text{ where }n \in \mathbb{Z}_+\\ \text{and find the corresponding eigenvalue.}\]
First year university:
\[ \text{Show that if }\lambda\text{ is an eigenvalue of }A\in \mathbb{R}^{n\times n}\\ \text{then it is also an eigenvalue of }A^T\]
Ah yes, multivariate calc 101. I should know this, I taught a tutorial for that subject last semester. So many of those 0/0 limits that don't exist.

I love writing diagonal matrices using Kronecker deltas and using Einstein summation; makes all the working so pleasant to read.
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: redpanda83 on December 31, 2018, 05:09:21 pm
Hi
can someone help me out  with these two questions.
What is required to do them? I would like to learn.  ;D
I got them from here 2018 melb uni maths comp senior division
link to exam - http://www.mathscomp.ms.unimelb.edu.au/archive/2018SP.pdf
Thanks!

Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: Unsplash on December 31, 2018, 05:43:47 pm
Hi
can someone help me out  with these two questions.
What is required to do them? I would like to learn.  ;D
I got them from here 2018 melb uni maths comp senior division
link to exam - http://www.mathscomp.ms.unimelb.edu.au/archive/2018SP.pdf
Thanks!

Hey redpanda83,

I am going to be absolutely no help at all explaining the solution. But have you had a look at the solutions provided by Melbourne Uni?

Link to solutions

For anyone interested, all past papers & solutions for each division and year can be found here.
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: redpanda83 on December 31, 2018, 05:52:14 pm
Hey redpanda83,

I am going to be absolutely no help at all explaining the solution. But have you had a look at the solutions provided by Melbourne Uni?

Link to solutions

For anyone interested, all past papers & solutions for each division and year can be found here.
Thanks for your suggestion Felix
I looked at the solutions before but i dont completely understand them. The techniques they use, i dont know what they are. I was able to get other questions done without no issue but question 2 and 6 doesnt work out for me. I thought someone here might be able to explain them.  :D
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: Unsplash on December 31, 2018, 06:23:16 pm
Thanks for your suggestion Felix
I looked at the solutions before but i dont completely understand them. The techniques they use, i dont know what they are. I was able to get other questions done without no issue but question 2 and 6 doesnt work out for me. I thought someone here might be able to explain them.  :D

Ok, I've had a look at question 6 and I'll have a crack. No guarantee on the accuracy though...

Each number in the sequence has the form:
\[101010101...1010101=10^0+10^2+10^4+...+10^{2n} \quad where \: n>1\]
\[\text{If we divide by 99 we get } \frac{1}{99}(99(10^0+10^2+10^4+...+10^{2n})) \\ =\frac{1}{99}(10^2-1)(10^0+10^2+10^4+...+10^{2n})\]
\[\text{"Expanding" the brackets we get: } \frac{1}{99}(10^{2+0}+10^{2+2}+10^{4+2}...+10^{2n+2} - (10^0+10^2+10^4+...+10^{2n}))\]
\[\text{Then cancelling, leaves us with: }\frac{1}{99}(10^{2(n+1)}-1) \]
\[\text{Using difference of two squares we can obtain: }\frac{1}{99}(10^{n+1}-1)(10^{n+1}+1) \]
\[\text{As }n>1\text{ both the factors } 10^{n+1}-1 \quad \& \quad 10^{n+1}+1 \text{ are greater than 99. Therefore, all numbers excluding 101 are not prime.}\]
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: AlphaZero on May 25, 2019, 01:02:35 am
I feel like reviving this thread.

For highschool students

a)     Where \(a>0\), show that \(\displaystyle \int_{0}^a \!\Big(f(x)+f(-x)\Big)dx=\int_{-a}^a f(x)\,dx\).

b)     Hence, find \(\displaystyle \int_{-1}^1 \frac{x^n}{e^x+1}dx\), in terms of \(n\), where \(n>0\).

For university students

Let \(C\) be the curve given by  \(3x^2+y^2=1\)  oriented anticlockwise, and let \[\mathbf{F}(x,y)=\left(\frac{-y}{x^2+y^2},\ \frac{x}{x^2+y^2}\right).\] Evaluate  \(\displaystyle \int_C \mathbf{F}\cdot d\mathbf{s}\).
Title: Re: "Challenge" Math Qs - Can You Figure It Out?
Post by: RuiAce on May 25, 2019, 09:03:01 am
For university students

Let \(C\) be the curve given by  \(3x^2+y^2=1\)  oriented anticlockwise, and let \[\mathbf{F}(x,y)=\left(\frac{-y}{x^2+y^2},\ \frac{x}{x^2+y^2}\right).\] Evaluate  \(\displaystyle \int_C \mathbf{F}\cdot d\mathbf{s}\).
Isn't this just a regular path integral? Or are you trying to throw off the people who think the answer is 0