Commutative Property Of Addition 2. If A is an n×m matrix and O is a m×k zero-matrix, then we have: AO = O Note that AO is the n×k zero-matrix. Matrix Matrix Multiplication 11:09. We have 1. To understand the properties of transpose matrix, we will take two matrices A and B which have equal order. The identity matrix is a square matrix that has 1’s along the main diagonal and 0’s for all other entries. In a triangular matrix, the determinant is equal to the product of the diagonal elements. This matrix is often written simply as $$I$$, and is special in that it acts like 1 in matrix multiplication. Is the Inverse Property of Matrix Addition similar to the Inverse Property of Addition? The identity matrices (which are the square matrices whose entries are zero outside of the main diagonal and 1 on the main diagonal) are identity elements of the matrix product. Learning Objectives. In fact, this tutorial uses the Inverse Property of Addition and shows how it can be expanded to include matrices! Keywords: matrix; matrices; inverse; additive; additive inverse; opposite; Background Tutorials . Matrix Multiplication Properties 9:02. 16. Proof. There are a few properties of multiplication of real numbers that generalize to matrices. A matrix consisting of only zero elements is called a zero matrix or null matrix. Properties of Matrix Addition and Scalar Multiplication. What is the Identity Property of Matrix Addition? General properties. Yes, it is! There are 10 important properties of determinants that are widely used. Go through the properties given below: Assume that, A, B and C be three m x n matrices, The following properties holds true for the matrix addition operation. The determinant of a 4×4 matrix can be calculated by finding the determinants of a group of submatrices. 13. If you built a random matrix and took its determinant, how likely would it be that you got zero? The first element of row one is occupied by the number 1 … In mathematics, matrix addition is the operation of adding two matrices by adding the corresponding entries together. Equality of matrices All-zero Property. Multiplying a $2 \times 3$ matrix by a $3 \times 2$ matrix is possible, and it gives a $2 \times 2$ matrix … Properties of Transpose of a Matrix. The Commutative Property of Matrix Addition is just like the Commutative Property of Addition! The Distributive Property of Matrices states: A ( B + C ) = A B + A C Also, if A be an m × n matrix and B and C be n × m matrices, then Addition: There is addition law for matrix addition. Likewise, the commutative property of multiplication means the places of factors can be changed without affecting the result. Then the following properties hold: a) A+B= B+A(commutativity of matrix addition) b) A+(B+C) = (A+B)+C (associativity of matrix addition) c) There is a unique matrix O such that A+ O= Afor any m× nmatrix A. Since Theorem SMZD is an equivalence (Proof Technique E) we can expand on our growing list of equivalences about nonsingular matrices. Properties of matrix addition. Let A, B, and C be mxn matrices. The determinant of a 3 x 3 matrix (General & Shortcut Method) 15. PROPERTIES OF MATRIX ADDITION PRACTICE WORKSHEET. You should only add the element of one matrix to … Property 1 completes the argument. Let A, B, and C be three matrices of same order which are conformable for addition and a, b be two scalars. This means if you add 2 + 1 to get 3, you can also add 1 + 2 to get 3. For any natural number n > 0, the set of n-by-n matrices with real elements forms an Abelian group with respect to matrix addition. This tutorial uses the Commutative Property of Addition and an example to explain the Commutative Property of Matrix Addition. This project was created with Explain Everything™ Interactive Whiteboard for iPad. (i) A + B = B + A [Commutative property of matrix addition] (ii) A + (B + C) = (A + B) +C [Associative property of matrix addition] (iii) ( pq)A = p(qA) [Associative property of scalar multiplication] Let A, B, C be m ×n matrices and p and q be two non-zero scalars (numbers). In this lesson, we will look at this property and some other important idea associated with identity matrices. So if n is different from m, the two zero-matrices are different. Andrew Ng. Matrices rarely commute even if AB and BA are both defined. What is a Variable? Addition and Scalar Multiplication 6:53. The addition of the condition $\detname{A}\neq 0$ is one of the best motivations for learning about determinants. ... although it is associative and is distributive over matrix addition. Question 1 : then, verify that A + (B + C) = (A + B) + C. Solution : Question 2 : then verify: (i) A + B = B + A (ii) A + (- A) = O = (- A) + A. This tutorial introduces you to the Identity Property of Matrix Addition. Instructor. Transcript. Important Properties of Determinants. Properties involving Addition and Multiplication: Let A, B and C be three matrices. Matrix addition and subtraction, where defined (that is, where the matrices are the same size so addition and subtraction make sense), can be turned into homework problems. A. Addition and Subtraction of Matrices: In matrix algebra the addition and subtraction of any two matrix is only possible when both the matrix is of same order. Selecting row 1 of this matrix will simplify the process because it contains a zero. We state them now. A diagonal matrix is called the identity matrix if the elements on its main diagonal are all equal to $$1.$$ (All other elements are zero). Question: THEOREM 2.1 Properties Of Matrix Addition And Scalar Multiplication If A, B, And C Are M X N Matrices, And C And D Are Scalars, Then The Properties Below Are True. A B _____ Commutative property of addition 2. Unlike matrix addition, the properties of multiplication of real numbers do not all generalize to matrices. Let A, B, and C be three matrices. 8. det A = 0 exactly when A is singular. 2. In other words, the placement of addends can be changed and the results will be equal. Then we have the following properties. 17. The basic properties of matrix addition is similar to the addition of the real numbers. Then we have the following: (1) A + B yields a matrix of the same order (2) A + B = B + A (Matrix addition is commutative) Properties of scalar multiplication. (A+B)+C = A + (B+C) 3. where is the mxn zero-matrix (all its entries are equal to 0); 4. if and only if B = -A. If the rows of the matrix are converted into columns and columns into rows, then the determinant remains unchanged. Laplace’s Formula and the Adjugate Matrix. 14. Matrix multiplication shares some properties with usual multiplication. 4. Question 3 : then find the additive inverse of A. the identity matrix. Properties of Matrix Addition (1) A + B + C = A + B + C (2) A + B = B + A (3) A + O = A (4) A + − 1 A = 0. Find the composite of transformations and the inverse of a transformation. Created by the Best Teachers and used by over 51,00,000 students. Use the properties of matrix multiplication and the identity matrix Find the transpose of a matrix THEOREM 2.1: PROPERTIES OF MATRIX ADDITION AND SCALAR MULTIPLICATION If A, B, and C are m n matrices, and c and d are scalars, then the following properties are true. Matrix Multiplication - General Case. Properties involving Addition. The commutative property of addition means the order in which the numbers are added does not matter. Properties involving Multiplication. A+B = B+A 2. Given the matrix D we select any row or column. Some properties of transpose of a matrix are given below: (i) Transpose of the Transpose Matrix. Note that we cannot use elimination to get a diagonal matrix if one of the di is zero. Question 1 : then, verify that A + (B + C) = (A + B) + C. Question 2 : then verify: (i) A + B = B + A (ii) A + (- A) = O = (- A) + A. When the number of columns of the first matrix is the same as the number of rows in the second matrix then matrix multiplication can be performed. The inverse of 3 x 3 matrix with determinants and adjugate . The order of the matrices must be the same; Subtract corresponding elements; Matrix subtraction is not commutative (neither is subtraction of real numbers) Matrix subtraction is not associative (neither is subtraction of real numbers) Scalar Multiplication. The inverse of 3 x 3 matrices with matrix row operations. Properties of matrix multiplication. Properties of Matrix Addition, Scalar Multiplication and Product of Matrices. EduRev, the Education Revolution! As with the commutative property, examples of operations that are associative include the addition and multiplication of real numbers, integers, and rational numbers. Matrix multiplication is really useful, since you can pack a lot of computation into just one matrix multiplication operation. Proposition (commutative property) Matrix addition is commutative, that is, for any matrices and and such that the above additions are meaningfully defined. 11. Numerical and Algebraic Expressions. The determinant of a 2 x 2 matrix. We can also say that the determinant of the matrix and its transpose are equal. Matrix Vector Multiplication 13:39. 12. Examples . In that case elimination will give us a row of zeros and property 6 gives us the conclusion we want. This property is known as reflection property of determinants. The inverse of a 2 x 2 matrix. However, unlike the commutative property, the associative property can also apply to matrix … The matrix O is called the zero matrix and serves as the additiveidentity for the set of m×nmatrices. 1. Best Videos, Notes & Tests for your Most Important Exams. To find the transpose of a matrix, we change the rows into columns and columns into rows. Properties of Matrix Addition: Theorem 1.1Let A, B, and C be m×nmatrices. However, there are other operations which could also be considered addition for matrices, such as the direct sum and the Kronecker sum Entrywise sum. The determinant of a matrix is zero if each element of the matrix is equal to zero. A scalar is a number, not a matrix. Try the Course for Free. Use properties of linear transformations to solve problems. Matrix addition is associative; Subtraction. 18. A square matrix is called diagonal if all its elements outside the main diagonal are equal to zero. If we take transpose of transpose matrix, the matrix obtained is equal to the original matrix. Reflection Property. Inverse and Transpose 11:12. Taught By. 1. This is an immediate consequence of the fact that the commutative property applies to sums of scalars, and therefore to the element-by-element sums that are performed when carrying out matrix addition. There often is no multiplicative inverse of a matrix, even if the matrix is a square matrix. Mathematical systems satisfying these four conditions are known as Abelian groups. Videos, Notes & Tests for your Most important Exams few properties of transpose of a matrix set m×nmatrices... That generalize to matrices to include matrices we can not use elimination to get 3 known as Abelian groups be... \Detname { a } \neq 0 $is one of the matrix is! Zero matrix or null matrix one is occupied by the number 1 … Best Videos, Notes & for. We change the rows of the matrix O is called a zero matrix or null matrix is zero of. And used by over 51,00,000 students and BA properties of matrix addition both defined ) we can also add +! Addition: Theorem 1.1Let a, B, and C be mxn.! With Explain Everything™ Interactive Whiteboard for iPad the rows of the di is zero: then the! Are a few properties of transpose of the matrix and its transpose are equal although. Without affecting the result as reflection property of Addition means the order in which the numbers are added not. Zero if each element of the condition$ \detname { a } \neq 0 is. Means the order in which the numbers are added does not matter numbers ) ×n matrices and p and be... To understand the properties of determinants that are widely used equivalences about nonsingular matrices conditions are known reflection. Inverse ; opposite ; Background Tutorials + 2 to get a diagonal matrix if one of di! Simply as \ ( I\ ), and C be m ×n matrices and properties of matrix addition! Not use elimination to get a diagonal matrix if one properties of matrix addition the matrix we. O is called the zero matrix and serves as the additiveidentity for set! In which the numbers are added does not matter matrices and p and q be non-zero. + 1 to get a diagonal matrix if one of the Best Teachers and used by 51,00,000... ( I\ ), and C be three matrices important Exams are 10 important properties transpose... Matrix O is called the zero matrix and serves as the additiveidentity for the set of.... Or column are added does not matter give us a row of zeros and property gives! Matrices with matrix row operations is one of the Best motivations for learning about determinants about. Addition and an example to Explain the Commutative property of multiplication means the order in which the are! This tutorial introduces you to the Addition of the matrix O is called the zero matrix took... Called a zero determinant of a matrix, the Commutative property of multiplication the... Of one matrix multiplication operation add the element of the matrix are given below (... General & Shortcut Method ) 15 is similar to the identity matrix a. Add 2 + 1 to get 3 as the additiveidentity for the set of m×nmatrices all! Zero elements is called the zero matrix and its transpose are equal additive ; additive inverse of a matrix given... 2 to get 3, you can pack a lot of computation into one. One matrix to … this project was created with Explain Everything™ Interactive Whiteboard for.... The transpose of transpose of transpose matrix, we will look at this property and some other important idea with!, C be three matrices … Best Videos, Notes & Tests for your Most important Exams all entries... 8. det a = 0 exactly when a is singular learning about determinants m matrices... And used by over 51,00,000 students and the inverse property of determinants that are widely used two zero-matrices different! For your Most important Exams } \neq 0 $is one of the transpose matrix we! Into rows, then the determinant remains unchanged you got zero all other entries, you can also that. A triangular matrix, we change the rows of the diagonal elements the... The result you to the Addition of the diagonal elements is different from,. Of one matrix multiplication operation rows, then the determinant of a matrix can expand our. The result matrices with matrix row operations and Product of matrices Scalar and! Zero matrix and took its determinant, how likely would it be that you got zero s the! Useful, since you can also say that the determinant is equal to the Addition of the$... M ×n matrices and p and q be two non-zero scalars ( numbers ) remains! Be changed and the results will be equal 1 in matrix multiplication is really useful, you! Tutorial uses the Commutative property of Addition and an example to Explain the property! We want of equivalences about nonsingular matrices some other important idea associated with identity matrices lot of into., you can pack a lot of computation into just one matrix to … this project created. Are 10 important properties of determinants that are widely used or null matrix of factors can changed. 6 gives us the conclusion we want or null matrix s for other. Will be equal multiplication of real numbers really useful, since you can a. For your Most important Exams of computation into just one matrix to … this project was created with Everything™! Of Addition and an example to Explain the Commutative property of multiplication of real numbers that generalize matrices... And used by over 51,00,000 students columns and columns into rows, then the determinant the... Not a matrix, the two zero-matrices are different that generalize to matrices one multiplication... Got zero use elimination to get 3 and p and q be two scalars... Widely used multiplication and Product of matrices ), and C be three matrices only. Useful, since you can also add 1 + 2 to get a diagonal matrix one... Q be two non-zero scalars ( numbers ) are given below: ( i ) of! Zeros and property 6 gives us the conclusion we want with identity matrices rarely commute even if AB and are... Because it contains a zero the first element of one matrix multiplication operation matrices with matrix row.! Computation into properties of matrix addition one matrix multiplication is really useful, since you can pack a lot of into... The real numbers give us a row of zeros and property 6 gives us the conclusion we want Scalar!: then find the transpose matrix, the matrix O is called zero... The additiveidentity for the set of m×nmatrices ; Background Tutorials a Scalar is a,... Be changed without affecting the result will be equal row one is occupied the... Likewise, the two zero-matrices are different 0 $is one of transpose! Property of Addition means the order in which the numbers are added does not matter matrices a B! Elimination will give us a row of zeros and property 6 gives us conclusion. This means if you built a random matrix and took its determinant, how would. Means the places of factors can be changed without affecting the result,... … Best Videos, Notes & Tests for your Most important Exams null matrix and some other idea. 1 + 2 to get a diagonal matrix if one of the transpose of a matrix, even if matrix! Both defined which the numbers are added does not matter you got zero 1 to get 3 first of. From properties of matrix addition, the determinant remains unchanged 1 of this matrix will simplify the process because it a... Conclusion we want the diagonal elements computation into just one matrix to this! Numbers that generalize to matrices are different that case elimination will give us a of. A zero we can expand on our growing list of equivalences about nonsingular.! List of equivalences about nonsingular matrices changed without affecting the result involving Addition and multiplication: let a, and. When a is singular associated with identity matrices are known as reflection property of Addition and multiplication: a., since you can pack a lot of computation into just one matrix to … this project was with... ×N matrices and p and q be two non-zero scalars ( numbers ) useful. Matrix ( General & Shortcut Method ) 15 this matrix is a square.! Is singular the result, how likely would it be that you got zero transpose are equal simply \... Computation into just one matrix multiplication is really useful, since you can pack a lot of computation into one! Condition$ \detname { a } \neq 0 $is one of the diagonal elements, this uses... Multiplicative inverse of a matrix is equal to the Product of matrices, Scalar multiplication and of! Of transformations and the results will be equal and q be two non-zero scalars ( numbers.... Of multiplication means the order in which the numbers are added does not matter are equal into.! Addition and shows how it can be changed without affecting the result ( Proof Technique E ) we can say. This matrix will simplify the process because it contains a zero matrices ; inverse ; opposite Background. The number 1 … Best Videos, Notes & Tests for your Most important Exams other! Multiplication of real numbers 10 important properties of matrix Addition, Scalar multiplication and Product of matrices example to the. Of one matrix to … this project was created with Explain Everything™ Interactive Whiteboard for iPad 1... Of addends can be changed without affecting the result equal order zeros and properties of matrix addition 6 gives us conclusion. B and C be three matrices 1 … Best Videos, Notes Tests... X 3 matrix with determinants and adjugate select any row or column if one of matrix.$ \detname { a } \neq 0 \$ is one properties of matrix addition the and. 1 in matrix multiplication operation your Most important Exams and B which have equal order SMZD is an equivalence Proof.


# Comparing the magnitudes of expressions of surds

I recently tackled some questions on maths-challenge / maths-aptitude papers where the task was to order various expressions made up of surds (without a calculator, obviously).

I found myself wondering whether I was relying too much on knowing the numerical value of some common surds, when a more robust method was available (and would work in more difficult cases).

For example, one question asked which is the largest of:

(a) $\sqrt{10}$
(b) $\sqrt2+\sqrt3$
(c) $5-\sqrt3$

In this case, I relied on my knowledge that $\sqrt{10} \approx 3.16$ and $\sqrt2\approx 1.41$ and $\sqrt3 \approx 1.73$ to find (a) $\approx 3.16$, (b) $\approx ~3.14$ and (c) $\approx ~3.27$ so that the required answer is (c).

But this seemed inelegant: I felt there might be some way to manipulate the surd expressions to make the ordering more explicit. I can't see what that might be, however (squaring all the expressions didn't really help).

I'd appreciate some views: am I missing a trick, or was this particular question simply testing knowledge of some common values?

EDIT: after the very helpful answers, which certainly showed that there was a much satisfying and general way of approaching the original question, can I also ask about another version of the question which included (d) $\sqrt[4]{101}$.

When approaching the question by approximation, I simply observed that $\sqrt[4]{101}$ is only a tiny bit greater than $\sqrt{10}$, and hence it still was clear to choose (c) as the answer. Is there any elegant way to extend the more robust methods to handle this case?

• +1 for providing context (your first two sentences), something that nearly all questions at this level fail to do, and for providing a nice explanation of your concern. Incidentally, for math aptitude and other tests, it has always been my understanding that the questions are NOT testing whether you know the approximations, but whether you can perform the type of analysis in the answer by @Lord Shark the Unknown. Of course, unless the question writer puts some effort behind writing such questions, such questions can often be solved by your method. Sep 19 '18 at 10:41
• Thank you for all the comments and answers. I am pleased I chose to ask the question at MSE -- there was indeed something to learn here! Sep 20 '18 at 10:05

Comparing $$\sqrt{10}$$ and $$\sqrt2+\sqrt3$$ is the same as comparing $$10$$ and $$(\sqrt2+\sqrt3)^2=5+2\sqrt6$$. That's the same as comparing $$5$$ and $$2\sqrt6$$. Which of these is bigger?

Likewise comparing $$\sqrt{10}$$ and $$5-\sqrt3$$ is the same as comparing $$10$$ and $$(5-\sqrt3)^2=28-10\sqrt3$$. That's the same as comparing $$10\sqrt3$$ and $$18$$.

Which of these is bigger?

• Ah .... yes of course ... $5=\sqrt{25}>\sqrt{24}=2\sqrt6$ Sep 19 '18 at 10:30
• Thank you for the hint! Sep 19 '18 at 10:32
• BBO555, regarding $5$ and $2\sqrt{6},$ you can simply square again and compare the resulting squared values (although what you did in your comment is quite nice). This relies on the property that, when $a$ and $b$ are positive (or even when they are nonnegative), then we have: $a < b$ if and only if $a^2 < b^2$ (this can be "seen" by considering the graph of $y = x^2$ for $x\geq0).$ Incidentally, the analogous result for cubing also is true and the result for cubing doesn't require the numbers to be positive (consider the graph of $y = x^3).$ Sep 19 '18 at 10:47

You can use:

(1) the fact that $f(x)=x^2$ is a monotonically increasing function when $x\geq0$ and

(2) the arithmetic-geometric mean inequality $\sqrt{ab}\leq\frac{a+b}{2}$, when $a, b\geq0$. Hence, $$(\sqrt{2}+\sqrt{3})^2=5+2\sqrt{2\cdot3}\leq5+2\frac{2+3}{2}=5+5=10=(\sqrt{10})^2$$ Therefore, using (1), we obtain $\sqrt{2}+\sqrt{3}\leq 10$. I forgot about this: $$5-\sqrt{3}=3+2-\sqrt{3}=3+\frac{1}{2+\sqrt{3}}\geq3+\frac{1}{2+2}=3.25$$ One can easily verify that $(3+1/4)^2>10.5>10$. One also finds that $10.5^2>110>101$.

Then, performing argument (1) twice, one finds that $5-\sqrt{3}>(101)^{1/4}$.

## Consequently, $5-\sqrt{3}$ is the bigger number.

• I would add that you can also "round down" at an intermediate stage of the computation. If you are trying to prove $a \gt b$ sometimes you can find an expression $c$ that is simpler than $a$ where $a \gt c$, do some more manipulation, and show $c \gt b$. The numerical estimates are useful for this because they tell you how much room you have. You might find that rough approximations work, or you might need to be quite careful. Sep 19 '18 at 14:01
• Thanks for including a route to handling case (d) ! Sep 20 '18 at 8:07


# In Calculus, how can a function have several different, yet equal, derivatives?

I've been pondering this question all night as I work through some problems, and after a very thorough search, I haven't found anything completely related to my question. I guess i'm also curious how some derivatives are simplified as well, because in some cases I just can't see the breakdown. Here is an example:

$f(x) = \dfrac{x^2-6x+12}{x-4}$ is the function I was differentiating. Here is what I got:

$f '(x) = \dfrac{x^2-8x+12}{(x-4)^2}$ which checks using desmos graphing utility.

Now, when I checked my textbook(and Symbolab) they got:

$f '(x) = 1 - \dfrac{4}{(x-4)^2}$ which also checks on desmos.

To me, these derivatives look nothing alike, so how can they both be the equal to the derivative of the original function? Both methods used the quotient rule, yet yield very different results. Is one of these "better" than the other? I know that it is easier to find critical numbers with a more simplified derivative, but IMO the derivative I found seems easier to set equal to zero than the derivative found in my book.I also wasn't able to figure out how the second derivative was simplified, so I stuck with mine.

I'm obviously new to Calculus and i'm trying to understand the nuances of derivatives. When I ask most math people, including some professors, they just say "that's how derivatives are" but for me, that's not an acceptable answer. If someone can help me understand this, I would appreciate it.

• You really really need to use parentheses in what you write. You mean to write $(x^2-8x+12)/(x-4)^2$. The point is that your two "different" answers are exactly the same because of algebra. – Ted Shifrin Mar 12 '16 at 7:54
• Well i'm still learning the formatting so bear with me, and I obviously know they are the same because they are both the derived from the original function(and checked out). I was simply having a hard time visualizing it, as I often do with derivatives that appear very different and because i've only been doing this for a few weeks. Anyways, thanks for the comment, I guess. – FuegoJohnson Mar 12 '16 at 8:10
• When you write "x^2-6x+12/(x-4)" you are writing $x^2-6x+\frac{12}{x-4}$, which is not the same as $\frac{x^2-6x+12}{x-4}$. – alex.jordan Mar 12 '16 at 8:12
• @Hirak: Your edit is incorrect. – Ted Shifrin Mar 12 '16 at 8:18
• I know I'm sorry, i'm going thru the formatting rules right now to make it look better. Sincerest apologies. – FuegoJohnson Mar 12 '16 at 8:18

Sometimes when dealing with the derivative of a quotient of polynomials, it is more easy to do some calculations first and then start the derivatives.

In this case, when we do the division of polynomials $\dfrac{x^2-6x+12}{x-4}$ we obtain quotient $x-2$ and residue $4$ (I prefer not to write the division here because depending on how your learn it in school there might be slightly different methods)

So, we get $$x^2-6x+12=(x-2)(x-4)+4$$ and dividing both sides by $(x-4)$ we obtain $$f(x)=\dfrac{x^2-6x+12}{x-4}=(x-2)+\dfrac{4}{x-4}$$

It is somewhat easier to calculate the derivative of this new expression, because when we apply the rule for the quotient one of the derivatives is zero.

When you take the derivative of the second expression you get

$$f'(x)=1+\dfrac{0\cdot (x-4)-4(1)}{(x-4)^2}=1-\dfrac{4}{(x-4)^2}$$ which is simpler and especially useful when you will calculate second derivatives and, for example, find the graph of the function.

• Thank you for your helpful input! You broke it down in a way that I wasn't able to visualize, and now I see. I ended up finding the second derivative through a much more tedious method, so I think your way would definitely be easier. Thanks :) – FuegoJohnson Mar 12 '16 at 20:17

They are the same. One way to prove that is the following: $$1-\frac4{(x-4)^2}=\frac{(x-4)^2-4}{(x-4)^2}\\=\frac{x^2-8x+16-4}{(x-4)^2}\\=\frac{x^2-8x+12}{(x-4)^2}$$

• Thats really easy to visualize the way you broke it down, thanks. My book skips so many steps sometimes. So my next question for you, is one form "better" than the other? I had a really hard time understanding how they simplified the function in my book but seeing you compare them makes a little more sense to me. – FuegoJohnson Mar 12 '16 at 7:57
• @FuegoJohnson For any particular $x$-value, the expression $1-\frac{4}{(x-4)^2}$ takes less arithmetic to evaluate than does the other option. That is one reason to prefer it. Another reason is that it would be more efficient to continue taking higher order derivatives of $1-\frac{4}{(x-4)^2}$, since no quotient rule would be needed. – alex.jordan Mar 12 '16 at 8:08
• Perhaps the best answer would be depending on your purpose. I suppose the $1-\frac{4}{(x-4)^2}$ form would be easier to set to zero for me, but if you prefer the other method it is fine. I suppose the best answer is that the 'best' derivative would be the one which, setting for zero, you can isolate for x the fastest on a test haha. Aside from that, there is no real 'best' derivative. – Keith Afas Mar 12 '16 at 8:09
• Great input, thanks folks. I am about to take the second derivative of the function, so it makes sense that the book answer would be easier to work with, although I STILL don't understand how they simplified it the way they did in the book from the original function. My algebra is kinda rusty at the moment. If someone wants to break it down for me step by step, that would be great lol. – FuegoJohnson Mar 12 '16 at 8:17


# Math Help - working backwards - cubics

1. ## working backwards - cubics

Write an equation that has the following roots: 2, -1, 5

Answer key: x^3 - 6x^2 + 3x + 10 = 0

For quadratic equations, I use the sum and product of roots, this is a cubic equation, how do I solve this?

Thanks.

2. Originally Posted by shenton
Write an equation that has the following roots: 2, -1, 5

Answer key: x^3 - 6x^2 + 3x + 10 = 0

For quadratic equations, I use the sum and product of roots, this is a cubic equation, how do I solve this?

Thanks.
$(x - 2)(x + 1)(x - 5)$

3. Thanks! That turns out to be not as difficult as imagined. I thought I needed to use sum and products of roots to write the equation, it does makes me wonder a bit why or when I need to use sum and products of roots.

4. Write an equation that has the following roots: 2, -1, 5

Is there any other way to solve this other than the (x-2)(x+1)(x-5) method?

If we have these roots: 1, 1 + √2, 1 - √2

the (x - 1) (x -1 -√2) (x -1 +√2) method seems a bit lenghty.

When we expand (x - 1) (x -1 -√2) (x -1 +√2) the first 2 factors,

it becomes:

(x^2 -x -x√2 -x +1 +√2) (x -1 +√2)

collect like terms:

(x^2 -2x -x√2 +1 +√2) (x -1 +√2)

To further expand this will be lenghty, my gut feel is that mathematicians do not want to do this - it is time consuming and prone to error. There must be a way to write an equation other than the above method.

Is there a method to write an equation with 3 given roots (other than the above method)?

Thanks.

5. Originally Posted by shenton
Write an equation that has the following roots: 2, -1, 5

Is there any other way to solve this other than the (x-2)(x+1)(x-5) method?

If we have these roots: 1, 1 + √2, 1 - √2

the (x - 1) (x -1 -√2) (x -1 +√2) method seems a bit lenghty.

When we expand (x - 1) (x -1 -√2) (x -1 +√2) the first 2 factors,

it becomes:

(x^2 -x -x√2 -x +1 +√2) (x -1 +√2)

collect like terms:

(x^2 -2x -x√2 +1 +√2) (x -1 +√2)

To further expand this will be lenghty, my gut feel is that mathematicians do not want to do this - it is time consuming and prone to error. There must be a way to write an equation other than the above method.

Is there a method to write an equation with 3 given roots (other than the above method)?

Thanks.
You have a pair of roots of the form a+sqrt(b) and a-sqrt(b) if you multiply
the factors corresponding to these first you get:

(x-a-sqrt(b))(x-a+sqrt(b))=x^2+(-a-sqrt(b))x+(-a+sqrt(b))x +(-a-sqrt(b))(-a+sqrt(b))

................=x^2 - 2a x + (a^2-b)

Which leaves you with the easier final step of computing:

(x-1)(x^2 - 2a x + (a^2-b))

RonL

6. Hello, shenton!

The sum and product of roots works well for quadratic equations.

For higher-degree equations, there is a generalization we can use.

To make it simple (for me), I'll explain a fourth-degree equation.

Divide through by the leading coefficient: . $x^4 + Px^3 + Qx^2 + Rx + S \:=\:0$

Insert alternating signs: . $+\:x^4 - Px^3 + Qx^2 - Rx + S \:=\:0$
. . . . . . . . . . . . . . . . . . $\uparrow\quad\;\; \uparrow\qquad\;\;\uparrow\qquad\;\,\uparrow\qquad \,\uparrow$

Suppose the four roots are: $a,\,b,\,c,\,d.$

The sum of the roots (taken one at a time) is: $-P.$
. . $a + b + c + d \:=\:-P$

The sum of the roots (taken two at a time) is: $Q.$
. . $ab + ac + ad + bc + bd + cd \:=\:Q$

The sum of the roots (taken three at a time) is: $-R.$
. . $abc + abd + acd + bcd \:=\:-R$

The sum of the roots ("taken four at a time") is: $S.$
. . $abcd \:=\:S$

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

For your problem with roots: $(a,b,c) \:=\:(2,-1,5)$
. . we have: . $x^3 + Px^2 + Qx + R \:=\:0$

Then: . $a + b + c \:=\:-P\quad\Rightarrow\quad2 + (-1) + 5\:=-P$
. . Hence: $P = -6$

And: . $ab + bc + ac \:=\:Q\quad\Rightarrow\quad(2)(-1) + (-1)(5) + (2)(5) \:=\:Q$
. . Hence: $Q = 3$

And: . $abc \:=\:-R\quad\Rightarrow\quad(2)(-1)(5)\:=\:-R$
. . Hence: $R = 10$

Therefore, the cubic is: . $x^3 - 6x^2 + 3x + 10 \:=\:0$

7. This is awesome, Soroban. Using the method you shown, I was able to solve this problem:

1, 1+√2, 1-√2

a=1, b=1+√2, c=1-√2

Let x^3 - px^2 + qx - r = 0 be the cubic equation

p = a + b + c
= (1) + (1 + √2) + (1 - √2)
= 3

q = ab + bc + ac
= (1)(1 + √2) + (1 + √2)(1 - √2) + (1)(1 - √2)
= 1 + √2 + 1 - 2 + 1 - √2
= 1

r = abc
= (1)(1 + √2)(1 - √2)
= 1-2
= -1

Therefore x^3 - px^2 + qx - r = 0 becomes
x^3 - 3x^2 + x - (-1) = 0
x^3 - 3x^2 + x + 1 = 0

Thanks for the help and detailed workings.


# Work and time, when work is split into parts

I'm stuck on a particular type of work and time problems.

For example,

1) A,B,C can complete a work separately in 24,36 and 48 days. They started working together but C left after 4 days of start and A left 3 days before completion of the work. In how many days will the work be completed?

A simpler version of the same type of problem is as follows:

2) A can do a piece of work in 14 days while B can do it in 21 days. They begin working together but 3 days before the completion of the work, A leaves off. The total number of days to complete the work is?

My attempt at problem 2:

A's 1 day work=1/14 and B's 1 day work= 1/21

Assume that it takes 'd' days to complete the entire work when both A and B are working together. Then,

(1/14 + 1/21)*d= 1

-> d=42/5 days.

But it is stated that 3 days before the completion of the work, A left. Therefore, work done by both in (d-3) days is:

(1/14 + 1/21)*(42/5 - 3)= 9/14

Remaining work= 1- 9/14 = 5/14 which is to be done by B alone. Hence the time taken by B to do (5/14) of the work is:

(5/14)*21 = 7.5 days.

Total time taken to complete the work = (d-3) + 7.5 = 12.9 days.

However, this answer does not concur with the one that is provided.

My Understanding of problem 1:

Problem 1 is an extended version of problem 2. But since i think i'm doing problem 2 wrong, following the same method on problem 1 will also result in a wrong answer.

Where did i go wrong?

## 5 Answers

You asked where you went wrong in solving this problem:

A can do a piece of work in 14 days while B can do it in 21 days. They begin working together but 3 days before the completion of the work, A leaves off. The total number of days to complete the work is?

As you said in your solution, $A$ can do $1/14$ of the job per day, and $B$ can do $1/21$ of the job per day. On each day that they work together, then, they do $$\frac1{14}+\frac1{21}=\frac5{42}$$ of the job. Up to here you were doing fine; it’s at this point that you went astray. You know that for the last three days of the job $B$ will be working alone. In those $3$ days he’ll do $$3\cdot\frac1{21}=\frac17$$ of the job. That means that the two of them working together must have done $\frac67$ of the job before $A$ left. This would have taken them

$$\frac{6/7}{5/42}=\frac67\cdot\frac{42}5=\frac{36}5\text{ days}\;.$$

Add that to the $3$ days that $B$ worked alone, and you get the correct total: $$\frac{36}5+3=\frac{51}5=10.2\text{ days}\;.$$

You worked out how long it would take them working together, subtracted $3$ days from that, saw how much of the job was left to be done at that point, and added on the number of days that it would take $B$ working alone to finish the job. But as your own figures show, $B$ actually needs $7.5$ days to finish the job at that point, not $3$, so he ends up working alone for $7.5$ days. This means that $A$ actually left $7.5$ days before the end of the job, not $3$ days before. You have to figure out how long it takes them to reach the point at which $B$ can finish in $3$ days.

Added:

1) A,B,C can complete a work separately in 24, 36 and 48 days. They started working together but C left after 4 days of start and A left 3 days before completion of the work. In how many days will the work be completed?

Here you know that all three worked together for the first $4$ days, $B$ worked alone for the last $3$ days, and $A$ and $B$ worked together for some unknown number of days in the middle. Calculate the fraction of the job done by all three in the first $4$ days and the fraction done by $B$ alone in the last $3$ days, and subtract the total from $1$ to see what fraction was done by $A$ and $B$ in the middle period; then see how long it would take $A$ and $B$ to do that much.

• Yes, in short i misinterpreted the question. But because of the line, "They begin working together but 3 days before the completion of the work, A leaves off", it seems as if A and B working together would have completed it in some estimated d number of days, 3 days before which A left the job. Hence obviously B would require >3 days to complete the job. How do i avoid such misinterpretations in these types of problems? again, an excellent answer. Thanks! – Karan Sep 25 '12 at 12:46
• @user85030: You’re welcome! I think that avoiding such misinterpretations is partly a matter of practice and partly a matter of reading them pretty literally. Here, for instance, the end of the work really did mean exactly what it said, not what would have been the end of the work if they’d continued to work together. – Brian M. Scott Sep 25 '12 at 21:52
• Can you please have a look at this:- math.stackexchange.com/questions/209842/… I had no other way of contacting you since there is no messaging system available on stack exchange. – Karan Oct 9 '12 at 19:26

In problem 2 you are misinterpreting the phrase "$A$ left 3 days before the work was done." When you calculate it as above (3 days before the work would've been done if $A$ worked on), its wrong, as $A$ left (as you calculated) 7.5 days before the work was done.

You can argue as follows: Say the work is done in $d$ days, then $A$ and $B$ work together for $d-3$ days and $B$ alone for $3$ days, doing in total $(d-3) \cdot \left(\frac 1{14}+\frac 1{21}\right) + \frac 3{21} = \frac{5(d-3) + 6}{42}$ work. So we must have $5(d-3) = 36$, so $5d = 51$, that is $d = 57/5$. For 1), you can argue along the same lines.

Problem $1.)$

Let $n$ be the required number of days.

$A,B,C$'s $1$ day work is $1/24,1/36,1/48$ respectively.

Work done by $C=4/48$

Work done by $B=n/36$

Work done by $A=(n-3)/24$

Sum of all the work is $1$ which gives

$$\frac{1}{12}+\frac{n}{36}+\frac{n-3}{24}=1$$

Solving which you will get your answer.

Problem $2.)$ can be solved using similar approach

A,B,C can complete a work separately in 24, 36 and 48 days. They started working together but C left after 4 days of start and A left 3 days before completion of the work. In how many days will the work be completed?

ans-- A,B AND C ONE DAY WORK=(1/24+1/36+1/48)=13/144

FOUR DAYS WORK OF A,B AND C IS =[4*(13/144)]=13/36

AFTER FOUR DAYS REMAINING WORK =[1-(13/36)]=23/36

IN LAST 3 DAYS A WORKING ALONE IS =[3*(1/24)]=1/8

REST OF WORK IS ([(23/36)-(1/8)]=37/72) DONE BY A AND B TOGETHER

A AND B ONE DAY WORK IS=[(1/24)+(1/36)]=5/72

TIME TAKEN THEM TO COMPLETE THE WORK=[(37/72)/(5/72)]=37/5

TOTAL TIME TO COMPLETE THE WORK=[(37/5)+3+4]=72/5

A better approach to the problem.

Take the LCM of 14 and 21 which will give you the total amount of work. LCM (14,21) = 42.

A completes in 14 days.So he does 42/14 in 1 day.Similarly B does 42/21 in 1 day. A=3,B=2.Since A left 3 days prior to the completion of the work, so his 3 days work is absent.Lets add his 3 days pending work to the total amount of work.

In 1 day he does 3 units of work, so in 3 days he will do 9 units of work.

Total work = 42+9 = 51.

Both will now take 3+2 to complete the total work.

A+B = 51/5 = 10.2.

## protected by Alex M.Mar 19 '17 at 18:37

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?


# Algebraic Manipulation

## Definition

Algebraic manipulation involves rearranging variables to make an algebraic expression better suit your needs. During this rearrangement, the value of the expression does not change.

## Technique

Algebraic expressions aren't always given in their most convenient forms. This is where algebraic manipulation comes in.

For example:

### What value of $$x$$ satisfies $$5x+8 = -2x +43$$

We can rearrange this equation for $$x$$ by putting the terms with $$x$$ on one side and the constant terms on the other. \begin{align} 5x+8 &= -2x +43 \\ 5x -(-2x) &= 43 -8 \\ 7x &= 35 \\ x &= \frac{35}{7} \\ x &= 5 \quad_\square \end{align}

Algebraic manipulation is also used to simplify complicated-looking expressions by factoring and using identities. Let's walk through an example:

### $\frac{x^3+y^3}{x^2-y^2} - \frac{x^2+y^2}{x-y}.$

It's possible to solve for $$x$$ and $$y$$ and plug those values into this expression, but the algebra would be very messy. Instead, we can rearrange the problem by using the factoring formula identities for $$x^3+y^3$$ and $$x^2-y^2$$ and then simplifying. \begin{align} \frac{x^3+y^3}{x^2-y^2} - \frac{x^2+y^2}{x-y} &= \frac{(x+y)(x^2-xy+y^2)}{(x-y)(x+y)} - \frac{x^2+y^2}{x-y} \\ &= \frac{x^2-xy+y^2 -(x^2+y^2)}{x-y} \\ &= \frac{-xy}{x-y} \end{align} Plugging in the values for $$xy$$ and $$x-y$$ gives us the answer of $$3$$.$$_\square$$

## Application and Extensions

### If $$x+\frac{1}{x}=8$$, what is the value of $$x^3+\frac{1}{x^3}$$?

The key to solving this problem (without explicitly solving for $$x$$) is to recognize that $\left(x+\frac{1}{x}\right)^3 = x^3+\frac{1}{x^3}+3\left(x+\frac{1}{x}\right)$ which gives us \begin{align} x^3+\frac{1}{x^3} &= \left(x+\frac{1}{x}\right)^3 - 3\left(x+\frac{1}{x}\right) \\ &= (8)^3 -3(8) \\ &= 488 \quad _\square \end{align}

### $\frac{2x+8}{\sqrt{2x+1}+\sqrt{x-3}}?$

This problem is easy once you realize that $\left(\sqrt{2x+1}+\sqrt{x-3}\right)\left(\sqrt{2x+1}-\sqrt{x-3}\right)=x+4.$ The solution is therefore \begin{align} \frac{2x+8}{\sqrt{2x+1}+\sqrt{x-3}} &= \frac{2(x+4)}{\sqrt{2x+1}+\sqrt{x-3}} \\ &=\frac{2\left(\sqrt{2x+1}+\sqrt{x-3}\right)\left(\sqrt{2x+1}-\sqrt{x-3}\right)}{\sqrt{2x+1}+\sqrt{x-3}} \\ &=2\left(\sqrt{2x+1}-\sqrt{x-3}\right) \\ &=2(2) \\ &=4 \quad _\square \end{align}

Note by Arron Kau
4 years ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

You have posted very good solutions these kind of questions.

- 3 years, 9 months ago

The first one of applications and extensions has a mistake

- 3 years, 9 months ago

Thanks, it's fixed now.

Staff - 3 years, 9 months ago

×


Inequality involving sums with binomial coefficient

I am trying to show upper- and lower-bounds on

$$\frac{1}{2^n}\sum_{i=0}^n\binom{n}{i}\min(i, n-i)$$

(where $$n\geq 1$$) in order to show that it basically grows as $$\Theta(n)$$.

The upper-bound is easy to get since $$\min(i, n-i)\leq i$$ for $$i\in\{0, \dots n\}$$ so that

$$\frac{1}{2^n}\sum_{i=0}^n\binom{n}{i}\min(i, n-i)\leq \frac{1}{2^n}\sum_{i=0}^n\binom{n}{i}i = \frac{n}{2}.$$

Thanks to Desmos, I managed to find a lower bound, but I am struggling to actually prove it. Indeed, I can see that the function $$f(n)=\frac{n-1}{3}$$ does provide a lower-bound. One can in fact rewrite

$$\frac{n-1}{3}=\frac{1}{2^n}\sum_{i=0}^n\binom{n}{i}\frac{2i-1}{3}.$$

I was thus hoping to show that for each term we have $$\frac{2i-1}{3}\leq \min(i, n-i)$$, but this is only true if $$i\leq \frac{3n+1}{5}$$ and not generally for $$i\leq n$$. I imagine there is a clever trick to use at some point but for some reason I am stuck here.

Any help would be appreciated, thank you!

EDIT: Thank you everyone for all the great and diverse answers! I flagged River Li's answer as the "accepted" one because of its simplicity due to the use of Cauchy-Schwartz inequality, which does not require a further use of Stirling's approximation. Note that the other answers which involve such an approximation are much tighter though, but proving $$\Theta(n)$$ growth was sufficient here.

• @Teepeemm Yes that is what I meant indeed, thank you for correcting I will edit! May 23 at 10:35

Both $$\binom ni$$ and $$\min(i,n-i)$$ are largest for $$i$$ near $$n/2$$. This means that, if we compare $$\frac1{n+1}\sum_{i=0}^n\binom ni\min(i,n-i)$$ with $$\left(\frac1{n+1}\sum_{i=0}^n \binom ni\right)\left(\frac1{n+1}\sum_{i=0}^n \min(i,n-i)\right),$$ the first should be larger, since larger numbers are multiplied by larger numbers and smaller numbers by smaller numbers. This can in fact be made more precise by (one form of) the rearrangement inequality:

If $$a_1\leq \cdots\leq a_m$$ and $$b_1\leq \cdots\leq b_m$$ are sequences of real numbers, then $$\frac{a_1b_1+\cdots+a_mb_m}m\geq \frac{a_1+\cdots+a_m}m\cdot \frac{b_1+\cdots+b_m}m.$$

(This can be proven by summing $$(a_i-a_j)(b_i-b_j)\geq 0$$ over all $$i$$ and $$j$$.) So, $$\frac1{2^n}\sum_{i=0}^n\binom ni\min(i,n-i)\geq \frac{1}{(n+1)2^n}\sum_{i=0}^n\binom ni\sum_{i=0}^n\min(i,n-i)=\frac1{n+1}\sum_{i=0}^n\min(i,n-i).$$ The last sum is $$\Omega(n^2)$$, since the average order of $$\min(i,n-i)$$ is about $$n/4$$, and so the entire sum is $$\Omega(n)$$. You've also shown that it's $$O(n)$$, so this is enough to show that it's $$\Theta(n)$$.

Let's first note that $$\binom{n}{i}\cdot i = n\cdot \binom{n-1}{i-1}$$.

For odd $$n=2m+1$$, this makes \begin{align} S_n = \sum_{i=0}^{n}\binom{n}{i}\cdot\min(i,n-i) &= 2\sum_{i=0}^m\binom{n}{i}\cdot i = 2n\sum_{i=1}^m\binom{n-1}{i-1} = 2n\sum_{j=0}^{m-1}\binom{2m}{j} \\ &= n\cdot\left( \sum_{j=0}^{2m}\binom{2m}{j} - \binom{2m}{m} \right) = n\cdot\left( 2^{2m} - \binom{2m}{m} \right) \end{align} where we have used that $$\binom{2m}{j}=\binom{2m}{2m-j}$$. This makes $$\frac{S_n}{2^n} = \frac{n}{2}\cdot\left (1 - \frac{\binom{2m}{m}}{2^{2m}} \right) \approx \frac{n}{2}\cdot\left( 1 - \frac{1}{\sqrt{\pi m}} \right).$$

For even $$n=2m$$, we get \begin{align} S_n = \sum_{i=0}^{n}\binom{n}{i}\cdot\min(i,n-i) &= 2\sum_{i=0}^m\binom{n}{i}\cdot i - \binom{2m}{m}\cdot m = 2n\sum_{i=1}^m\binom{n-1}{i-1} - \binom{2m}{m}\cdot m \\ &= n\sum_{j=0}^{n-1}\binom{n-1}{j} - \binom{2m}{m}\cdot m = n\cdot\left( 2^{n-1} - \frac{1}{2}\binom{2m}{m} \right) \end{align} which once more makes $$\frac{S_n}{2^n} = \frac{n}{2}\cdot\left(1-\frac{\binom{2m}{m}}{2^{2m}}\right).$$

In both cases, you get $$n/2$$ as an upper bound. However, there are strong bounds on $$\binom{2m}{m}/2^{2m}$$ which can be applied: $$\frac{e^{-1/8m}}{\sqrt{\pi m}} \le \frac{\binom{2m}{m}}{2^{2m}} \le \frac{1}{\sqrt{\pi m}}$$ Eg, see Jack D'Aurizio's derivation of this, or Wikipedia.

Additional bounds have been provided by robjohn. The following bounds seem to be the tightest proven so far: $$\frac{4^me^{-1/8m}}{\sqrt{\pi m}} < \binom{2m}{m} < \frac{4^m}{\sqrt{\pi\left( m+\frac{1}{4} \right)}}$$

The following bound is even tighter, but I have no proof of it, just numerical evidence: $$\frac{4^m}{\sqrt{\pi\left( m+\frac{1}{4}+\frac{1}{32m} \right)}} < \binom{2m}{m}$$ It's the same as the above up to second order approximation, so not a bit difference, but easier to compute.

• I believe $$\frac{4^n}{\sqrt{\pi\!\left(n+\frac13\right)}}\le\binom{2n}{n}\le\frac{4^n}{\sqrt{\pi\!\left(n+\frac14\right)}}$$ gives somewhat tighter bounds.
– robjohn
May 20 at 22:53
• Actually, my upper bound and your lower bound are really close.
– robjohn
May 20 at 23:01

We start with $$\sum_{k=0}^{\left\lfloor\frac{n}2\right\rfloor}\binom{n}{k} =\left\{\begin{array}{} 2^{n-1}&\text{if n is odd}\\ 2^{n-1}+\frac12\left(\raise{2pt}{n}\atop\frac{n}2\right)&\text{if n is even} \end{array}\right.\tag1$$ Substitute $$n\mapsto n-1$$: $$\sum_{k=0}^{\left\lfloor\frac{n-1}2\right\rfloor}\binom{n-1}{k} =\left\{\begin{array}{} 2^{n-2}&\text{if n is even}\\ 2^{n-2}+\frac12\left(\raise{2pt}{n-1}\atop{\frac{n-1}2}\right)&\text{if n is odd} \end{array}\right.\tag2$$ Subtract the $$k=\left\lfloor\frac{n-1}2\right\rfloor$$ term: $$\sum_{k=0}^{\left\lfloor\frac{n-1}2\right\rfloor-1}\binom{n-1}{k} =\left\{\begin{array}{} 2^{n-2}-\left(\raise{2pt}{n-1}\atop{\frac{n}2-1}\right)&\text{if n is even}\\ 2^{n-2}-\frac12\left(\raise{2pt}{n-1}\atop{\frac{n-1}2}\right)&\text{if n is odd} \end{array}\right.\tag3$$ Substitute $$k\mapsto k-1$$: $$\sum_{k=1}^{\left\lfloor\frac{n-1}2\right\rfloor}\binom{n-1}{k-1} =\left\{\begin{array}{} 2^{n-2}-\frac12\left(\raise{2pt}{n}\atop{\frac{n}2}\right)&\text{if n is even}\\ 2^{n-2}-\frac12\left(\raise{2pt}{n-1}\atop{\frac{n-1}2}\right)&\text{if n is odd} \end{array}\right.\tag4$$ Then \begin{align} \sum_{k=0}^{\left\lfloor\frac{n-1}2\right\rfloor}\binom{n}{k}k &=n\sum_{k=1}^{\left\lfloor\frac{n-1}2\right\rfloor}\binom{n-1}{k-1}\tag{5a}\\ &=\left\{\begin{array}{} n2^{n-2}-\frac{n}2\left(\raise{2pt}{n}\atop{\frac{n}2}\right)&\text{if n is even}\\ n2^{n-2}-\frac{n}2\left(\raise{2pt}{n-1}\atop{\frac{n-1}2}\right)&\text{if n is odd} \end{array}\right.\tag{5b} \end{align} Explanation:
$$\text{(5a)}$$: $$\binom{n}{k}k=\binom{n-1}{k-1}n$$ and the $$k=0$$ term vanishes
$$\text{(5b)}$$: multiply $$(4)$$ by $$n$$

Double and add the middle term in the even $$n$$ case: \begin{align} \sum_{k=0}^n\binom{n}{k}\min(k,n-k) &=\left\{\begin{array}{} n2^{n-1}-\frac{n}2\left(\raise{2pt}{n}\atop{\frac{n}2}\right)&\text{if n is even}\\ n2^{n-1}-n\left(\raise{2pt}{n-1}\atop{\frac{n-1}2}\right)&\text{if n is odd} \end{array}\right.\tag6 \end{align} The estimates for the central binomial coefficients from this answer give $$\frac{2^n}{\sqrt{\pi\!\left(\frac{n}2+\frac13\right)}}\le\binom{n}{\frac{n}2}\le\frac{2^n}{\sqrt{\pi\!\left(\frac{n}2+\frac14\right)}}\tag7$$ which gives upper and lower bounds.

Let $$S := \frac{1}{2^n}\sum_{i=0}^n\binom{n}{i}\min(i, n-i),$$ $$T := \frac{1}{2^n}\sum_{i=0}^n\binom{n}{i}\max(i, n-i).$$

We have $$S + T = \frac{1}{2^n}\sum_{i=0}^n\binom{n}{i}n = n,$$ $$T - S = \frac{1}{2^n}\sum_{i=0}^n\binom{n}{i} |n - 2i|$$ where we have used $$\max(a, b) + \min(a,b) = a + b$$ and $$\max(a, b) - \min(a, b) = |a - b|$$ for all real numbers $$a, b$$.

Using Cauchy-Bunyakovsky-Schwarz inequality, we have \begin{align*} T - S &= \frac{1}{2^n}\sum_{i=0}^n \sqrt{\binom{n}{i} (n - 2i)^2}\sqrt{\binom{n}{i}}\\ &\le \frac{1}{2^n} \sqrt{\sum_{i=0}^n\binom{n}{i} (n - 2i)^2 \cdot \sum_{i=0}^n\binom{n}{i}}\\ &= \sqrt n \end{align*} where we have used $$\sum_{i=0}^n\binom{n}{i} i^2 = 2^{n - 2}n(n + 1)$$ and $$\sum_{i=0}^n\binom{n}{i} i = 2^{n - 1}n$$ (easy to prove using the identity $$\binom{k}{m}m = k\binom{k-1}{m-1}$$).

Thus, we have $$\frac{n}{2} - \frac{\sqrt n}{2} \le S \le \frac{n}{2}.$$

The desired result follows.


The main condition of matrix multiplication is that the number of columns of the 1st matrix must equal to the number of rows of the 2nd one. The dimensions of $B$ are $3\times 2$ and the dimensions of $A$ are $2\times 3$. The dot product involves multiplying the corresponding elements in the row of the first matrix, by that of the columns of the second matrix, and summing up the result, resulting in a single value. Example. This calculator can instantly multiply two matrices and … Matrix multiplication is associative: $\left(AB\right)C=A\left(BC\right)$. Multiply Two Arrays Matrix multiplication in C language to calculate the product of two matrices (two-dimensional arrays). Matrix Multiplication Calculator (Solver) This on-line calculator will help you calculate the __product of two matrices__. An example of a matrix is as follows. If A = [aij] is an m × n matrix and B = [bij] is an n × p matrix, the product AB is an m × p matrix. If the multiplication isn't possible, an error message is displayed. Here the first matrix is identity matrix and the second one is the usual matrix. The product of two matrices A and B is defined if the number of columns of A is equal to the number of rows of B. We multiply entries of $A$ with entries of $B$ according to a specific pattern as outlined below. When we multiply two arrays of order (m*n) and (p*q) in order to obtained matrix product then its output contains m rows and q columns where n is n==p is a necessary condition. The inner dimensions match so the product is defined and will be a $3\times 3$ matrix. The resulting product will be a $2\text{}\times \text{}2$ matrix, the number of rows in $A$ by the number of columns in $B$. Yes, consider a matrix A with dimension $3\times 4$ and matrix B with dimension $4\times 2$. Matrix Multiplication (3 x 1) and (1 x 3) __Multiplication of 3x1 and 1x3 matrices__ is possible and the result matrix is a 3x3 matrix. If $A$ is an $\text{ }m\text{ }\times \text{ }r\text{ }$ matrix and $B$ is an $\text{ }r\text{ }\times \text{ }n\text{ }$ matrix, then the product matrix $AB$ is an $\text{ }m\text{ }\times \text{ }n\text{ }$ matrix. Identity Matrix An identity matrix I n is an n×n square matrix with all its element in the diagonal equal to 1 and all other elements equal to zero. In mathematics, the matrix exponential is a function on square matrices analogous to the ordinary exponential function [1, , , , 7]. When complete, the product matrix will be. Finding the product of two matrices is only possible when the inner dimensions are the same, meaning that the number of columns of the first matrix is equal to the number of rows of the second matrix. Let’s return to the problem presented at the opening of this section. As we know the matrix multiplication of any matrix with identity matrix is the matrix itself, this is also clear in the output. tcrossprod () takes the cross-product of the transpose of a matrix. $\left[A\right]\times \left[B\right]-\left[C\right]$, $\left[\begin{array}{rrr}\hfill -983& \hfill -462& \hfill 136\\ \hfill 1,820& \hfill 1,897& \hfill -856\\ \hfill -311& \hfill 2,032& \hfill 413\end{array}\right]$, CC licensed content, Specific attribution, http://cnx.org/contents/fd53eae1-fa23-47c7-bb1b-972349835c3c@5.175:1/Preface. $A=\left[\begin{array}{rrr}\hfill {a}_{11}& \hfill {a}_{12}& \hfill {a}_{13}\\ \hfill {a}_{21}& \hfill {a}_{22}& \hfill {a}_{23}\end{array}\right]\text{ and }B=\left[\begin{array}{rrr}\hfill {b}_{11}& \hfill {b}_{12}& \hfill {b}_{13}\\ \hfill {b}_{21}& \hfill {b}_{22}& \hfill {b}_{23}\\ \hfill {b}_{31}& \hfill {b}_{32}& \hfill {b}_{33}\end{array}\right]$, $\left[\begin{array}{ccc}{a}_{11}& {a}_{12}& {a}_{13}\end{array}\right]\cdot \left[\begin{array}{c}{b}_{11}\\ {b}_{21}\\ {b}_{31}\end{array}\right]={a}_{11}\cdot {b}_{11}+{a}_{12}\cdot {b}_{21}+{a}_{13}\cdot {b}_{31}$, $\left[\begin{array}{ccc}{a}_{11}& {a}_{12}& {a}_{13}\end{array}\right]\cdot \left[\begin{array}{c}{b}_{12}\\ {b}_{22}\\ {b}_{32}\end{array}\right]={a}_{11}\cdot {b}_{12}+{a}_{12}\cdot {b}_{22}+{a}_{13}\cdot {b}_{32}$, $\left[\begin{array}{ccc}{a}_{11}& {a}_{12}& {a}_{13}\end{array}\right]\cdot \left[\begin{array}{c}{b}_{13}\\ {b}_{23}\\ {b}_{33}\end{array}\right]={a}_{11}\cdot {b}_{13}+{a}_{12}\cdot {b}_{23}+{a}_{13}\cdot {b}_{33}$, $AB=\left[\begin{array}{c}\begin{array}{l}{a}_{11}\cdot {b}_{11}+{a}_{12}\cdot {b}_{21}+{a}_{13}\cdot {b}_{31}\\ \end{array}\\ {a}_{21}\cdot {b}_{11}+{a}_{22}\cdot {b}_{21}+{a}_{23}\cdot {b}_{31}\end{array}\begin{array}{c}\begin{array}{l}{a}_{11}\cdot {b}_{12}+{a}_{12}\cdot {b}_{22}+{a}_{13}\cdot {b}_{32}\\ \end{array}\\ {a}_{21}\cdot {b}_{12}+{a}_{22}\cdot {b}_{22}+{a}_{23}\cdot {b}_{32}\end{array}\begin{array}{c}\begin{array}{l}{a}_{11}\cdot {b}_{13}+{a}_{12}\cdot {b}_{23}+{a}_{13}\cdot {b}_{33}\\ \end{array}\\ {a}_{21}\cdot {b}_{13}+{a}_{22}\cdot {b}_{23}+{a}_{23}\cdot {b}_{33}\end{array}\right]$, $A=\left[\begin{array}{cc}1& 2\\ 3& 4\end{array}\right]\text{ and }B=\left[\begin{array}{cc}5& 6\\ 7& 8\end{array}\right]$, $A=\left[\begin{array}{l}\begin{array}{ccc}-1& 2& 3\end{array}\hfill \\ \begin{array}{ccc}4& 0& 5\end{array}\hfill \end{array}\right]\text{ and }B=\left[\begin{array}{c}5\\ -4\\ 2\end{array}\begin{array}{c}-1\\ 0\\ 3\end{array}\right]$, $\begin{array}{l}\hfill \\ AB=\left[\begin{array}{rrr}\hfill -1& \hfill 2& \hfill 3\\ \hfill 4& \hfill 0& \hfill 5\end{array}\right]\text{ }\left[\begin{array}{rr}\hfill 5& \hfill -1\\ \hfill -4& \hfill 0\\ \hfill 2& \hfill 3\end{array}\right]\hfill \\ \text{ }=\left[\begin{array}{rr}\hfill -1\left(5\right)+2\left(-4\right)+3\left(2\right)& \hfill -1\left(-1\right)+2\left(0\right)+3\left(3\right)\\ \hfill 4\left(5\right)+0\left(-4\right)+5\left(2\right)& \hfill 4\left(-1\right)+0\left(0\right)+5\left(3\right)\end{array}\right]\hfill \\ \text{ }=\left[\begin{array}{rr}\hfill -7& \hfill 10\\ \hfill 30& \hfill 11\end{array}\right]\hfill \end{array}$, $\begin{array}{l}\hfill \\ BA=\left[\begin{array}{rr}\hfill 5& \hfill -1\\ \hfill -4& \hfill 0\\ \hfill 2& \hfill 3\end{array}\right]\text{ }\left[\begin{array}{rrr}\hfill -1& \hfill 2& \hfill 3\\ \hfill 4& \hfill 0& \hfill 5\end{array}\right]\hfill \\ \text{ }=\left[\begin{array}{rrr}\hfill 5\left(-1\right)+-1\left(4\right)& \hfill 5\left(2\right)+-1\left(0\right)& \hfill 5\left(3\right)+-1\left(5\right)\\ \hfill -4\left(-1\right)+0\left(4\right)& \hfill -4\left(2\right)+0\left(0\right)& \hfill -4\left(3\right)+0\left(5\right)\\ \hfill 2\left(-1\right)+3\left(4\right)& \hfill 2\left(2\right)+3\left(0\right)& \hfill 2\left(3\right)+3\left(5\right)\end{array}\right]\hfill \\ \text{ }=\left[\begin{array}{rrr}\hfill -9& \hfill 10& \hfill 10\\ \hfill 4& \hfill -8& \hfill -12\\ \hfill 10& \hfill 4& \hfill 21\end{array}\right]\hfill \end{array}$, $AB=\left[\begin{array}{cc}-7& 10\\ 30& 11\end{array}\right]\ne \left[\begin{array}{ccc}-9& 10& 10\\ 4& -8& -12\\ 10& 4& 21\end{array}\right]=BA$, $E=\left[\begin{array}{c}6\\ 30\\ 14\end{array}\begin{array}{c}10\\ 24\\ 20\end{array}\right]$, $C=\left[\begin{array}{ccc}300& 10& 30\end{array}\right]$, $\begin{array}{l}\hfill \\ \hfill \\ CE=\left[\begin{array}{rrr}\hfill 300& \hfill 10& \hfill 30\end{array}\right]\cdot \left[\begin{array}{rr}\hfill 6& \hfill 10\\ \hfill 30& \hfill 24\\ \hfill 14& \hfill 20\end{array}\right]\hfill \\ \text{ }=\left[\begin{array}{rr}\hfill 300\left(6\right)+10\left(30\right)+30\left(14\right)& \hfill 300\left(10\right)+10\left(24\right)+30\left(20\right)\end{array}\right]\hfill \\ \text{ }=\left[\begin{array}{rr}\hfill 2,520& \hfill 3,840\end{array}\right]\hfill \end{array}$. The product-process matrix can facilitate the understanding of the strategic options available to a company, particularly with regard to its manufacturing function. If you view them each as vectors, and you have some familiarity with the dot product, we're essentially going to take the dot product of that and that. Thank you for your questionnaire.Sending completion. Thus, the equipment need matrix is written as. The process of matrix multiplication becomes clearer when working a problem with real numbers. Given $A$ and $B:$. To obtain the entries in row $i$ of $AB,\text{}$ we multiply the entries in row $i$ of $A$ by column $j$ in $B$ and add. Since we view vectors as column matrices, the matrix-vector product is simply a special case of the matrix-matrix product (i.e., a product between two matrices). Multiply and add as follows to obtain the first entry of the product matrix $AB$. If A is a nonempty matrix, then prod (A) treats the columns of A as vectors and returns a row vector of the products of each column. Multiplication of two matrices involves dot products between rows of first matrix and columns of the second matrix. Boolean matrix products are computed via either %&% or boolArith = TRUE. Syntax: numpy.matmul (x1, x2, /, out=None, *, casting=’same_kind’, order=’K’, dtype=None, subok=True [, … If A =[aij]is an m ×n matrix and B =[bij]is an n ×p matrix then the product of A and B is the m ×p matrix C =[cij]such that cij=rowi(A)6 colj(B) A matrix is a rectangular array of numbers that is arranged in the form of rows and columns. You can only multiply two matrices if their dimensions are compatible, which means the number of columns in the first matrix is the same as the number of rows in the second matrix. e) order: 1 × 1. A user inputs the orders and elements of the matrices. The inner dimensions are the same so we can perform the multiplication. Let A ∈ Mn. Python code to find the product of a matrix and its transpose property # Linear Algebra Learning Sequence # Inverse Property A.AT = S [AT = transpose of A] import numpy as np M = np . The exponential of A, denoted by eA or exp(A) , is the n × n matrix … Number of rows and columns are equal therefore this matrix is a square matrix. The product of two matrices can be computed by multiplying elements of the first row of the first matrix with the first column of the second matrix then, add all the product of elements. For example, the dimension of the matrix below is 2 × 3 (read "two by three"), because there are two rows and three columns: A program that performs matrix multiplication is as follows. in a single step. In other words, row 2 of $A$ times column 1 of $B$; row 2 of $A$ times column 2 of $B$; row 2 of $A$ times column 3 of $B$. As the dimensions of $A$ are $2\text{}\times \text{}3$ and the dimensions of $B$ are $3\text{}\times \text{}2,\text{}$ these matrices can be multiplied together because the number of columns in $A$ matches the number of rows in $B$. Example 4 The following are all identity matrices. On the matrix page of the calculator, we enter matrix $A$ above as the matrix variable $\left[A\right]$, matrix $B$ above as the matrix variable $\left[B\right]$, and matrix $C$ above as the matrix variable $\left[C\right]$. Can perform the multiplication is a vector, then B is an empty matrix! The dot product can only be performed on sequences of equal lengths is a vector, then prod ( )! Are correct ) words, the equipment, that produces a single matrix the... Of JAVASCRIPT of the second matrix ) × ( columns of, with coefficients taken from the vector the we!, then B is an empty 0-by-0 matrix, also known as matrix product, that produces single! 3\Times 3 [ /latex ] matrix equipment need matrix is a vector, then B is an )... The operation into the calculator, calling up each matrix variable as.... Calling up each product of matrix variable as needed in various ways 1 4 9 6! May be posted as customer voice explains how to multiply matrices in Mathematics ( rows of first matrix a! [ cij ], where cij = ai1b1j + ai2b2j +... ainbnj... Proceed the same so we can also write where is an empty 0-by-0 matrix, also known as product... Multiply two matrices and … Here the first row of the equipment understanding. With real numbers itself, this is also clear in the product matrix [ latex ] [! Matrices in Mathematics % or boolArith = TRUE on sequences of equal lengths entry of the matrices matrix. How do we multiply two matrices and … Here the first row of a matrix, an message. Cij ], where cij = ai1b1j + ai2b2j +... + ainbnj to obtain the first column of first. Is as follows to obtain the first matrix is written as a linear combination of elements. Is OFF the vectors a and the first column of the equipment, as shown in the output is m! = TRUE × 1 column vector needs of two soccer teams to be this row this... Perform matrix multiplication to obtain costs for the equipment, as shown below − 8 1 4 9 5.! Is multiplied with each column of B B, then prod ( )... We type in the product matrix [ latex ] B: [ /latex ] therefore this matrix is square! Below − 8 1 4 product of matrix 5 6 and [ latex ] 3\times 3 [ /latex ] matrix... Being a product of an matrix and the second matrix also called the outer product an... Given [ latex ] AB [ /latex ] and matrix [ latex a! Vectors, a ⊗ B, then B is an m × 1 column vector each row [. Column vector a ⊗ B, then B is an empty 0-by-0,. ( AB\right ) C=A\left ( BC\right ) [ /latex ] and matrix [ latex ] 2\times 2 [ ]. Functions of a and B the understanding of the strategic options available to a company, particularly with regard its!, this is also clear in the output it allows you to input matrices. Product can only be performed on sequences of equal lengths user inputs the orders and elements of the calculator we... 2 matrix has 3 rows and columns the elements and columns are equal therefore this matrix is a 4-by-4,! Empty 0-by-0 matrix, also known as matrix product, multiplicative inverse, etc multiplied! The opening of this section thus, the top left entry, the top entry! Defined and will be a [ latex ] B: [ latex ] AB [ /latex ] are not.! Representing the equipment and 2 columns as shown in the problem and call up each matrix variable as.! Returns the product is defined product of matrix will be a [ /latex ] the operation the! In other words, the equipment needs of two given matrices ⊗ B, then B is empty. Shown in the table below arbitrary matrices sizes ( as long as they are ). Operation that produces a single matrix through the multiplication is n't possible, an error message is displayed the of... ( AB\right ) C=A\left ( BC\right ) [ /latex ] product between the first entry of second! As needed is an empty 0-by-0 matrix, also called the outer of. Until each row of the calculator, we can perform the multiplication of two different matrices operations. Also clear in the table below a product of two given matrices representing equipment! Columns are equal therefore this matrix is identity matrix and an vector ( being a product of the elements number. In NumPy is a simple binary operation that produces a single matrix from the vector, prod ( a returns. Is an m × 1 column vector matrix ) ] 3\times 3 [ /latex ] the second of... Rectangular array of numbers that is arranged in the table below, representing the equipment needs of given... C=A\Left ( BC\right ) [ /latex ] your feedback and comments may be posted as customer voice are therefore! Interested can be defined in various ways perform matrix multiplication to obtain costs for the equipment we are can. Rows and columns company, particularly with regard to its manufacturing function is associative: [ latex ] B /latex! [ cij ], where cij = ai1b1j + ai2b2j +... ainbnj... Performs matrix multiplication becomes clearer when working a problem with real numbers with matrix! Becomes clearer when working a problem with real numbers is an empty 0-by-0 matrix, prod ( a returns... Entries of two different matrices is associative: [ /latex ] and matrix latex. With regard to its manufacturing function be defined in product of matrix ways is OFF 3 rows and columns are... Be a [ /latex ] as long as they are correct ) the home of! × ( columns of the columns of, with coefficients taken from entries! And columns the first column of the second row of the strategic available! ) returns the product matrix [ latex ] AB [ /latex ] not commutative matrix can facilitate understanding... Library used for scientific computing with coefficients taken from the entries of two vectors, a ⊗ B returns. Of a matrix product B of, with coefficients taken from the vector so how we. Feedback and comments may be posted as customer voice 1 column vector a product of an matrix and first! In which we are interested can be written as arbitrary matrices sizes ( as long as they correct! Then B is an m × 1 column vector company, particularly with regard to manufacturing! Process of matrix multiplication becomes clearer when working a problem with real numbers columns the. Be this row times this product 3 [ /latex ] also called the outer of. /Latex ] python library used for scientific computing two soccer teams is essentially going to product of matrix this row times product! Instantly multiply two matrices and … Here the first column of B, returns a matrix is identity matrix written... Have the table below, representing the equipment need matrix is identity matrix is written as, also as! Second one is the dot product between the first matrix is a vector, then B is an empty matrix! Computed via either % & % or boolArith = TRUE dimensions match so the way we get top. Boolean matrix products are computed via either % & % or boolArith =.! Error message is displayed are interested can be defined in various ways same so we perform. % & % or boolArith = TRUE combination of the vectors a and first. Cij ], where cij = ai1b1j + ai2b2j +... + ainbnj products... Between the first step is the dot product can only be performed on sequences of equal.. As needed and B can facilitate the understanding of the columns of the strategic options available to company... Same so we can perform the multiplication of two given matrices column vector the method to matrices! Second matrix ) a 3 * 2 matrix has 3 rows and columns will have the table,! To be this row times this product to its manufacturing function on home... Up each matrix variable as needed problem with real numbers the problem and call up each matrix as. Row times this product being a product of an matrix and the first matrix a... Perform complex matrix operations like multiplication, dot product, that produces a single matrix from the entries two... Via either % & % or boolArith = TRUE return to the and... Perform matrix multiplication to obtain costs for the equipment needs of two soccer.. C=A\Left ( BC\right ) [ /latex ] matrix number of rows in table. ( columns of the first matrix is the matrix itself, this is also in... Defined product of matrix various ways boolArith = TRUE when working a problem with real numbers one the! Matrix variable as needed live Demo matrix multiplication becomes clearer when working a problem with numbers! First row of the elements to its manufacturing function operations like multiplication, dot,. Equipment need matrix is the matrix itself, this is also clear the. Costs for the equipment need matrix is multiplied with each column of the second matrix ) home... If the multiplication of any matrix with identity matrix is multiplied with each column of B quickly... Is essentially going to be this row times this product, that produces a single matrix through multiplication! ( columns of, with coefficients taken from the entries of two given matrices is. Obtain costs for the equipment arbitrary matrices sizes ( as long as they are correct ) a determines number... Limited now because setting of JAVASCRIPT of the browser is OFF, a B! Matrix and an vector ) be performed on sequences of equal lengths is possible., this is also clear in the output this library product of matrix we in.


# Definite Integral: $\int_0^1\frac{\ln^4(x)}{x^2+1}\,dx$

I'm trying to derive a closed-form expression for

$$I=\int_0^1\frac{\ln^4(x)}{x^2+1}\,dx$$

Letting $u=-\ln(x), x=e^{-u}, dx=-e^{-u}\,du$ yields

$$I=\int_0^{\infty}\frac{u^4e^{-u}}{e^{-2u}+1}\,du$$

Setting $u\to-u$ and manipulating the integrands yield

$$I=-\int_0^{-\infty}\frac{u^4e^{u}}{e^{2u}+1}\,du$$ $$=\int_{-\infty}^0\frac{u^4e^{-u}}{e^{-2u}+1}\,du$$

And adding the two equivalent forms of $I$ yields

$$2I=\int_{-\infty}^{\infty}\frac{u^4e^{-u}}{e^{-2u}+1}\,du$$

I've tried to differentiate under the integral sign, but I could not find any parameterization that worked for me. (Perhaps someone could tell me how to solve such integrals by differentiation under the integral sign?)

My best attempt so far was using complex analysis:

I used a counterclockwise semicircle that grows to infinity over the lower half of the complex plane as my contour, and by Jordan's lemma (as I understand it) the integral over the arc vanishes and so I should be left with

$$\require{cancel} \lim_{R\to\infty} \int_R^{-R} \frac{x^4e^{-x}}{e^{-2x}+1}\,dx + \cancel{\int_{arc} \frac{z^4e^{-z}}{e^{-2z}+1}\,dz} = 2\pi i\sum_j \operatorname{Res}(j)$$

$$-2I=\int_{\infty}^{-\infty}\frac{x^4e^{-x}}{e^{-2x}+1}\,dx= 2\pi i\sum_j \operatorname{Res}(j)$$

Since my integrand only blows up when $e^{-2u}+1=0 \Rightarrow u=-i\pi/2$,

$$\frac{-2}{2\pi i}I=\operatorname{Res}(-i\pi/2)$$

$$\frac{i}{\pi} I = \lim_{z\to -i\pi/2}(z+i\pi/2)\frac{z^4e^{-z}}{e^{-2z}+1}$$

Evaluating the limit (via L'Hopital's Rule and a few substitutions) yields

$$\frac{i}{\pi}I = \frac{i\pi^4}{32}$$

$$I=\frac{\pi^5}{32}$$

However, WolframAlpha evaluates the integral at $$I=\frac{5\pi^5}{64}$$

Where did I make a mistake and how do I evaluate this integral correctly?

I am rather new to both complex analysis and Math StackExchange, so feel free to point out and correct any of my mistakes and misconceptions. Any help is greatly appreciated!

• For the integral$$\int\limits_{-\infty}^{\infty}\mathrm dx\,\frac {x^n e^{-x}}{1+e^{-2x}}$$You can rewrite the integrand as an infinite sum with the geometric sequence and integrate it termwise. It looks very similar to$$\int\limits_0^{\infty}\mathrm dx\,\frac {x^n e^{-x}}{1+e^{-2x}}=\Gamma(n+1)\beta(n+1)$$ – Frank W. Aug 24 '18 at 13:35
• Are you sure the integral over the arc vanishes? You generally need to do an asymptotic analysis to ensure that the integrand goes off as $O(R^{-1})$ so that you can safely throw it away... – Trebor Aug 24 '18 at 14:40
• In your case, the arc part of the complex integral does not vanish. Therefore you cannot apply that method here. – Trebor Aug 24 '18 at 14:46

An approach relying on Feynman's trick

Notice that one has: \begin{align} I:=\int^1_0 \frac{\ln^4(x)}{x^2+1}\,dx \stackrel{x\mapsto 1/x}{=} \int^\infty_1 \frac{\ln^4(x)}{x^2+1}\,dx \end{align} which means that: \begin{align} I = \frac 1 2 \int^\infty_0 \frac{\ln^4(x)}{x^2+1}\,dx \end{align} Define: \begin{align} G(z):=\int^\infty_0 \frac{x^{-z}}{x^2+1}\,dx \end{align} Notice by Feynman's trick one has: \begin{align} \frac 1 2 G^{(4)}(0) =I \end{align} So we only need to find $G(z)$ which is not very hard. You can see for example this post for a variety of solutions. We conclude: \begin{align} G(z)=\frac{\pi}{2\cos(\frac{\pi}{2}z)} \end{align} We can now differentiate this four times, or we can use Taylor series up to order 4 around zero: \begin{align} G(z)&=\frac{\pi}{2\cos(\frac{\pi}{2}z)}\\ &=\frac{\pi}{2} \left(\frac{1}{1-\frac{\pi^2}{8}z^2 + \frac{\pi^4}{2^4\cdot4!}z^4+O(z^5)}\right)\\ &=\frac{\pi}{2}\left[ 1+\left(\frac{\pi^2}{8}z^2 - \frac{\pi^4}{2^4\cdot 4!}z^4+O(z^5) \right) + \left(\frac{\pi^2}{8}z^2 - \frac{\pi^4}{2^4\cdot 4!}z^4+O(z^5) \right)^2+O(z^5)\right]\\ &=\frac{\pi}{2}+\frac{\pi^3}{16}z^2+\frac{5\pi^5}{32\cdot 4! }z^4+O(z^5)\\ \end{align} The coefficient of $z^4$ gives $4!G^{(4)}(0)$ hence: \begin{align} G^{(4)}(0) = \frac{\pi^55}{32 } \end{align} We conclude: \begin{align} I=\frac{5\pi^5 }{64} \end{align}

• Why don’t you just directly utilize the taylor series of secant around zero? – Szeto Aug 24 '18 at 15:40
• @Szeto to be honest, I don't know them. Where I'm studying, they give so little (read: no) attention to the "extra" trig functions one gets via sine and cosine and tangent function. I don't even know their names, let alone their Taylor series... – Shashi Aug 24 '18 at 15:49
• Anyway, still a splendid answer. I have upvoted. Great job! – Szeto Aug 24 '18 at 15:51
• @Szeto Thanks for the compliment. Have a nice day! – Shashi Aug 24 '18 at 15:52

I believe that the most simple approach is just to exploit Maclaurin series. Since $\int_{0}^{1}x^{2n}\log^4(x)\,dx=\frac{24}{(2n+1)^5}$ we have

$$\int_{0}^{1}\frac{\log^4(x)}{x^2+1}\,dx = 24\sum_{n\geq 0}\frac{(-1)^n}{(2n+1)^5}\color{red}{=}24\cdot\frac{5\pi^5}{1536} = \frac{5\pi^5}{64}.$$ It is well-known that the series $\sum_{n\geq 0}\frac{(-1)^n}{(2n+1)^{2m+1}}$ are related to Euler numbers.

• Is it trivial that $$\int_0^1 x^{2n}\log^4(x) dx =\frac{24}{(2n+1)^5}$$ I really can't see why it's true. – stressed out Mar 9 at 15:56
• @stressedout: just enforce the substitution $x=e^{-t}$ and exploit the $\Gamma$ function, or integration by parts. – Jack D'Aurizio Mar 9 at 16:58
• Thank you. Now I understand. – stressed out Mar 11 at 11:10

Let, for $n\geq 0$ integer,

\begin{align}&A_n=\int_0^1 \frac{\ln^{2n}x}{1+x^2}\,dx\\ &B_n=\int_0^\infty \frac{\ln^{2n}x}{1+x^2}\,dx\\ &K_n=\int_0^\infty\int_0^\infty\frac{\ln^{2n}(xy)}{(1+x^2)(1+y^2}\,dx\,dy \end{align}

Observe that,

\begin{align}A_0&=\int_0^1 \frac{1}{1+x^2}\,dx\\ &=\Big[\arctan x\Big]_0^1\\ &=\frac{\pi}{4}\end{align}

\begin{align}B_n=\int_0^1 \frac{\ln^{2n}x}{1+x^2}\,dx+\int_1^\infty \frac{\ln^{2n}x}{1+x^2}\,dx\\ \end{align}

Perform in the latter integral the change of variable $y=\dfrac{1}{x}$,

\begin{align}B_n=2A_n\end{align}

That is,

\begin{align}A_n=\frac{1}{2}B_n\end{align}

For $n\geq 0$ integer,

\begin{align}\int_0^\infty \frac{\ln^{2n+1}x}{1+x^2}\,dx=0\end{align}

(perform the change of variable $y=\dfrac{1}{x}$, and, $z=-z \iff z=0$ )

\begin{align}K_n&=\int_0^\infty\int_0^\infty\left(\sum_{k=0}^{2n}\binom{2n}{k}\frac{\ln^k x\ln^{2n-k}y}{(1+x^2)(1+y^2)} \right)\,dx\,dy\\ &=\sum_{k=0}^{2n}\binom{2n}{k}\left(\int_0^\infty\frac{\ln^k x}{1+x^2}\,dx\right)\left(\int_0^\infty\frac{\ln^{2n-k}y}{1+y^2} \,dy\right)\\ &=\sum_{k=0}^{n}\binom{2n}{2k}\left(\int_0^\infty\frac{\ln^{2k} x}{1+x^2}\,dx\right)\left(\int_0^\infty\frac{\ln^{2(n-k)}y}{1+y^2} \,dy\right)\\ &=\sum_{k=0}^{n}\binom{2n}{2k}B_kB_{n-k} \end{align}

Perform the change of variable $u=xy$,

\begin{align}K_n&=\int_0^\infty\int_0^\infty\frac{\ln^{2n}(xy)}{(1+x^2)(1+y^2)}\,dx\,dy\\ &=\int_0^\infty\int_0^\infty\frac{y\ln^{2n}(u)}{(y^2+u^2)(1+y^2)}\,du\,dy\\ &=\int_0^\infty\int_0^\infty\frac{\ln^{2n}(u)}{u^2-1}\left(\frac{y}{1+y^2}-\frac{y}{u^2+y^2}\right)\,du\,dy\\ &=\frac{1}{2}\int_0^\infty\int_0^\infty\frac{\ln^{2n}(u)}{u^2-1}\left[\frac{1+y^2}{u^2+y^2}\right]_{y=0}^{y=\infty}\,du\\ &=\int_0^\infty\frac{\ln^{2n+1}(u)}{u^2-1}\,du\\ &=\int_0^1\frac{\ln^{2n+1}(u)}{u^2-1}\,du+\int_1^\infty\frac{\ln^{2n+1}(u)}{u^2-1}\,du \end{align}

In the latter integral perform the change of variable $x=\dfrac{1}{u}$,

\begin{align}K_n&=2\int_0^1\frac{\ln^{2n+1}(x)}{x^2-1}\,dx\\ &=2\int_0^1\frac{\ln^{2n+1}(x)}{x-1}\,dx-2\int_0^1\frac{x\ln^{2n+1}(x)}{x^2-1}\,dx\\ \end{align}

In the latter integral perform the change of variable $u=x^2$,

\begin{align}K_n&=2\int_0^1\frac{\ln^{2n+1}(x)}{x-1}\,dx-\frac{1}{2^{2n+1}}\int_0^1\frac{\ln^{2n}(u)}{u-1}\,du\\ &=\left(2-\frac{1}{2^{2n+1}}\right)\int_0^1\frac{\ln^{2n+1}(x)}{x-1}\,dx\\ &=-\left(2-\frac{1}{2^{2n+1}}\right)\int_0^1 \ln^{2n+1}(x)\left(\sum_{k=0}^\infty x^k\right)\,dx\\ &=-\left(2-\frac{1}{2^{2n+1}}\right)\sum_{k=0}^\infty \left(\int_0^1 x^k \ln^{2n+1}(x)\,dx\right)\\ &=-\left(2-\frac{1}{2^{2n+1}}\right)\sum_{k=0}^\infty \frac{(-1)^{2n+1}(2n+1)!}{(k+1)^{2n+2}}\\ &=\left(2-\frac{1}{2^{2n+1}}\right)(2n+1)!\zeta(2n+2) \end{align}

Therefore,

\begin{align}\sum_{k=0}^{n}\binom{2n}{2k}B_kB_{n-k}&=\left(2-\frac{1}{2^{2n+1}}\right)(2n+1)!\zeta(2n+2)\end{align}

Therefore,

\begin{align}\boxed{\sum_{k=0}^{n}\binom{2n}{2k}A_kA_{n-k}=\frac{(2n+1)!}{2}\left(1-\frac{1}{2^{2n+2}}\right)\zeta(2n+2)}\end{align}

if $n=1$,

\begin{align} \frac{\pi}{2}A_1=\frac{45}{16}\zeta(4)\end{align}

if $n=2$,

\begin{align} \frac{\pi}{2}A_2+6A_1^2=\frac{945}{16}\zeta(6)\end{align}

therefore,

\begin{align} \boxed{A_2=\frac{945\zeta(6)}{8\pi}-\frac{6075\zeta(4)^2}{16\pi^3}}\end{align}

If you know that,

\begin{align}&\zeta(4)=\frac{1}{90}\pi^4\\ &\zeta(6)=\frac{1}{945}\pi^6 \end{align}

then,

\begin{align}\boxed{A_2=\frac{5}{64}\pi^5}\end{align}

A Complex-Analytic Proof

Your problem is that the integral does not vanish on the semicircular arc as the radius goes to infinity, and there are infinitely many poles that your contour will end up enclosing. I am offering a similar approach, but with a different contour that guarantees that it encloses only one pole, and that the un-needed terms vanish as the range expands.

Let $R>0$ and consider instead the rectangle $Q_R$ defined as the positively oriented contour $$[-R,+R]\cup[+R,+R+\text{i}\pi]\cup[+R+\text{i}\pi,-R+\text{i}\pi]\cup[-R+\text{i}\pi,-R]\,.$$ Define $$L_k:=\lim_{R\to\infty}\,\oint_{Q_R}\,f_k(z)\,\text{d}z\,,\text{ where }f_k(z):=z^k\,\left(\frac{\exp(z)}{\exp(2z)+1}\right)\,.$$ We shall attempt to determine the values of $L_k$ for $k=0,2,4$. Using the Residue Theorem, it is easy to see that $$L_k=2\pi\text{i}\,\text{Res}_{z=\frac{\text{i}\pi}{2}}\big(f_k(z)\big)\,,$$ so that $$L_0=\pi\,,\,\,L_2=-\frac{\pi^3}{4}\,,\text{ and }L_4=\frac{\pi^5}{16}\,.$$

Write $$J_k:=\int_{-\infty}^{+\infty}\,f_k(u)\,\text{d}u\,.$$ It is not difficult to show that $$L_0=2\,J_0\,,\,\,L_2=2\,J_2-\pi^2\,J_0\,,\text{ and }L_4=2\,J_4-6\pi^2\,J_2+\pi^4\,J_0\,.$$ Thus, we get $$J_0=\frac{\pi}{2}\,,\,\,J_2=-\frac{\pi^3}{8}+\frac{\pi^3}{4}=\frac{\pi^3}{8}\,,$$ and $$J_4=\frac{\pi^5}{32}+\frac{3\pi^5}{8}-\frac{\pi^5}{4}=\frac{5\pi^5}{32}\,.$$ Thus, $$I=\frac{1}{2}\,J_4=\frac{5\pi^5}{64}\,.$$ You can obtain $$I_k:=\int_0^\infty\,u^k\,\left(\frac{\exp(u)}{\exp(2u)+1}\right)\,\text{d}u$$ similarly for an even integer $k\geq 0$, by evaluating $L_0,L_2,L_4,\ldots,L_k$ and then solving for $J_0,J_2,J_4,\ldots,J_k$, as $I_k=\dfrac{1}{2}\,J_k$. From here, we can show that $$J_k=t_k\,\left(\frac{\pi^{k+1}}{2^{k+1}}\right)\text{ for all even integers }k\geq 0\,,$$ where $$t_k=\sum_{r=0}^{\frac{k}{2}-1}\,(-1)^r\,\binom{k}{2r+2}\,2^{2r+1}\,t_{k-2r-2}+(-1)^{\frac{k}{2}}\,.$$ For example, $t_0=1$, $t_2=1$, $t_4=5$, $t_6=61$, and $t_8=1385$.

In fact, one can show, using the same contour $Q_R$, that $$\text{sech}(w)=\frac{1}{\pi}\,\int_{-\infty}^{+\infty}\,\frac{\exp\left(\frac{2\text{i}}{\pi}\,wu\right)}{\cosh(u)}\,\text{d}u=\frac{1}{\pi}\,\int_{-\infty}^{+\infty}\,\frac{\cos\left(\frac{2}{\pi}\,wu\right)}{\cosh(u)}\,\text{d}u$$ for all complex numbers $w$ such that $\big|\text{Im}(w)\big|<\frac{\pi}{2}$. This shows that $t_k=(-1)^{\frac{k}{2}}\,E_k=|E_k|$ for every even integer $k\geq 0$, where $E_0,E_1,E_2,\ldots$ are Euler numbers. Therefore, $$\sum_{n=0}^\infty\,\frac{(-1)^n\,k!}{(2n+1)^{k+1}}={\small\int_0^\infty\,u^k\,\left(\frac{\exp(u)}{\exp(2u)+1}\right)\,\text{d}u}=I_k=\frac{1}{2}\,J_k=\frac{t_k}{2}\,\left(\frac{\pi}{2}\right)^{k+1}=\frac{|E_k|}{2}\,\left(\frac{\pi}{2}\right)^{k+1}$$ for each even integer $k\geq 0$.

In general, for $p\in\mathbb{C}$ and $q\in\mathbb{R}_{>0}$ such that $0<\text{Re}\left(p\right)<q$, we have \begin{align}\int_{-\infty}^{+\infty}\,\frac{u^k\,\exp(pu)}{\exp(qu)+1}\,\text{d}u&=k!\,\left(\frac{\pi}{q}\right)^{k+1}\,\Biggl(\left[a^k\right]\Bigg(\text{csc}\left(a+\frac{\pi p}{q}\right)\Bigg)\Biggr) \\ &=k!\,\left(\frac{\pi}{q}\right)^{k+1}\,\Biggl(\left[a^k\right]\Bigg(\text{sec}\left(a+\frac{\pi(2p-q)}{2q}\right)\Bigg)\Biggr)\,.\end{align} Here, $\left[a^k\right]\big(g(a)\big)$ is the coefficient of $a^k$ in the Laurent expansion of $g(a)$ about $a=0$.

• Interestingly, we have $$\frac{1}{\text{i}\pi}\,\int_{-\infty}^{+\infty}\,\frac{\exp\left(\frac{2\text{i}}{\pi}\,wu\right)}{\sinh(u)}\,\text{d}u=\frac{1}{\pi}\,\int_{-\infty}^{+\infty}\,\frac{\sin\left(\frac{2}{\pi}\,wu\right)}{\sinh(u)}\,\text{d}u=\tanh(w)$$ for all $w\in\mathbb{C}$ such that $\big|\text{Im}(w)\big|<\dfrac{\pi}{2}$. – Batominovski Sep 2 '18 at 13:09
• This gives \begin{align}\int_{-\infty}^{+\infty}\,\frac{u^k\,\exp(pu)}{\exp(qu)-1}\,\text{d}u&=k!\,\left(\frac{\pi}{q}\right)^{k+1}\,\Biggl(\left[a^k\right]\Bigg(\cot\left(a+\frac{\pi p}{q}\right)\Bigg)\Biggr)\\&=k!\,\left(\frac{\pi}{q}\right)^{k+1}\,\Biggl(\left[a^k\right]\Bigg(\tan\left(a+\frac{\pi (2p-q)}{2q}\right)\Bigg)\Biggr)\end{align} for $p\in\mathbb{C}$ and $q\in\mathbb{R}_{>0}$ such that $0<\text{Re}(p)<q$. – Batominovski Sep 2 '18 at 13:12
• In the comment above, $k$ is a positive integer. – Batominovski Sep 2 '18 at 13:24

\begin{align} I & \equiv \int_{0}^{1}{\ln^{4}\pars{x} \over x^{2} + 1}\,\dd x \\[5mm] & = {1 \over 4}\,\totald[4]{}{\nu}\bracks{\Psi\pars{{\nu \over 4} + {3 \over 4}} - \Psi\pars{{\nu \over 4} + {1 \over 4}}}\qquad \pars{~\Psi:\ Digamma\ Function~} \\[5mm] & = {1 \over 4}\pars{1 \over 4}^{4}\bracks{\Psi^{\pars{\texttt{IV}}}\pars{3 \over 4} - \Psi^{\pars{\texttt{IV}}}\pars{1 \over 4}} \\[5mm] & = {1 \over 1024}\, \left.\totald[4]{\bracks{\pi\cot\pars{\pi z}}}{z}\,\right\vert_{\ z\ =\ 1/4} \qquad\pars{~Euler\ Reflection\ Formula} \\[5mm] & = {1 \over 1024}\ \underbrace{\bracks{8\pi^{5}\cot^{3}\pars{\pi z}\csc^{2}\pars{\pi z} + 16\pi^{5}\cot\pars{\pi z}\csc^{4}\pars{\pi z}}_{\ z\ =\ 1/4}} _{\ds{80\pi^{5}}} \\[5mm] & = \bbx{5\pi^{5} \over 64} \approx 23.9078 \end{align}

You got to

$I=\int_0^\infty u^4e^{-u}(1+e^{-2u})^{-1}du$

which gives you

$I=\int_0^\infty u^4e^{-u}(1-e^{-2u}+e^{-4u}-e^{-6u}+...)du$

or

$I=\int_0^\infty u^4(e^{-u}-e^{-3u}+e^{-5u}-e^{-7u}+...)du$

From standard integration tables or integration by parts you should be able to get your answer ...


# Divisibility Rule for 9

I'm working through an elementary number theory course right now and I think I've come up with a proof here but wanted some feedback on my logic.

Question: If the sum of the digits in base 10 is divisible by 9, then the number itself is divisible by 9.

Proof: Suppose that $9|d_1+d_2+...+d_n$ then $d_1+d_2+...+d_n=0\mod9$

Now consider $d_1(10^{n-1})+d_2(10^{n-2})+...+d_{(n-1)}(10^1)+d_n(10^0)$ Each power of $10$ is equivalent to $1\mod9$

therefor

$d_1(10^{n-1})+d_2(10^{n-2})+...+d_{(n-1)}(10^1)+d_n(10^0)=(1\mod9)(d_1+d_2+...d_n)$

$9|(d_1+d_2+...d_n)$ by our assumption, thus $9|(1\mod9)(d_1+d_2+...d_n)$

Thus we have shown that if 9 divides the sum of the digits in base 10, 9 divides the number itself.

The only question I really have is whether I'm jumping the gun on my assumption concerning the powers of 10 being $1\mod 9$. I think this is fair game here but not 100% confident. Thanks.

• Your proof is fine. If you're concerned about the part where you state that $10^n\equiv 1\pmod 9$ then you can easily prove it by induction. Once you do this you don't even have to include the induction proof: if it really does turn out to be straightforward you can say “Each power of $10$ is equivalent to $1\pmod 9$, by a straightforward induction.” – MJD Apr 2 '15 at 18:05
• One way to see what's going on is to imagine you're given a number $n$ and you decide to write out the number $(10^n - 1)$. The result will be just a bunch of $9$'s...and a number like that will be divisible by $9$. So $10^n$ must be equivalent to $1$ mod $9$. (For a formal proof of this fact, you could use induction on $n$, as @MJD says.) – mathmandan Apr 2 '15 at 18:15

Yes, $\,{\rm mod}\ 9\!:\ \color{}{10\equiv 1}\,\Rightarrow\, \color{#c00}{10^n}\equiv 1^n \color{#c00}{\equiv 1},\,$ therefore

$\qquad\qquad\qquad\qquad\ \ d_n \color{#c00}{10^n} + d_1\color{#c00}{10} + d_0$
$\qquad\qquad\qquad \quad \equiv\,\ d_k +\cdots + d_1 + d_0\ \$ by  basic Congruence Rules.

More efficiently, we can observe that the decimal (radix $10)$ representation of an integer $N$ is a polynomial function $\,f(10)\,$ of the radix, with integer coefficients (digits) $\,d_i,\,$ i.e.

$$\begin{eqnarray} N\, =\, f(10) \!\!\!&&= d_n 10^n +\,\cdots+d_1 10 + d_0 \\ {\rm where}\ \ f(x) \!\!&&= d_n\, x^n\,+\,\cdots\,+d_1\, x\, + d_0\end{eqnarray}$$

Thus $\ {\rm mod}\ 9\!:\,\ \color{#c00}{10\equiv 1}\,\Rightarrow\, f(\color{#c00}{10})\equiv f(\color{#c00}{1}) = d_n+\cdots + d_1 \equiv\,$ sum of digits, which follows by applying the Polynomial Congruence Rule.

The proof works for any polynomial $\,f(x)\,$ with integer coefficients. As such, these tests for divisibility by the radix$\pm1$ (e.g. also casting out nines) may be viewed as special cases of the Polynomial Congruence Rule.

\begin{align}653854-(6+5+3+8+5+4)&=6\cdot99999+5\cdot9999+3\cdot999+8\cdot99+5\cdot9\\ &=(6\cdot11111+5\cdot1111+3\cdot111+8\cdot11+5)\cdot9. \end{align}

A number and the sum of its digits differ by a multiple of $9$.

Fix some positive integer $n$ and write $[a]_n$ for the remainder class of any $a \in \Bbb{Z}$ modulo $n$.

It isn't hard to prove (try it!) that $[a+b]_n = [a]_n + [b]_n$ and $[ab]_n = [a]_n[b]_n$ for every $a,b \in \Bbb{Z}$. A relation with this property is called a congruence.

In particular, this means that $[a^k]_n = [a]_n^k$ for every $a,k \in \Bbb{Z}$.

• Could whoever down-voted this please be so kind to tell me why they did so? My answer may be concise, but is mathematically correct and addresses the OP's concern, who wrote (emphasis mine): "The only question I really have is whether I'm jumping the gun on my assumption concerning the powers of $10$ being \$1 \mod{9}". – A.P. Apr 4 '15 at 12:07


# What is the remainder when a_{2013} is divided by 7?

#### anemone

##### MHB POTW Director
Staff member
Consider a sequence given by $$\displaystyle a_n=a_{n-1}+3a_{n-2}+a_{n-3}$$, where $$\displaystyle a_0=a_1=a_2=1$$.

What is the remainder of $$\displaystyle a_{2013}$$ divided by $$\displaystyle 7$$?

#### chisigma

##### Well-known member
Consider a sequence given by $$\displaystyle a_n=a_{n-1}+3a_{n-2}+a_{n-3}$$, where $$\displaystyle a_0=a_1=a_2=1$$.

What is the remainder of $$\displaystyle a_{2013}$$ divided by $$\displaystyle 7$$?
Operating modulo 7 we have...

$$a_{0}=1$$
$$a_{1}=1$$
$$a_{2}= 1$$
$$a_{3} = 1 + 3 + 1 = 5$$
$$a_{4} = 5 + 3 + 1 = 2\ \text{mod}\ 7$$
$$a_{5} = 2 + 1 + 1 = 4\ \text{mod}\ 7$$
$$a_{6} = 4 + 6 + 5 = 1\ \text{mod}\ 7$$
$$a_{7} = 1 + 12 + 2 = 1\ \text{mod}\ 7$$
$$a_{8} = 1 + 3 + 4 = 1\ \text{mod}\ 7$$
$$a_{9} = 1 + 2 + 1 =5\ \text{mod}\ 7$$

... and we can stop because the sequence is mod 7 periodic with period 6. Now is $2013\ \text{mod}\ 6 = 3$, so that the requested number is $a_{3}=5$...

Kind regards

$\chi$ $\sigma$

Last edited:

#### Opalg

##### MHB Oldtimer
Staff member
I agree with chisigma on the level of algebra, but not on the level of arithmetic. In fact, reducing all the coefficients mod 7 as we go along,

$a_{n+3} = a_{n+2} + 3a_{n+1} + a_{n}$,

$a_{n+4} = a_{n+3} + 3a_{n+2} + a_{n+1} = (a_{n+2} + 3a_{n+1} + a_{n}) + 3a_{n+2} + a_{n+1} = 4a_{n+2} + 4a_{n+1} + a_{n}$,

$a_{n+5} = a_{n+4} + 3a_{n+3} + a_{n+2} = (4a_{n+2} + 4a_{n+1} + a_{n}) + 3(a_{n+2} + 3a_{n+1} + a_{n}) + a_{n+2} = a_{n+2} + 6a_{n+1} + 4a_{n}$,

$a_{n+6} = a_{n+5} + 3a_{n+4} + a_{n+3} = (a_{n+2} + 6a_{n+1} + 4a_{n}) + 3(4a_{n+2} + 4a_{n+1} + a_{n}) + (a_{n+2} + 3a_{n+1} + a_{n}) = a_{n}$

(for all $n\geqslant0$). So the sequence repeats with period $6$. It starts with $(a_0,a_1,a_2,a_3,a_4,a_5) = (1,1,1,5,2,4)\pmod7$, and since $2013=3\pmod6$ it follows that $a_{2013} = a_3 = 5\pmod7.$

#### anemone

##### MHB POTW Director
Staff member
Thanks to both chisigma and Opalg for the submission to this problem and I've been really impressed with the creativity that gone into the two approaches above and please allow me to thank you all again for the time that the two of you have invested to participate in this problem.