# Matrix Multiplication

I have therefore written a matrix vector multiplication example that needs 13 seconds to run (5 seconds with. CUDA matrix multiplication with CUBLAS and Thrust. Important: We can only multiply matrices if the number of columns in the first matrix is the same as the number of rows in the second matrix. Specifically, If both a and b are 1-D arrays, it is inner product of vectors (without complex conjugation). Multiplication. In mathematics, matrix multiplication or matrix product is a binary operation that produces a matrix from two matrices with entries in a field. Compute answers using Wolfram's breakthrough technology & knowledgebase, relied on by millions of students & professionals. If our equation has two variables, there can be infinitely many combinations of numbers that would work. Learn: In this article, we will see how to perform matrix multiplication in python. The manual method of multiplication procedure involves a large number of calculations especially when it comes to higher order of matrices, whereas a program in C can carry out the operations with short, simple and understandable codes. In other words, To multiply an m×n matrix by an n×p matrix, the ns must be the same, and the result is an m×p matrix. In my last Thank You post, I suggested that Matrix multiplication is not Excel’s forte. \end{align*} Although it may look confusing at first, the process of matrix-vector multiplication is actually quite simple. The matrix product is designed for representing the composition of linear maps that are represented by matrices. Matrix multiplication by a scalar: First of all, I really want to say thank you very much for taking the time to help me understand this. Matrix multiplication is a row-by-column multiplication where each element of one matrix is multiplied by every element of another matrix. To multiply one matrix with another you need to do a dot product of rows and columns. (Here, $\operatorname{diag}$ is an operator that creates a column vector out of a matrix's main diagonal. The first matrix must have the same number of columns as the second matrix has rows. That’s all about mutliplying two matrices in java. To multiply matrices, you'll need to multiply the elements (or numbers) in the row of the first matrix by the elements. One question: Why is the column of the first (left-hand) matrix colored red, along with the row of the second (right-hand) matrix?. Matrix multiplication in C. com - id: 799dc5-YmUxN. Figure 5: Our Neural Network, with indexed weights. Good question! The main reason why matrix multiplication is defined in a somewhat tricky way is to make matrices represent linear transformations in a natural way. Matrices can be multiplied by scalar constants in a similar manner to multiplying any number of variable by a scalar constant. Multiplying trans1 by trans2 is not the same as multiplying trans2 by trans1. When working with matrices, we can perform a number of matrix operations including matrix multiplication. Matrix Multiplication Calculator multiply matrices online. Your text probably gave you a complex formula for the process, and that formula probably didn't make any sense to you. Matrix Multiplication. As an example you'll be able to solve a series of simultaneous linear equations using Mathcad’s. This example contains a high-performance implementation of the fundamental matrix multiplication operation and demonstrates optimizations that can be described in Open Computing Language (OpenCL TM) to achieve significantly improved performance. Yes, it wll give you a 2xx1 matrix! When you consider the order of the matrices involved in a multiplication you look at the digits at the extremes to "see" the order of the result. The expressions to the right of the equals sign show how the new x, y and z values are calculated after the vector has been transformed. By Rob Hochberg Shodor, Durham, North Carolina This module teaches: Matrix multiplication in the context of enumerating paths in a graph. So we have to be very careful about multiplying matrices. OpenGL 101: Matrices - projection, view, model Posted on May 22, 2013 by Paul. Optimization Techniques for Small Matrix Multiplication Charles-Eric Drevet Ancien el eve, Ecole polytechnique, Palaiseau, France [email protected] Scalar Multiplication: Product of a Scalar and a Matrix There are two types or categories where matrix multiplication usually falls under. Before you can even attempt to perform matrix multiplication, you must be sure that the last dimension of the first matrix is the same as the first dimension of the second matrix. The initial attempt to evaluate the f(A) would be to replace every x with an A to get f(A) = A 2 - 4A + 3. For this I tried to follow the xapp1170 which includes a tutorial for the ZC702 board using Planahead. MulT() with w as 0 //fbx sdk forced w to 1 and then multiplied Then I gave up and just manually zeroed out the matrix's T. 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. The first one is called Scalar Multiplication, also known as the “Easy Type“; where you simply multiply a number into each and every entry of a given matrix. So this right over here has two rows and three columns. Multiplication Factor appears in the Matrix Table for the new entrants at the entry level. I have therefore written a matrix vector multiplication example that needs 13 seconds to run (5 seconds with. What are synonyms for matrix multiplication?. We’ve seen so far some divide and conquer algorithms like merge sort and the Karatsuba’s. Multiplication Here is a list of all of the skills that cover multiplication! These skills are organized by grade, and you can move your mouse over any skill name to preview the skill. Chandler Burﬁeld APSP with Matrix Multiplication March 15, 2013 3 / 19. You must know which of the two matrices will be to the right (of your multiplication) and which one will be to the left; in other words, we have to know whether we are asked to perform or. Matrices are multiplied by the system shown below. The syntax for the function is:. Let's see it with an example where you are trying to multiply a 3X3 matrix with a 3X2 matrix. Multiplying matrices is a little more complex than the operations you've seen so far. Start studying Matrix multiplication. Matrix Multiplication. 3x3 Matrix Multiplication Calculator. First let's make some data: # Make some data a = c(1,2,3) b = c(2,4,6) c = cbind(a,b) x = c(2,2,2) If we look at the output (c and x), we can see that c is a 3x2…. If you know how to multiply two matrices together, you're well on your way to "dividing" one matrix by another. The algorithm follows directly from the definition of matrix multiplication. We 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. As an example you'll be able to solve a series of simultaneous linear equations using Mathcad’s. This scalar multiplication of matrix calculator can help you calculate the multiplication between a scalar and a matrix no matte of its type (having from 1 to 4 columns and/or rows). In mathematics, a matrix (plural: matrices) is a rectangle of numbers, arranged in rows and columns. Multiplication of Matrices. The first matrix must have the same number of columns as the second matrix has rows. There is nothing fundamentally di erent between the matrix multiplies that we need to compute at this level relative to our original problem. 2 Linear Substitutions and Matrix Multiplication Or we can use equations (1) and (4) to go by way of x, u = Ax = A(Ep) = (AE)p We therefore conclude, without doing any real work, that AE = DC, that is,. Now the way that us humans have defined matrix multiplication, it only works when we're multiplying our two matrices. –Use SVD to ensure this property. Example: a matrix with 3 rows and 5 columns can be added to another matrix of 3 rows and 5 columns. The Mailman algorithm: a note on matrix vector multiplication Edo Liberty ⁄ Computer Science Yale University New Haven, CT Steven W. In general, a matrix is just a rectangular array or table of numbers. Multiplying matrix is one of the tedious things that we have done in schools. It's a visualization of the matrix multiplication algorithm. As demonstrated above, in general AB ≠BA. This tool for multiplying 3x3 matrices. \end{align*} Although it may look confusing at first, the process of matrix-vector multiplication is actually quite simple. Hanrahan / Understanding the Efciency of GPU Algorithms for Matrix-Matrix Multiplication plications and must run efciently if GPUs are to become a. An interactive matrix multiplication calculator for educational purposes. Vectors are commonly used in matrix multiplication to find a new point resulting from an applied transformation. This array function returns the product of two matrices entered in a worksheet. Ready to execute code with proper output. What does matrix multiplication mean? Here's a few common intuitions: 1) Matrix multiplication scales/rotates/skews a geometric plane. 2 Linear Substitutions and Matrix Multiplication Or we can use equations (1) and (4) to go by way of x, u = Ax = A(Ep) = (AE)p We therefore conclude, without doing any real work, that AE = DC, that is,. Matrix Arithmetics under NumPy and Python. Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Matrix multiplication in C. On this page you can see many examples of matrix multiplication. Let's see it with an example where you are trying to multiply a 3X3 matrix with a 3X2 matrix. Matrix Multiplication. Posts about Matrix Multiplication written by Sean. by Marco Taboga, PhD. ©M F2 n0M1p2o XKKuUtHaw qS xo xfFtKwxa OrKeD aLNLiC M. The problem is not actually to perform the multiplications, but merely to decide in which order to perform the multiplications. The multiplication of a matrix A by a matrix B to yield a matrix C is defined only when the number of columns of the first matrix A equals the number of rows of the second matrix B. This is a matrix multiplication utility I developed as a part of my project work at college. 1 Matrix Addition and Scalar Multiplication 175 According to the labeling convention, the entries of the matrix A above are A = a 11 a 12 a 13 a 21 a 22 a 23 In general, the m ×n matrix A has its entries labeled as follows:. Following normal matrix multiplication rules, a (n x 1) vector is expected, but I simply cannot find any. Synonyms for matrix multiplication in Free Thesaurus. •We provide a new hybrid parallel algorithm for shared-memory fast matrix multiplication. How to perform scalar matrix multiplication in C programming. Device Memories and Matrix Multiplication 1 Device Memories global, constant, and shared memories CUDA variable type qualiﬁers 2 Matrix Multiplication an application of tiling. matrices are equal when each corresponding element is equal. Good question! The main reason why matrix multiplication is defined in a somewhat tricky way is to make matrices represent linear transformations in a natural way. X D dM2aVd6eg tw wiTt Qhi BIqn Vfji on aift7e o iA Slig YeRb ArWad U2z. Matrix Multiply, Power Calculator Solve matrix multiply and power operations step-by-step. JAMA is a basic linear algebra package for Java. We 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. C Program example of Matrix Chain multiplication. This article comprises matrix multiplication program written in python with Sample Input and Sample Output. Free matrix calculator - solve matrix operations and functions step-by-step. Matrix multipli. Abstract: We implement a promising algorithm for sparse-matrix sparse-vector multiplication (SpMSpV) on the GPU. Matrix multiplication is the most expensive operation involved Number of computations to be performed for matrix multiplication with Givens matrix for ith column: 6(n - i + 1). MulT() with w as 0 //fbx sdk forced w to 1 and then multiplied Then I gave up and just manually zeroed out the matrix's T. Lecture2 MatrixOperations • transpose, sum & diﬀerence, scalar multiplication • matrix multiplication, matrix-vector product • matrix inverse. The current matrix is determined by the current matrix mode (see glMatrixMode). Moreover, it computes the power of a square matrix, with applications to the Markov chains computations. Write a C program to read elements in a matrix and perform scalar multiplication of matrix. Today, we take a step back from finance to introduce a couple of essential topics, which will help us to write more advanced (and efficient!) programs in the future. Matrix multiplication has significant application in the areas of graph theory, numerical algorithms, signal. It is important to realize that you can use "dot" for both left ‐ and right ‐ multiplication of vectors by matrices. Before you can even attempt to perform matrix multiplication, you must be sure that the last dimension of the first matrix is the same as the first dimension of the second matrix. Multiply two matrices together. Inverse circular dichroism (CD) spectra are presented for each of the five major secondary structures of proteins: alpha-helix, antiparallel and parallel beta-sheet, beta-turn, and other (random) structures. If we grab a matrix from a previous section, this can be easily explained. Chapter 1 Matrix Multiplication 1. Graphing calculators such as the TI83 and TI84 are able to do many different operations with matrices, including multiplication. If either argument is N-D, N > 2, it is treated as a stack of matrices residing in the last two indexes and broadcast accordingly. its determinant. Multiplication of a matrix by a scalar. Banded Matrix-Vector Multiplication. Matrix multiplication in C: We can add, subtract, multiply and divide 2 matrices. An output of 3 X 3 matrix multiplication C program: Download Matrix multiplication program. Random Synchronization Up: Experiments Previous: Double Loops. Banky Craig C. To multiply a row vector by a column vector, the row vector must have as many columns as the column vector has rows. 0 in the MinGW suite) would use the C11 standard by default, which I realised after I read the documentation. We can multiply a matrix with a number (also called a scalar). For some reason, the following brute force approach is faster by about 10%:. This exercise surprised me a little bit. multMatrixes that will. Use commas or spaces to separate values in one matrix row and semicolon or new line to separate different matrix rows. Apart from "Matrix Multiplication Worksheet Answers" i f you need any other stuff in math, please use our google custom search here. Now the way that us humans have defined matrix multiplication, it only works when we're multiplying our two matrices. Device Memories and Matrix Multiplication 1 Device Memories global, constant, and shared memories CUDA variable type qualiﬁers 2 Matrix Multiplication an application of tiling. Resources to help you Teach Matrix Multiplication Worksheet, Bell Work, Exit Quiz, Power Point, Guided Notes, and much more!. Non-square matrices do not have inverses. Take free online matrix multiplication classes to improve your skills and boost your performance in school. An online Matrix calculation. ppt Loading…. I ended that post by saying we would revisit parallel_for_each after introducing array and array_view. We say a matrix is m n if it has m rows and n columns. CUDA Programming Guide Version 1. The authors [9, 10] designed a hybrid matrix format, HYB (Hybrid of ELL and. Unlike the other two kinds of multiplication, the cross product is only deﬁned for three-dimensional vectors. An interactive matrix multiplication calculator for educational purposes. The transpose of a matrix is a new matrix whose rows are the columns of the original. facebook twitter linkedin pinterest. Is it true and under what conditions? ADD: Trying to recreate the answer in R, wh. multiply(a, b) or a * b. For some matrices A and B,wehaveAB =BA. Suppose you have two groups of vectors: $\{a_1, \dots, a_m\}$ and [math]\{b_1, \dots. 36 Strassen’s method until a predetermined cutoff size of the seven sub-matrices, af-ter which Winograd’s algorithm takes over. MATRIX_A: An array of INTEGER, REAL, COMPLEX, or LOGICAL type, with a rank of one or two. Compute answers using Wolfram's breakthrough technology & knowledgebase, relied on by millions of students & professionals. Learn vocabulary, terms, and more with flashcards, games, and other study tools. You can use fractions for example 1/3. The columns of the first matrix must be equal to the rows in the second matrix. There is a condition to u and v, namely that they are linearly independent. With no parentheses, the order of operations is left to right so A*B is calculated first, which forms a 500-by-500 matrix. Multiplication Factor appears in the Matrix Table for the new entrants at the entry level only and not for the existing employees. If your data is in column-major order, you can tell MPSMatrixMultiplication to transpose the matrix before doing the multiplication. In mathematics, matrix multiplication or matrix product is a binary operation that produces a matrix from two matrices with entries in a field, or, more generally, in a ring or even a semiring. Note: Matrices multiplication is possible only when the number of columns of first matrix is equal to the number of rows of second matrix. Ready to execute code with proper output. There is one slight problem, however. One way to look at it is that the result of matrix multiplication is a table of dot products for pairs of vectors making up the entries of each matrix. , a movie), is typically very sparse…. When working with matrices, we can perform a number of matrix operations including matrix multiplication. Now the matrix multiplication is a human-defined operation that just happens-- in fact all operations are-- that happen to have neat properties. Below is a program on Matrix Multiplication. Stormy Attaway, in Matlab (Second Edition), 2012. Douglasz April 23, 2001 Abstract: Routines callable from FORTRAN and C are described which implement matrix{matrix. Abstract: This paper presents a method to analyze the powers of a given trilinear form (a special kind of algebraic constructions also called a tensor) and obtain upper bounds on the asymptotic complexity of matrix multiplication. When multiplying matrices together, the dimensions of the matrices to be multiplied must be compatible. Matrix Multiplication in Java. Grey Ballard, Aydin Buluc, James Demmel, Laura Grigori, Benjamin Lipshitz, Oded Schwartz, Sivan Toledo Jul. matrix multiplication in c free download. October 12, 2002 MULTIPLICATION MATRIX The history of this matrix goes back to the ‘70’s when my wife and I operated an individual learning. We're considering element-wise multiplication versus matrix multiplication. Clusters use in many scientific. Multiplying matrices is a little more complex than the operations you've seen so far. Matrices can be multiplied by scalar constants in a similar manner to multiplying any number of variable by a scalar constant. \end{align*} Although it may look confusing at first, the process of matrix-vector multiplication is actually quite simple. Here you can perform matrix multiplication with complex numbers online for free. Matrix chain multiplication (or Matrix Chain Ordering Problem, MCOP) is an optimization problem that to find the most efficient way to multiply given sequence of matrices. We need to tag the map( ) function output with the position so the reduce( ) function can identify the components in the different vectors. This forum may not be the best place for a discussion of the many issues involved in performance number-crunching, but I'd very much appreciate comments, suggestions, etc. Compute answers using Wolfram's breakthrough technology & knowledgebase, relied on by millions of students & professionals. Original value ranges are included on the X-axis. Parallel matrix multiplication • Assume p is a perfect square • Each processor gets an n/√p × n/√p chunk of data • Organize processors into rows and columns. For example X = [[1, 2], [4, 5], [3, 6]] would represent a 3x2 matrix. Don't show me this again. , of a matrix. Matrix Multiplication --- Row and Column Picture. The Wolfram Language's matrix operations handle both numeric and symbolic matrices, automatically accessing large numbers of highly efficient algorithms. This tool for multiplying 3x3 matrices. Douglasz April 23, 2001 Abstract: Routines callable from FORTRAN and C are described which implement matrix{matrix. Shruti Kaushik. Multiplication without tiling. After matrix multiplication the prepended 1 is removed. Matrix Multiplication in Excel with the MMULT function You can multiply matrices in Excel thanks to the MMULT function. These properties include the associative property, distributive property, zero and identity matrix property, and the dimension property. The second matrix is Be and it is 3x18x2 and the third matrix is del matrix and its. This subprogram takes two matrices as parameters and returns their matrix product. Below are the common core standards dealing with basic multiplication. Matrices are frequently used in programming and are used to represent graph data structure, in solving a system of linear equations and have many other applications. This lecture introduces matrix multiplication, one of the basic algebraic operations that can be performed on matrices. Hi, I want to create a VI that performs matrix multiplication for two input matrices A and B. • Given some matrices to multiply, determine the best order to multiply them so you minimize the number of single element multiplications. A matrix is a rectangular array of numbers or other mathematical objects for which operations such as addition and multiplication are defined. multMatrixes that will. We need to check this condition while implementing code without ignoring. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Matrix multiplication. Numpy Matrix Multiplication - Hackr. Matrices to be multiplied do not need to be of the same order, by definition the number of columns of the first matrix must equal the number of rows of the second matrix, otherwise all row elements of the first matrix could not be multiplied by a. Sparse Matrix Multiplication on a Field-Programmable Gate Array A Major Qualifying Project Report submitted to the Faculty of the WORCESTER POLYTECHNIC INSTITUTE. CiteSeerX - Document Details (Isaac Councill, Lee Giles, Pradeep Teregowda): In this paper we present a SIMD algorithm for n n matrix multiplication on a hypercube of p processors, with time complexity of O( p =3 ), and 2 < 3. Many states have gone to a group of consistent key standards for each grade level. Scalar in which a single number is multiplied with every entry of a matrix ; Multiplication of an entire matrix by another entire matrix For the rest of the page, matrix multiplication will refer to this second category. The program follows a basic encryption algorithm that relies on mathematical properties of matrices, such as row operations, matrix multiplication, and invertible matrices. Given a sequence of matrices, find the most efficient way to multiply these matrices together. When multiplying matrices, we first need to ensure that the matrices have the same dimensions, which is the number of rows times the number of columns. In this paper, we show that novel fast matrix multiplication algorithms can significantly outperform vendor implementations of the classical algorithm and Strassen's fast algorithm on modest problem sizes and shapes. Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube. October 12, 2002 MULTIPLICATION MATRIX The history of this matrix goes back to the ‘70’s when my wife and I operated an individual learning. Matrix Multiplication. First let's make some data: # Make some data a = c(1,2,3) b = c(2,4,6) c = cbind(a,b) x = c(2,2,2) If we look at the output (c and x), we can see that c is a 3x2…. Study guide and practice problems on 'Matrix multiplication'. We want to define addition of matrices of the same size, and multiplication of certain "compatible" matrices. In this notebook, we'll be using Julia to investigate the efficiency of matrix multiplication algorithms. How to Multiply Matrices Faster. Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. In the interests of understanding the underlying properties of the images I’m using as stimuli, I’ve been trying to learn more about the matrix transformations commonly used for image compression and image manipulation. \end{align*} Although it may look confusing at first, the process of matrix-vector multiplication is actually quite simple. The size of the matrix, as a block, is defined by the number of Rows and the number of Columns. The applications of matrices often involve the multiplication of two matrices, which requires rules for combination of the elements of the matrices. Recent posts. Stormy Attaway, in Matlab (Second Edition), 2012. Matrix Multiplication in Excel with the MMULT function You can multiply matrices in Excel thanks to the MMULT function. To multiply two matrices in C++ Programming, first ask to the user to enter the two matrix, then start multiplying the two matrices and store the multiplication result inside any variable say sum and finally store the value of sum in the third matrix say mat3. Before to this you can check different types of arrays in java and get to know how to declare and define the arrays and also get practice with adding two matrices. In other words, To multiply an m×n matrix by an n×p matrix, the ns must be the same, and the result is an m×p matrix. split happened at only one matrix which requires zero multiplications). Parallel Sparse Matrix-Vector and Matrix-Transpose-Vector Multiplication Using Compressed Sparse Blocks Aydın Buluc¸∗ [email protected] You probably know what a matrix is already if you are interested in matrix multiplication. For math, science, nutrition, history. I have therefore written a matrix vector multiplication example that needs 13 seconds to run (5 seconds with. Doerr 2 the previous seating chart example use a 1 (or yes) if the seat is occupied and a 0 (or no ) if the seat is unoccupied. Here we discuss the properties in detail. A and B must either be the same size or have sizes that are compatible (for example, A is an M-by-N matrix and B is a scalar or 1-by-N row vector). Multiplication of a matrix by a scalar. A matrix is a rectangular array of numbers or other mathematical objects for which operations such as addition and multiplication are defined. Before we go much farther, if you don’t know how matrix multiplication works, then check out Khan Academy spend the 7 minutes, then work through an example or two and make sure you have the intuition of how it works. Using Doceri). As demonstrated above, in general AB ≠BA. 376 Coppersmith-Winograd (1990) n2. The efficiency of matrix multiplication is a popular research topic given that matrices compromise large data in computer applications and other fields of study. Multiplying matrices - examples. We will illustrate matrix multiplication or matrix product by the following example. Take free online matrix multiplication classes to improve your skills and boost your performance in school. I did not expect that gcc (GCC 6. The definition of matrix multiplication indicates a row-by-column multiplication, where the entries in the i th row of A are multiplied by the corresponding entries in the j th column of B and then adding the results. Springer LNCS, 1984. Python Matrix Multiplication Program - here you will learn how to multiply one matrix to another matrix and print the multiplication result of the third matrix in python. It is built deeply into the R language. Furthermore, you can apply matrix operations such as addition, subtraction, multiplication and division:. Matrix multiplication means multiplications of two different arrays, in excel we have an inbuilt function for matrix multiplication and it is MMULT function, it takes two arrays as an argument and returns the product of two arrays, given that both the arrays should have the same number of rows and the same number of columns. One question: Why is the column of the first (left-hand) matrix colored red, along with the row of the second (right-hand) matrix?. MATMUL can do this for a variety of matrix sizes, and for different arithmetics (real, complex, double precision, integer, even logical!). Multiplication of a matrix by another matrix. Important: We can only multiply matrices if the number of columns in the first matrix is the same as the number of rows in the second matrix. When multiplying matrices, we first need to ensure that the matrices have the same dimensions, which is the number of rows times the number of columns. Join GitHub today. Row 1 X Column 1 Row 1 X Column 1 Row 1 X Column 1 Row 1 X Column 2 Row 1 X Column 2 Row 1 X – A free PowerPoint PPT presentation (displayed as a Flash slide show) on PowerShow. Just type matrix elements and click the button. Here you can perform matrix multiplication with complex numbers online for free. Just like addition works only for matrices of the same size, there are conditions for when two matrices can be multiplied but in this case it is a little bit more complicated. With no parentheses, the order of operations is left to right so A*B is calculated first, which forms a 500-by-500 matrix. To do so, we are taking input from the user for row number, column number, first matrix elements and second matrix elements. If you want to try to multiply two matrices (x and y) by each other, you'll need to make sure that the number of columns in x is equal to the number of rows in y, otherwise the equation won't work properly. As an example you'll be able to solve a series of simultaneous linear equations using Mathcad’s. In recommendation systems, the user/item rating matrix, which shows the extent of how much a user likes an item (e. Matrix algebra for beginners, Part I matrices, determinants, inverses Jeremy Gunawardena Department of Systems Biology Harvard Medical School 200 Longwood Avenue, Cambridge, MA 02115, USA. Matrix multiplication is the "messy type" because you will need to follow a certain set of procedures in order to get it right. Matrix multiplication in C. Producing a single matrix by multiplying pair of matrices (may be 2D / 3D) is called as matrix multiplication which is the binary operation in mathematics. Here is how it works 1) 2-D arrays, it returns normal product 2) Dimensions > 2, the product is trea. The manual method of multiplication procedure involves a large number of calculations especially when it comes to higher order of matrices, whereas a program in C can carry out the operations with short, simple and understandable codes. Strassen’s Matrix Multiplication on GPUs Junjie Li Sanjay Ranka Sartaj Sahni fjl3, ranka, [email protected] The MMULT function returns the matrix product of two arrays. Just like numbers and equations, you are expected to be able to manipulate matrices and perform arithmetic on multiple numbers of matrices. ) This computation requires $3n^2$ operations, while the operation count for the full matrix product is $4n^3$. 2 in the most recent edition (6e) of Finite Mathematics and Section 4. Hi everyone I am new to this site and also new to programming world can anybody help me writing C code for matrix multiplication (without using pointers). Below are the common core standards dealing with basic multiplication. If both are vectors it will return the inner product. A matrix is just a two-dimensional group of numbers. He told me about the work of Jacques Philippe Marie Binet (born February 2 1786 in Rennes and died Mai 12 1856 in Paris), who seemed to be recognized as the first to derive the rule for multiplying matrices in 1812. Pupils use the interactive to create a matrix multiplication problem using vectors. Each element in the result matrix C is the sum of element-wise multiplication of a row from A and a column from B. One way to look at it is that the result of matrix multiplication is a table of dot products for pairs of vectors making up the entries of each matrix. Operation with Matrices in Linear Algebra. One question: Why is the column of the first (left-hand) matrix colored red, along with the row of the second (right-hand) matrix?. For example weather forecasting has to done in. An efficient k-way merge lies at the heart of finding a fast parallel SpMSpV algorithm. Matrix addition, multiplication, inversion, determinant and rank calculation, transposing, bringing to diagonal, triangular form, exponentiation, solving of systems of linear equations with solution steps. Asking why matrix multiplication isn't just componentwise multiplication is an excellent question: in fact, componentwise multiplication is in some sense the most "natural" generalization of real multiplication to matrices: it satisfies all of the axioms you would expect (associativity, commutativity, existence of identity and inverses (for matrices with no 0 entries), distributivity over. Matrix Multiply, Power Calculator Solve matrix multiply and power operations step-by-step. Matrix multiplication is likely to be a source of a headache when you fail to grasp conditions and motives behind them. , Determine the way the matrices are fully parenthesized. Matrix Chain multiplication and algorithmic solution. If both arguments are 2-D they are multiplied like conventional matrices. MATRIX_A: An array of INTEGER, REAL, COMPLEX, or LOGICAL type, with a rank of one or two. Compton LA, Johnson WC Jr. plain old numbers like 3, or -5. This VHDL project is aimed to develop and implement a synthesizable matrix multiplier core, which is able to perform matrix calculation for matrices with the size of 32x32. This algebra lesson explains how to do scalar multiplication - and explains what a scalar is. We will illustrate matrix multiplication or matrix product by the following example. Matrix Formulas. It doesn ’ t just give you the answer the way your calculator would, but will actually show you the "long hand" way to multiply two numbers. Learn: In this article, we will see how to perform matrix multiplication in python. The Wolfram Language's matrix operations handle both numeric and symbolic matrices, automatically accessing large numbers of highly efficient algorithms. But to multiply a matrix by another matrix we need to do the "dot product" of rows and columns what does that mean?. Lecture Notes CMSC 251 Lecture 26: Chain Matrix Multiplication (Thursday, April 30, 1998) Read: Section 16. Using this online calculator, you will receive a detailed step-by-step solution to your problem, which will help you understand the algorithm how do matrix multiplication. Please upload a file larger than 100x100 pixels; We are experiencing some problems, please try again. Linear Algebra¶. Related Posts. Hoare (quoted by Donald Knuth). 3x3 Matrix Multiplication Calculator. Matrix Multiplication,definition,2 D array in C,Multidimensional array in C,Syntax,Syntax Example,Matrix Multiplication 2 D (dimensional) or Multidimensional Array Example Program In C. However, even when matrix multiplication is possible in both directions, results may be different. In mathematics, scalar multiplication is one of the basic operations defining a vector space in linear algebra (or more generally, a module in abstract algebra). This matrix multiplication calculator help you understand how to do matrix multiplication. Multiplication without tiling. Here’s a fact that has been rediscovered many times in many different contexts: The way you parenthesize matrix products can greatly change the time it takes to compute the product. Matrix Multiplication using arrays is very basic practice to learn for beginners to understand the concept of multidimensional matrix. Matrix multiplication is likely to be a source of a headache when you fail to grasp conditions and motives behind them. The matrix A is an n x m matrix and matrix B is an m x p matrix. Each element in the result matrix C is the sum of element-wise multiplication of a row from A and a column from B. The behavior depends on the arguments in the following way. Study guide and practice problems on 'Matrix multiplication'.


# Uniqueness of unitarily upper triangular matrix

Suppose A is a matrix in $\mathbb{C}^{n\times n}$ with n distinct eigenvalues $\lambda_1,\dots,\lambda_n$. Then by Schur's theorem, for any fixed order of $\lambda_1,\dots,\lambda_n$, we know there exists an unitary matrix $U$ s.t. $U^*AU$ is an upper triangular matrix with $\lambda_1,\dots,\lambda_n$ of required order on the diagonal. The question is is $U$ unique? If not, what freedom do we have to choose U?

I know how to solve $A$ is unitarily diagonal (not unitarily upper triangular), then $U^*AU=\,\text{diag}(\lambda_i)\iff AU=U\,\text{diag}(\lambda_i)=[\lambda_1U_1,\dots,\lambda_nU_n]$. Then ith column of $U$ must be an eigenvector of $\lambda_i$ and $|U_i|=1$. Therefore we can choose $U$ up to multiplying a diagonal matrix whose diagonal entries have norm 1. But this method seems not fit the unitarily upper triangular case.

Key fact: if $BT=TB$ and $T$ is upper triangular with distinct diagonal entries, then $B$ is upper triangular (proof below). Now, if $$UTU^*=VTV^*,$$ then $V^*UT=TV^*U$. So $V^*U$ is an upper triangular unitary. As such, it is diagonal. Thus, $V$ is of the form $DU$ with $D$ diagonal and $|D_{kk}|=1$. In other words, the situation you observed for diagonal $A$ still occurs in general (it is essential that the diagonal entries are distinct).
Proof that $TB=BT$ implies $B$ diagonal. Consider the $n,1$ entry: $$(TB)_{n1}=\sum_kT_{nk}B_{k1}=T_{nn}B_{n1},$$ while $$(BT)_{n1}=\sum_kB_{nk}T_{k1}=B_{n1}T_{11}.$$ As $T_{11}\ne T_{nn}$, we deduce that $B_{n1}=0$. Now consider the $n,2$ entry: $$(TB)_{n2}=\sum_kT_{nk}B_{k2}=T_{nn}B_{n2},$$ while $$(BT)_{n2}=\sum_kB_{nk}T_{k2}=B_{n1}T_{12}+B_{n2}T_{22}=B_{n2}T_{22}.$$ As $T_{22}\ne T_{nn}$, we get that $B_{n2}=0$. Continuing inductively, after showing that $B_{n1},\ldots,B_{nr}=0$, we have $$(TB)_{n,r+1}=\sum_kT_{nk}B_{k,r+1}=T_{nn}B_{n,r+1},$$ while $$(BT)_{n,r+1}=\sum_kB_{nk}T_{k,r+1}=\sum_{k=1}^{r+1}B_{nk}T_{k,r+1}=B_{n,r+1}T_{r+1,r+1}.$$ As $T_{r+1,r+1}\ne T_{nn}$, we get that $B_{n,r+1}=0$. Now start doing the same with the $n-1,1$ entry, then $n-1,2$, etc.


# Show that $\sum^\infty_{k=0} \frac{2(-1)^k}{(2k+1)\pi\cosh[(2k+1)\pi/2]}=1/4$

Title says it all.

Well, maybe some backstory.

Flipping through my past notebooks, I found this:

$$\vdots$$ $$= \sum^\infty_{k=0} \frac{2(-1)^k}{(2k+1)\pi\cosh[(2k+1)\pi/2]}\\=\frac14\quad(?)$$

[end of page]

Ah, yes. My engineering numerical analysis professor gave me one homework problem:

Make a contour plot of the steady-state temperature distribution of a square plate, with the temperature of one of its side maintained at $1$ unit, the other three sides maintained at $0$ units.

Steady-state temperature distribution $T$ follows $\nabla^2T=0$.

I was calculating the temperature of the center of the plate analytically to sanity-check my program output, when I encountered this weird-looking sum. I remember I made a spreadsheet to numerically evaluate the sum, and Excel said 0.2500000... So I jot down $\frac14$ with a question mark beside it. The next page is filled with my fruitless attempts to find out the exact sum, to convince myself that the sum is exactly $1/4$.

I posted a bounty on my social media accounts, whoever can show the proof (or disproof) gets free beer.

After a few days, the bounty was still unclaimed, but I realized, "duuuuuhhhh! I could just exploit the symmetry. If I rotate the plate $90^\circ$ three times and superpose all the temperature distribution with the original one, temperature is $1$ unit everywhere. By linearity and symmetry, the temperature of the center point is therefore $1/4$."

I treated myself a few rounds of beer, and moved on. Case closed.

Looking again at this, I now realize that I might be missing out on some summation tactics I never knew.

Anybody can show me how is this equal to $1/4$ just by algebraic manipulation?

• +1 for the story, +1 more for the solution, and +1 even more for trying to learn greater things. – Simply Beautiful Art Jan 12 '17 at 23:22
• The residue theorem might come in useful. – Michael M Jan 13 '17 at 0:23
• Thanks for the suggestion and the upvote. Probably will take me a while to work that out, as I never took a course in analysis. But now I realize that math is wonderful, there are always more beautiful things to learn. – f1garo Jan 13 '17 at 1:25
• – Math-fun Jan 13 '17 at 9:49

I am busy as hell today but this is such a nice problem (and amusingly posed question) i can't resist... :)

The key idea here is simple: Look for a function in the complex plane $f(z)$ which has poles at the correct values $z_n$ and integrate it over an appropriate contour $C$.

It turns out that the function (which is also the simplest guess i can imagine)

$$f(z)=\frac{1}{z \cos(z)\cosh(z)}$$

is the correct choice. Its poles are given by $z_0=0$, $z_k=\frac{(2 k-1)\pi}{2}$ and $\tilde{z}_k=i \frac{(2 k-1)\pi}{2}$ with $k \in \mathbb{Z/0}$. We furthermore have

$$\text{res}(z_0)=1 \\ \text{res}(z_k)=\text{res}(\tilde{z}_k)=\frac{2}{\pi}\frac{(-1)^{k}}{(2k-1)\cosh\left(\pi\frac{2k-1}{2}\right)}\\ \text{res}(z_{-k})=\text{res}(z_k)$$

since $z\cos(z)\cosh(z)\sim |z| e^{a |z|}$ with $\Re(a)>0$ as $|z|\rightarrow\infty$ we can choose a big circle traversed anticlockwise with radius choosen such that we hit no pole of $f(z)$ as the integration contour $C$ (Thanks to @Dr. MV for rigorizing this point).

Then, we get by applying the residue theorem, we get in the limit of infinte radius

$$\oint_Cf(z)dz=2\pi i\text{res}(z_0)+4\pi i \sum_{k\geq1}\text{res}(z_k)+4\pi i\sum_{k\geq1}\text{res}(\tilde{z}_k)=0$$

or

$$8\pi i \sum_{k\geq1}\text{res}(z_k)=-2\pi i$$

which can be rewritten as (after shifting $k\rightarrow k+1$)

$$\sum_{k\geq0}\frac{2}{\pi}\frac{(-1)^{k}}{(2k+1)\cosh\left(\pi\frac{2k+1}{2}\right)}=\frac{1}{4}\\ \textbf{Q.E.D.}$$

To make things clearer, here is a sketch of the integration contour $\color{blue}{C}$ and the singularities $\color{red}{z_n}$

• (+1) This is extremely close to Ramanujan original argument, I'd say it is perfectly fine! – Jack D'Aurizio Jan 13 '17 at 12:51
• @JackD'Aurizio thanks! This is a relief...still wondering how this complicated sum can be derived with nearly zero effort – tired Jan 13 '17 at 12:53
• A big (+1). I was working on this last night, had identified $f(z)$ and then floundered to find a suitable contour. Now, I feel stupid. Well done my friend! -Mark – Mark Viola Jan 13 '17 at 14:42
• I was trying to isolate the poles on the real axis by taking a rectangular contour in hopes that the top and bottom halves would cancel. They didn't. I even recognized the symmetry between the residues on real and imaginary axes. For some reason (it was getting late and I was tiring) I just couldn't see the obvious "big circle" contour was the way forward. One note; we must take the limit with discrete radii to ensure the contour doesn't hit a pole. – Mark Viola Jan 13 '17 at 14:55
• In general, the function $\pi \sec(\pi z) f(z)$ can be used to evaluate infinite sums of the form $\sum_{n \in \mathbb{Z}} (-1)^n f(n+1/2)$, while the function $\pi \tan(\pi z) f(z)$ can be used to evaluate infinite sums of the form $\sum_{n \in \mathbb{Z}} f(n+1/2)$. In some cases, of course, the contour integral won't vanish in the limit. – Random Variable Jan 13 '17 at 19:56

As mentioned by Zucker in The summation of series of hyperbolic functions, in Question 358, J. Indian Math. Soc., 4 (1912), p. 78. Ramanujan proves (through the residue theorem) that $$\sum_{n\geq 1}(-1)^{n+1}(2n-1)^{4m-1}\,\text{sech}\left[(2n-1)\frac{\pi}{2}\right] = 0$$ holds for every $m\geq 0$. Your identity then follows from the $m=0$ case.

It is truly remarkable to know that such identity can be proved through Dirichlet's problem about the eigenvalues of the Laplacian operator. Can you be more specific about the relation between such a series and the physical problem?$^{(0)}$ A brilliant piece of math might arise from there.

$^{(0)}$Update: I found the connection - such series are related with the Green function of a square.

I will show an interesting technique for deriving a similar identity.

From the Weierstrass product $$\cosh(\pi x/2) = \prod_{m\geq 0}\left(1+\frac{z^2}{(2m+1)^2}\right)\tag{1}$$ by applying $\frac{d^2}{dz^2}\log(\cdot)$ to both sides we get: $$\frac{\pi^2}{8\cosh^2(\pi x/2)}=\sum_{m\geq 0}\frac{(2m+1)^2-z^2}{((2m+1)^2+z^2)}\tag{2}$$ If we replace $z$ with $(2n+1)$ and sum over $n\geq 0$, $$\sum_{n\geq 0}\frac{\pi^2}{8\cosh^2(\pi(2n+1)/2)} = \sum_{n\geq 0}\sum_{m\geq 0}\frac{(2m+1)^2-(2n+1)^2}{((2m+1)^2+(2n+1)^2)^2} \tag{3}$$ where the RHS of $(3)$ can also be written as $$\sum_{n\geq 0}\sum_{m\geq 0}\int_{0}^{+\infty}\cos((2n+1)x)x e^{-(2m+1)x}\,dx = \sum_{n\geq 0}\int_{0}^{+\infty}\frac{x\cos((2n+1)x)}{2\sinh(x)}\,dx\tag{4}$$ or, by exploiting integration by parts, $$\sum_{n\geq 0}\int_{0}^{+\infty}\frac{x\cosh(x)-\sinh(x)}{2\sinh(x)}\cdot\frac{\sin((2n+1)x)}{2n+1}\,dx\tag{5}$$ On the other hand, $\sum_{n\geq 0}\frac{\sin((2n+1)x)}{2n+1}$ is the Fourier series of a $2\pi$-periodic rectangle wave that equals $\frac{\pi}{4}$ over $(0,\pi)$ and $-\frac{\pi}{4}$ over $(\pi,2\pi)$. That implies, by massive cancellation: $$\sum_{n\geq 0}\frac{1}{\cosh^2(\pi(2n+1)/2)}=\frac{1}{2\pi}.\tag{6}$$ On the other hand, the Fourier transform of $\frac{1}{\cosh^2(\pi x)}$ is given by by $\frac{s\sqrt{8\pi}}{\sinh(\pi s)}$.
By Poisson's summation formula, $$\sum_{n\geq 1}\frac{(-1)^{n+1}n}{\sinh(\pi n)}=\frac{1}{4\pi}.\tag{7}$$

• Hey Jack, since i can't read the source you mentioned, could you please check if their derivation fits my approach? i'm quiet unsure if i made no big mistake here (it seems to easy to be true). thanks! – tired Jan 13 '17 at 12:38
• For the pyhsical background you might be interested in this presentation: cedricthieulot.net/diva/05.pdf. The symmetry considerations mentioned by op are essentially saying that: By superposition, adding four plates with one side on a different temperature then the other three (and center temperature given by the complicated sum $S$) gives one plate with constant temperature with core temerature is trivially one. From this $S=1/4$ follows directly – tired Jan 13 '17 at 13:03
• It looks like my predictions were true: sciencedirect.com/science/article/pii/S0955799706000683 – Jack D'Aurizio Jan 13 '17 at 13:12
• @tired: thank you. I always find very pleasing to work on some problem with you. – Jack D'Aurizio Jan 13 '17 at 13:13
• D'Aurizo Yeah, this is a nice proof of concept that physicists and mathematicans CAN work together ;-) – tired Jan 13 '17 at 13:17


The graph of the function y = ax² + bx + c has a turning point at (-3,2) and passes through the point (0,5). Determine the values of a, b and c.

I know this is only a basic question, but I really would appreciate your help.

Thanks

2. $y = ax^2 + bx + c = x^2 + \frac{b}{a}x + \frac{c}{a}$

$= x^2 + \frac{b}{a}x + \frac{b^2}{4a^2} + \frac{4ac- b^2}{4a^2} = \left({x +\frac{b}{2a}}\right)^2 + \frac{4ac- b^2}{4a^2}$

so, the turning point is at $\left({-\frac{b}{2a}, \frac{4ac-b^2}{4a^2}}\right)$

plug in and you will have 2 equations..

for the third equation:
note:
a point $(x_0,y_0)$ is on the curve $y = ax^2 + bx + c$ if and only if $y_0 = ax_0^2 + bx_0 + c$..

3. Originally Posted by tim_mannire
The graph of the function y = ax² + bx + c has a turning point at (-3,2) and passes through the point (0,5). Determine the values of a, b and c.

I know this is only a basic question, but I really would appreciate your help.

Thanks
This aproach should give you the same answer but you will only have to solve a symoltaneous equation in two variables.

You want the equation to pass through (0,5) so substitute x=0, y=5 into the equation to get y = 5 = c

You want the equation to pass through (-3,2) so substitute x=-3, y=2 into the equation to get $2 = 9*a-3b+5$

Then by knowing that at the turning point the differential of y with respect to x is zero you can write:

$y'=0=2*a*x + b$

You have two equations in two variables which can be solved by symoltaneous equations.

4. ## Here it is

y=ax^2+bx+c
since it passes through (0,5) this eq must satisfy it. So putting the values in the eq we get 5=a(0)^2+b(0)+c.which gives us c=5.
Now at turning point x=-b/2a
(if u wanna know why is it that so u may ask it in a new thread).since turning point is (-3,2) therefor x=-b/2a=-3 or b=6a. Substituting this value in eq we get y=ax^2+6ax+5 now substituting (-3,2) we get 2=9a-18a+5 or a=1/3 since b=6a therfor b=2.so finaly a=1/3,b=2,c=5

5. Originally Posted by tim_mannire
The graph of the function y = ax² + bx + c has a turning point at (-3,2) and passes through the point (0,5). Determine the values of a, b and c.

I would really appreciate any help on this problem, thanks.
First use the turning point form y = a (x - h)^2 + k. Obviously h = 0, k = 5. Substitute (-3, 2) to get a.

Now expand the turning point form to get the standard form.

Edit: Don't double post! It wastes peoples time! http://www.mathhelpforum.com/math-he...nt-thanks.html

6. Originally Posted by tim_mannire
The graph of the function y = ax² + bx + c has a turning point at (-3,2) and passes through the point (0,5). Determine the values of a, b and c.

I would really appreciate any help on this problem, thanks.
Use the following formula:

$y = a(x - p)^2 + q$

$y = a(x + 3)^2 + 2$

Passes through the point $(0;5)$

$5 = a(0 + 3)^2 + 2$

$3 = 9a$

$a = \frac{1}{3}$

$y = \frac{1}{3} (x+3)^2 + 2$

EDIT: Oops Mr F beat me to it... by 2 mins

7. Originally Posted by nikhil
y=ax^2+bx+c
since it passes through (0,5) this eq must satisfy it. So putting the values in the eq we get 5=a(0)^2+b(0)+c.which gives us c=5.
Now at turning point x=-b/2a
(if u wanna know why is it that so u may ask it in a new thread).since turning point is (-3,2) therefor x=-b/2a=-3 or b=6a. Substituting this value in eq we get y=ax^2+6ax+5 now substituting (-3,2) we get 2=9a-18a+5 or a=1/3 since b=6a therfor b=2.so finaly a=1/3,b=2,c=5

Thank you very much. very well answered. much appreciated!


# College Board Problem: Conservation of Momentum -> Conservation of Energy in a Spring

In my AP Physics C class today, we ran into a problem written by College Board whose answer we disputed. The problem is as such :

A block of mass $$M=5.0 \ \mathrm{kg}$$ is hanging at equilibrium from an ideal spring with spring constant $$k=250 \ \mathrm{N/m}$$.An identical block is launched up into the first block. The new block is moving with a speed of $$v=5.0 \ \mathrm{m/s}$$ when it collides with and sticks to the original block. Calculate the maximum compression of the spring after the collision of the two blocks.

According to the College Board answer key, the answer is $$0.5 \ \mathrm{m}$$ :

$$p_1=p_2$$

$$Mv_0=(M+M)v_2$$

$$v_2=\frac{1}{2}v_0= \left (\frac{1}{2} \right)\left (5.0 \frac{m}{s}\right)$$

$$v_2=2.5 \frac{m}{s}$$

$$K_1 + U_1=K_2+U_2$$

$$\frac{1}{2}mv_1^2 +0=0+\frac{1}{2}kx_2^2$$

$$x_2=\sqrt{\frac{m}{k}}v_1= \sqrt{\frac{(10 \ \mathrm{kg)}}{\left(250 \frac{N}{m}\right)}} \left(2.5 \frac{m}{n}\right)$$

$$x_2=0.50 \ \mathrm{m}=50 \ \mathrm{cm}$$

However, half of us disputed this during class. We argued that, yes, $$U_2$$ includes $$\frac{1}{2}kx^2$$, but it also includes gravitational potential energy at the maximum compression (that is, when it compresses $$x$$ meters from equilibrium, the mass $$M$$ is $$x$$ meters higher above ground). Thus $$K_1+U_1=K_2+U_2$$ is $$\frac{1}{2}mv^2+0=0+\frac{1}{2}kx^2+mgx$$. When $$mgx$$ is included, $$x$$ is $$0.24 \ \mathrm{m}$$, not $$0.5 \ \mathrm{m}$$.

My physics teacher reluctantly agreed with College Board but could not give a solid explanation why. He said he would e-mail College Board, but in the meantime, I would very much appreciate any input from people who know the answer.

• I agree with your approach. It should be 2mgh since the mass rising is two blocks of 5 kg each.
– Dan
Dec 1, 2021 at 19:56
• Sorry I should have written that lol. When I plugged the numbers in and solved, I did make sure to plug in 10 kg (times 9.81 m/s/s times x). Dec 1, 2021 at 19:57
• Someone in class pointed out that perhaps because the question asks for MAXIMUM compression, they assume gravity does not exist. However, this still doesn't make sense. Assuming gravity does not exist (perhaps it is laid horizontally), the spring would have no elongation. When it is laid vertically, it elongates until the tension of the coil matches Mg. Thus, its equilibrium when horizontal (or simply without gravity) will be the length of the fully compressed spring. If the second block struck it elastically, the spring could not compress anymore. A compression of .5 meters is improbable. Dec 1, 2021 at 20:08
• Hello! It is preferable to type out screenshots or images of text; for formulae, one can use MathJax. Thanks! Dec 1, 2021 at 20:24
• Don't forget to include the initial elongation of the spring. Dec 1, 2021 at 20:36

I guess this is a homework/check-my-work problem, so by the letter of the law I should not answer, but I would argue there is broad interest in solving it correctly given that a supposedly reputable source is presenting an incorrect solution.

Here is how I would do this. Initially, the spring is stretched distance $$d=mg/k$$ below its equilibrium position. Choose the position of the hanging block as $$y=0$$, so the gravitational potential energy immediately after the collision is zero. In terms of the speed $$v=v_0/2$$ of the blocks after the collision and the mass $$m$$ of one block, the total energy immediately after the collision is \begin{align} E_i &= \frac{1}{2}(2m) v^2 + \frac{1}{2}kd^2\\ &= \frac{1}{4}mv_0^2 + \frac{1}{2}\frac{m^2g^2}{k}. \end{align} Let $$h$$ be the distance of the blocks above the equilibrium position of the spring when the blocks are at their maximum height. At this point, the blocks are at rest, so their total energy is \begin{align} E_f &= \frac{1}{2}kh^2 + 2mg(h + d)\\ &= \frac{1}{2}kh^2 + 2mgh + \frac{2m^2g^2}{k}. \end{align} Using conservation of energy, \begin{align} &\frac{1}{4}mv_0^2 + \frac{1}{2}\frac{m^2g^2}{k} = \frac{1}{2}kh^2 + mgh + \frac{2m^2g^2}{k}\\ \rightarrow &\frac{1}{2}kh^2 + 2mgh + \frac{3}{2}\frac{m^2g^2}{k} - \frac{1}{4}mv_0^2 = 0. \end{align} We can solve this quadratic equation for $$h$$ to obtain \begin{align} h = -\frac{2mg}{k} + \sqrt{\frac{m^2g^2}{k^2} + \frac{mv_0^2}{2k}}. \end{align} In terms of the given numbers, $$v_0 = 5.0\,\text{m}/\text{s}$$, $$m=5.0\,\text{kg}$$, and $$k=250\,\text{N}/\text{m}$$, we get $$\boxed{h=15\,\text{cm}.}$$

Note that if we set $$g=0$$ so that there is no gravity, we get \begin{align} h = \sqrt{\frac{mv_0^2}{2k}} = \boxed{50\,\text{cm}.} \end{align} We are left to conclude that the author of the solution was likely in free-fall at the time of its writing.

• h=15 cm? I got 0.1447. Is this the same thing? Also, how does your equation differ from the one my teacher and I made, which outputs 24 centimeters? Dec 2, 2021 at 17:23
• @SebastianPojman-Malo When I plugged the numbers into Mathematica, it spit out 14.5 something, and I rounded to two sig figs. In my answer, I'm taking into account the fact that the spring does not start at its equilibrium length.
– d_b
Dec 2, 2021 at 17:38
• That's interesting. College Board (and I) assume that it absolutely does hit the original block when the spring is at its equilibrium. Dec 2, 2021 at 17:45
• No, that is not correct. The hanging block is in equilibrium, which means the spring must be exerting an upward force on the block to keep it from falling under the influence of gravity. So the spring cannot be at its equilibrium length.
– d_b
Dec 2, 2021 at 18:54
• I agree with your h = .145 m. Note that that (h) is measured up from the un-stretched position of the spring and not from the point where the collision occurs. Dec 6, 2021 at 17:26

There is already a very good and complete answer from d_b, let me just add a comment to elucidate the possible (erroneous in this case) reasoning by which one could try to forget about gravity.

First, consider one block hanging from the spring in equilibrium. Assume that we provide it with the vertical speed $$v$$ without any other block sticking to it, so it moves up alone. What height above the initial position will it reach in such a case? Writing energy conservation (for detailed explanation look at d_b's answer, it is quite the same here - only I choose to measure height relative to the initial position of the block for reasons which will become clear shortly), we get:

$$\frac{m v^2}{2} + \frac{m^2 g^2}{2 k} = m g h + \frac{k (h-\frac{mg}{k})^2}{2}$$

Let us play a little with this equation. Open the square in the RHS and observe that $$mgh$$ cancels:

$$m g h + \frac{k (h-\frac{mg}{k})^2}{2} = mgh + \frac{k(h^2 + \frac{m^2g^2}{k^2} - \frac{2mgh}{k})}{2} = \frac{kh^2}{2} + \frac{m^2 g^2}{2k}$$

Plugging it back to the energy conservation, we observe that $$\frac{m^2 g^2}{2k}$$ cancels as well, and we are left with

$$\frac{m v^2}{2} = \frac{kh^2}{2}$$

In other words, it looks exactly like we could forget about gravity and initial elongation of the spring altogether: the answer is the same as it would have been for a horizontal spring. This is not a coincidence: what we have derived means that the total (gravitational+elastic) potential energy of this system is quadratic in deviation from the equilibrium, so it really looks like for a horizontal spring. One could also understand it graphically: potential energy of the spring is a parabola with the equilibrium position at the lowest point. If we also add gravity, a linear function is added to this parabola. The result is another parabola with the same shape but another minimum position - at the equilibrium point of the hanging block (equilibrium is always the minimum of total potential energy). If we measure all elongations compared to the new equilibrium, we could forget about both gravity and initial elongation: they compensate each other.

I think this might have been the logic of authors of the solution. However, this logic only works if we measure elongations compared to the position with minimal potential energy. If another block sticks to the first one, the equilibrium position is now shifted below, so the blocks start moving already from a non-equilibrium position and one needs to account for the potential energy of initial position as well - which was not done in the provided College Board solution. As an exercise I would suggest an interested reader to reproduce d_b's answer with this method of total potential taking the above consideration into account.

• "let me just add a comment to elucidate the possible (erroneous in this case) reasoning by which one could try to forget about gravity." Just for clarity, are you saying that College Board's ignoring gravity is erroneous? Or are you agreeing with College Board? Dec 2, 2021 at 17:31
• I disagree with the College Board answer and solution. In my answer I describe a method which they presumably used when solving the problem, but I point out that they forgot to account for the fact that equilibrium position of two blocks on a spring differs from the equilibrium position of one block. Dec 2, 2021 at 17:56
• Walk me through this. (Remember, I'm still in high school...) Does that mean that once the elastic collision happens and the identical block "sticks," the equilibrium position changes in that moment? Dec 2, 2021 at 18:00
• Firstly, if they stick, it is called an inelastic collision. Changing equilibrium position means that if one block of mass $m$ stretches the spring in equilibrium by $d$, two such blocks would stretch it by $2d$. So if in this problem we attached the second block to the first one without any velocity, they would move down to reach the new equilibrium position. To prevent confusion, let me stress that the word equilibrium here is used to describe a situation when all forces are balanced and nothing moves (not to be confused with the equilibrium length of the spring - when there are no forces). Dec 2, 2021 at 19:06
• How does conservation of momentum play into this? As I see it, (5kg)(5m/s)=(5+5kg)(v); v=2.5m/s. So according to the conservation of momentum, the two blocks stuck together will move at 2.5m/s immediately following the collision. That being said, they will decelerate because the force of gravity (2mg) will outpower the tension of the spring (mg) at that moment. Because of this, the equilibrium is disturbed, and the amount of compression is reduced. CB's answer assumes equilibrium is NOT disturbed and thus the blocks' velocity does not decelerate, right? Dec 2, 2021 at 20:27

With a 5 kg mass hanging at rest from the spring of constant k = 250 N/m, the stretch of the spring will be X = mg/k =5(9.8)/250 = 0.196 m. With (x) measured positive down from the un-stretched position, and gravitational potential energy chosen to be zero when x = 0, then the energy of the 10 kg mass is (1/2)(10)$$2.5^2$$ + (1/2)(250)$$0.196^2$$ - 10(9.8)(0.196) = (1/2)(250)$$x^2$$ -10(9.8)x. (x when v = 0) Or: 125$$x^2$$ - 98x – (31.25 +4.802 – 19.208) = 0. Solving gives x = - 0.145 m. (The other solution is for initial velocity downward). Since positive x was measured down, this negative x represents a compression of the spring above the unstretched position. Then the total rise is 0.196 + 0.145 = 0.341 m. For the record, if the moving mass is the same as the hanging mass: then mg = kX and (1/2)m$$v^2$$ + (1/2)k$$X^2$$ - (kX)X = (1/2)k$$x^2$$ - (kX)x. Or rearranged: (1/2)m$$v^2$$ = (1/2)k$$(X^2 – 2Xx + x^2) = (1/2)k(X-x)^2$$. Lets try ignoring gravity with x measured from a 10 kg hanging position (which is an additional 0.196m further down): (1/2)(10)$$2.5^2$$ + (1/2)(250)$$0.196^2$$ = (1/2)(250)$$x^2$$. Rearranging: 125$$x^2$$ = (31.25 + 4.802) Giving x = 0.537. With the starting position 0.196 m above the new equilibrium, this gives a rise of 0.341 m. The bottom line: A mass hanging from a spring defines a new equilibrium position. The kx measured from that position includes the force of gravity (but don't change the mass). Here is an alternative approach: With the stretch of the spring (x) measured positive down from the unstretched position, the net force on the hanging mass is: F = mg - kx Then dF = - k(dx). Integrating both sides gives F(x) - $$F_o$$ = -k(x - $$x_o$$). If starting from the new equilbrium then $$F_o$$ =0.

• Please consider using MathJax; in its current form this answer is mostly illegible.
– rob
Jan 23, 2022 at 13:55


# When to simplify a quadratic equation?

I had the following quadratic equation: $$38x^2 - 140x - 250 = 0$$ And before starting to solve it, I simplified it by dividing all terms by $2$: $$19x^2 -70x - 125 = 0$$ But when I solved it I got: $$x= \frac{35\pm5\sqrt{163}}{19}$$ which is not the exact solution for the original equation. So, I returned to that first equation and solved it. The roots are: $x=-\frac{25}{19}, 5$

Now my question is: How would I know when to simplify a quadratic equation before solving it? Is there something that shows me that I'm right to simplify or not?

Thank you for your help.

• You must have made an error because both those quadratics have the same roots, multiplying or dividing through by the same number doesn't change the roots – Triatticus Jun 15 '16 at 13:46
• @Triatticus: I checked with Wolfram alpha – Rafiq Jun 15 '16 at 13:47
• It should be $x=\frac{35\pm 60}{19}$, not $x=\frac{35\pm 5\sqrt{163}}{19}$. – user236182 Jun 15 '16 at 13:47
• your square root is wrong... $\sqrt{70^2+4.19.125}$ calculate again – Kushal Bhuyan Jun 15 '16 at 13:47
• I did too and got the same answers – Triatticus Jun 15 '16 at 13:48

You can always simplify a quadratic equation (by dividing out common numeric factors) before solving it. Simplifying like this is optional and is always a good idea because it generally gives you easier numbers to work with.

The error is not because you simplified, it's because there is a mistake somewhere in your work after that. I can't tell you where exactly without seeing your work, but here's how it should go:

\begin{align*} x &= \frac{70 \pm \sqrt{(-70)^2 - 4(19)(-125)}}{2(19)}\\[0.3cm] &= \frac{70 \pm \sqrt{4900 + 9500}}{38}\\[0.3cm] &= \frac{70 \pm \sqrt{14400}}{38} \\[0.3cm] &= \frac{70 \pm 120}{38} \end{align*}

When simplified you get $x = 5$ and $x = -25/19$.

When to simplifying a quadratic is up to you. Remember, multiplying both sides by a number retains the equality, the same thing with adding, subtracting and dividing.

You could've left it the way it is, without simplifying, and you would have gotten the solution as it doesn't affect the roots.

It is for last equation :$$x=\frac { 35\pm \sqrt { { 35 }^{ 2 }+125\cdot 19 } }{ 19 } =\frac { 35\pm \sqrt { 3600 } }{ 19 } =\frac { 35\pm 60 }{ 19 }$$

But using $\frac{\sqrt{b^2-4ac}}{2a}$ in the reduced equation gives the same roots .


# Prove the sequence $f_{n} = \frac{1}{n^2+1}$ is a Cauchy sequence.

Prove the sequence $$f_{n} = \frac{1}{n^2+1}$$ is a cauchy sequence.

I'm just making sure my logic and reasoning is sound for the above proof:

Definition of cauchy sequence: $$f_n$$ is Cauchy if for all $$Ɛ$$ there is an $$M \in \mathbb{N}$$ such that for all $$n,m > M, |f_n-f_m|<Ɛ$$

$$|f_n-f_m|$$=$$|\frac{1}{n^2+1}-\frac{1}{m^2+1}|$$

by the triangle inequality:

$$\le|\frac{1}{n^2+1}|+|\frac{1}{m^2+1}|$$

$$<\frac{1}{n}+\frac{1}{m}$$

To ensure $$\frac{1}{n}+\frac{1}{m}<Ɛ$$ it suffices to have:

$$max(\frac{1}{n}+\frac{1}{m}) < \frac{Ɛ}{2}$$, so we will take $$M(Ɛ) = \lceil\frac{2}{Ɛ}\rceil$$

Now for a formal proof:

Let $$Ɛ>0$$

Define $$M(Ɛ) = \lceil\frac{2}{Ɛ}\rceil$$

Let $$n,m > M(Ɛ)$$

$$n,m > \frac{2}{Ɛ}$$

$$\frac{1}{n}<\frac{Ɛ}{2}$$ and $$\frac{1}{m}<\frac{Ɛ}{2}$$

$$|f_n - f_m| \le \frac{1}{n}+\frac{1}{m}$$

$$|f_n - f_m| < \frac{Ɛ}{2}+\frac{Ɛ}{2} = Ɛ$$

Therefore $$f_n$$ is cauchy.

Solution to the proof

• Yes, your proof is fine. – Mark May 4 at 8:53
• Okay great, I was just checking as if you see in my question above, the solution was different. I thought my answer was too simple. – user11015000 May 4 at 8:55
• Please do not use pictures for critical portions of your post. Pictures may not be legible, cannot be searched and are not viewable to some, such as those who use screen readers. – GNUSupporter 8964民主女神 地下教會 May 4 at 15:31
• The proof before the red edit is fine. – DanielWainfleet May 4 at 18:52


# Approximating continuous functions with polynomials

Given $\epsilon \gt 0$ and $f \in C^{0}[0,1]$, Weierstrass says that I can find at least one (how many? probably a lot?) polynomial $P$ which approximates f uniformly: $$\sup_{x \in [0,1]} |f(x) - P(x)| \lt \epsilon$$

This means that, under the sup norm $||.||_{\infty}$, the polynomials are dense in $C^{0}[0,1]$. So, in analogy to approximating irrationals with the rationals, I would like to know:

• What can we say about the order of $P$? Or, turning this around, given that $P$ is of order $n$, how small can $\epsilon$ get?

I'm betting this should depend in some way on the properties of $f$: the intuition is that smoother functions should be somehow "better" approximated by lower-order polynomials, and less-well-behaved functions should require higher-order polynomials. But I am not sure how to formalize this.

This is probably all well-understood, but I'm not well-read on approximation theory. Any guidance would be wonderful.

-
All of the answers have been very helpful, thank you to everyone! –  AndrewG Jan 5 '13 at 19:58

According to Theorem 1.2 of this paper by Sukkrasanti and Lerdkasem, we have the following result (with impressively great generality, I might add):

Let $f: [0,1]^p \rightarrow \mathbb{R}^q$ be bounded. Then there exists $C$ such that $$\| f - B_n(f) \|_{\infty} \le C \omega(1/\sqrt{n})$$ where $\omega(\delta) := \sup_{\|t_1 - t_2\| \le \delta} \|f(t_1) - f(t_2)\|$ and $B_n(f)$ is the $n$th Bernstein polynomial of $f$.

I do not claim to have read the paper myself. Notice that if $f$ is indeed continuous, then by uniform continuity, as $n \rightarrow \infty$, $\omega(1/\sqrt{n})$ must go to zero. So the convergence rate is related to how rapidly $f$ can vary, as intuition would already suggest.

-

Define, $B_i^n(x)=\binom{n}{i}x^i(1-x)^{n-i}$, nice fact,

• Partition of the unity $\sum_{i=0}^{n}B_i^n(x)=1$ this is easy to see:

See $1= x+(1-x)$ then, $$1=(x+(1-x))^n=\sum_{i=0}^{n}\binom{n}{i}x^i(1-x)^{n-i}=\sum_{i=0}^{n}B_i^n(x).$$

Without loss of generality suppose $a=0$ and $b=1$. We need of the following estimative:

\begin{eqnarray*} \sum_{i=0}^{n}\left(x-\frac in\right)^{2}B_i^n(x)&=&x^2\sum_{i=0}^{n}B_i^n(x)-2x\sum_{i=0}^{n}\dfrac{i}{n}B_i^n(x)+\sum_{i=0}^{n}\left(\dfrac{i}{n}\right)^2 B_i^n(x)\\&=& x^2-2x^2+\dfrac{1}{n^2}\sum_{i=0}^{n}n(n-1)\dfrac{i^2-i +i}{n(n-1)} B_i^n(x)\\&=& -x^2+ \dfrac{1}{n}\sum_{i=0}^{n}\dfrac{i}{n}B_i^n(x)+\dfrac{n(n-1)}{n^2}\sum_{i=0}^{n}\dfrac{i(i-1)}{n(n-1)}B_i^n(x)\\&=& -x^2+\dfrac{x}{n}+\dfrac{n-1}{n}x^2\\&=& \dfrac{x-x^2}{n}\leqslant\dfrac{1}{4n}. \end{eqnarray*} Now, since $f$ is continuous we have that $f$ is uniformly continuous,because $[0,1]$ is compact. So for each $\epsilon$ exists $\delta>0$ such that for all $x,y\in [0.1]$ with $|x-y|<\delta$ implies $|f(x)-f(y)|<\epsilon$. Since $f$ have yours extreme extreme values in $[0,1]$ then exists a constant $M$ such that $|f(x)|\leqslant M$ for all $x\in[0,1].$

Consider the Berstein polynomial of $f$, $$P_n(x)=\sum_{i=0}^{n}f\left(\dfrac{i}{n}\right)B_i^n(x);$$ since $\displaystyle\sum_{i=0}^{n}B_i^n(x)=1$, we have $f(x)=\displaystyle\sum_{i=0}^{n}f(x)B_i^n(x)$ then,

\begin{eqnarray*} \left|f(x)-P_n(x)\right|&\leqslant& \sum_{i=0}^{n}\left|f(x)-f\left(\dfrac{i}{n}\right)\right|B_i^n(x)\\&=& \sum_{S_1}\left|f(x)-f\left(\dfrac{i}{n}\right)\right|B_i^n(x)+\sum_{S_2}\left|f(x)-f\left(\dfrac{i}{n}\right)\right|B_i^n(x) \end{eqnarray*}

where $S_1=\{0\leqslant i\leqslant n ~;~ |x-\frac{i}{n}|<\delta\}$ and $S_2=\{0\leqslant i\leqslant n~;~ |x-\frac{i}{n}|\geqslant \delta\}.$ analyzing each sum separately $$\sum_{S_1}\left|f(x)-f\left(\dfrac{i}{n}\right)\right|B_i^n(x)\leqslant \sum_{S_1}\epsilon|B_i^n(x)\leqslant \epsilon\sum_{i=0}^{n}B_i(x)=\epsilon$$

\begin{eqnarray*} \sum_{S_2}\left|f(x)-f\left(\dfrac{i}{n}\right)\right|B_i^n(x)&\leqslant& 2M\sum_{S_2}B_i^n(x)\leqslant \sum_{S_2}\dfrac{(x-\frac{i}{n})^2}{\delta^2}B_i^n(x)\\&\leqslant&\dfrac{2M}{\delta^2}\sum_{i=0}^{n}(x-\frac{i}{n})^2 B_i^n(x)\leqslant \dfrac{M}{2\delta^2 n} \end{eqnarray*}

since $\dfrac{M}{2\delta^2 n}<\epsilon$ for $n$ large, we demonstrate the desired.

-
Nice answer. By the way, what does "daí" mean? –  Antonio Vargas Jan 5 '13 at 16:50
@AntonioVargas: I'm sorry, is the habit of writing in portuguese daí=so or then –  user27456 Jan 5 '13 at 16:58
@EduardoSiva: Everything looks fine, except that you have not defined $B_{i}$. I suppose that it denotes a Bernstein polynomial, am I right? –  Haskell Curry Jan 5 '13 at 17:34
@HaskellCurry: I'll try to fix it –  user27456 Jan 5 '13 at 17:43

A near minimax approximation to a continuous function, say, $f:[-1,1]\to\mathbb{R}$, can be obtained with Chebyshev polynomials. You may look up the details in this book chapter, of which theorem 3.10 says that if $p$ is a Chebyshev interpolation polynomial for such continuous $f:[-1,1]\to\mathbb{R}$ at $n+1$ points, then $\|f-p\|\sim C\,\omega(\frac1n)\log n$ as $n\to\infty$, where the norm is the maximum norm, $\omega(\cdot)$ denotes the modulus of continuity and $C$ is a constant.

-

Since you tagged your question by "reference-request" I will give only them (instead of copying a lot). Jackson inequality ("direct theorem"), and Bernstein theorem ("converse theorem"). See also the references therein. (My humble opinion they are good quality books. Typing into Google these keywords you will obtain a lot of links, including many free downloadable lecture notes, maybe books.)

-


# Calculating work

1. Jul 10, 2009

### jeff1evesque

1. The problem statement, all variables and given/known data
Given the attached picture, Calculate the work required to go around the contour shown if the force is $$\vec{F} = y\hat{x} - x^{2} \hat{y}$$

First by Contour integration:
Work = $$\oint \vec{F} \bullet \vec{dl} = \int_{a}^{b} (\vec{F} \bullet \hat{x})dx + \int_{b}^{c} (\vec{F} \bullet \hat{y})dy - \int_{c}^{d} (\vec{F} \bullet \hat{x})dx - \int_{d}^{a} (\vec{F} \bullet \hat{y})dy$$

$$= \int_{1}^{2} (2) dx + \int_{2}^{3} (4)dy - \int_{2}^{1} (3)dx - \int_{3}^{2} (1)dy = 0$$

I think the answer above is suppose to be -4 not 0.

Now by Stokes Theorem:
When this was done with "Stokes theorem", we get the following:
Work = $$\oint \vec{F} \bullet \vec{dl} \equiv \int \int (\nabla \times \hat{F})\bullet \vec{ds} = - \int \int (2x + 1)( \hat{z} \bullet \hat{z})ds = \int_{2}^{3} \int_{1}^{2} (2x + 1)dxdy = -4$$
Note: $$( \hat{z} \bullet \hat{z}) = 1$$ since $$( \hat{z} \bullet \vec{ds}) = ds$$

Question:
When I look at this, Stokes method seems apparently correct, but the method before it seems wrong. Can someone help me find my error?

Thanks,

JL

#### Attached Files:

• ###### StokePic.bmp
File size:
297 KB
Views:
67
Last edited: Jul 10, 2009
2. Jul 11, 2009

### E_M_C

Your attachment is still pending approval, but if we're speaking of the work done around a closed path, it's certainly not zero. This is due to the fact that the force field is not conservative. While the force is position dependent (as is required by a conservative force), it's curl, $$\nabla \times F$$, is not the zero vector.

3. Jul 11, 2009

### HallsofIvy

Staff Emeritus
The contour is the square with corners at (1, 2), (2, 2), (2, 3), and (1, 3).

Why do you have minus signs on the last two integrals? Assuming that your contour goes from point a to point b, then to point c, then to point d, then back to point a, these should all be "+". (Although the integrals themselves might be 0.)

On the first leg, with x= t, y= 2, the integral is $\int_1^2 2 dx$ as you say. On the second leg, with x= 2, y= t, the integral is $\int_2^3 (-4) dt$. Did you forget the "-" on "$-x^2\vec{j}$"? On the third leg, with x= t, y= 3, the integral is $\int_2^1 3dt= -\int_1^2 3dt$. You have the wrong sign. On the fourth leg, with x= 1, y= t, the integral is $\int_3^2(-1) dt= \int_2^3 dt$. That is what you have, but, I think, because of two canceling sign errors!. Evaluating, the integral is 2- 4+ (-3)+ (1)= -4.

4. Jul 11, 2009

### jeff1evesque

Thanks Halls.


# Picking random numbers as long as they keep decreasing. Expected number of numbers you pick?

Pick a random number (evenly distributed) between $0$ and $1$. Continue picking random numbers as long as they keep decreasing; stop picking when you obtain a number that is greater than the previous one you picked. What is the expected number of numbers you pick?

-
One of my friend send me this question,& he sends me the ans.. – UnknownController Nov 24 '12 at 6:25
Please, try to make the title of your question more informative. E.g., Why does $a<b$ imply $a+c<b+c$? is much more useful for other users than A question about inequality. From How can I ask a good question?: Make your title as descriptive as possible. In many cases one can actually phrase the title as the question, at least in such a way so as to be comprehensible to an expert reader. – Julian Kuelshammer Nov 24 '12 at 6:41
@JulianKuelshammer thank you...next time I'll give more informative title.. – UnknownController Nov 24 '12 at 6:45

There're $n!$ ways of arranging $n$ numbers, supposing that there're $n$ picks, then the first $(n-1)$ picks are in descending order, there are $(n-1)$ ways of choosing the first $(n-1)$ numbers and thus the probability of picking just $n$ nimbers is $\cfrac {n-1}{n!}$ and the expected value is $$E=\sum^{\infty}_{n=2} n\cdot\cfrac {n-1}{n!}= \sum^{\infty}_{n=2} \cfrac {1}{(n-2)!}=\sum^{\infty}_{n=0} \cfrac {1}{n!}=e=2.718281828459...$$

-
thank you my friend for tried to help,I just post ans. in comment see that :) – UnknownController Nov 24 '12 at 6:27

The following solutions uses indicator random variables.

Fix an $n$, and imagine doing the experiment only $n$ times. For $i\le n$, let $X_j=1$ if $X_1\gt X_2 \gt \cdots >X_j$, and let $X_j=0$ otherwise. Then $\Pr(X_j=1)=\frac{1}{j!}$ and therefore $E(X_j)=\frac{1}{j!}$.

If $Y_n$ is the length of the longest monotone decreasing sequence that starts with the first number chosen the beginning, then $Y_n=X_1 +X_2+\cdots +X_n$. Thus, by the linearity of expectation, $$E(Y_n)=E(X_1)+E(X_2)+E(X_3)+\cdots+E(X_n)= 1+\frac{1}{2!}+\frac{1}{3!}+\cdots +\frac{1}{n!}.$$ As $n\to \infty$, this approaches $e-1$.

But your random variable counts all the picks up to and including the first pick that breaks the monotonicity. So your random variable has expectation $(e-1)+1=e$.

-


# Evaluating $\int\frac{x^2+1}{(x^2-2x+2)^2}dx$ - Section 7.3, #28 in Stewart Calculus 8th Ed.

I'd like to evaluate $$I=\int\frac{x^2+1}{(x^2-2x+2)^2}dx.$$

According to WolframAlpha, the answer is $$\frac{1}{2}\bigg(\frac{x-3}{x^2-2x+2}-3\tan^{-1}(1-x)\bigg)+C.$$

To ensure that my answer is correct, I'd like to match it with this answer.

First I complete the square by writing the denominator as $((x-1)^2+1)^2$, then use a trig-sub $x-1=\tan\theta$ so $dx=\sec^2\theta d\theta.$

Then $$I=\int\frac{(\tan\theta +1)^2+1}{\sec^4\theta}\sec^2\theta d\theta\\=\int\frac{\tan^2\theta+2\tan\theta+2}{\sec^2\theta}d\theta\\=\int\sin^2\theta +2\sin\theta\cos\theta+2\cos^2\theta d\theta\\=\int\bigg(\frac{1}{2}-\frac{\cos(2\theta)}{2}\bigg)+\sin(2\theta)+(1+\cos(2\theta))d\theta\\=\int\frac{3}{2}+\frac{\cos(2\theta)}{2}+\sin(2\theta)d\theta\\=\frac{3\theta}{2}+\frac{\sin(2\theta)}{4}-\frac{\cos(2\theta)}{2}+C\\=\frac{3\theta}{2}+\frac{\sin\theta \cos\theta}{2}-\frac{1-2\sin^2\theta}{2}+C.$$

Here's a picture corresponding to my trig-sub.

From the picture, I conclude $$I=\frac{3\tan^{-1}(x-1)}{2}+\frac{1}{2}\frac{x-1}{\sqrt{x^2-2x+2}}\frac{1}{\sqrt{x^2-2x+2}}- \frac{1-2\frac{(x-1)^2}{x^2-2x+2}}{2}+C\\=\frac{-3\tan^{-1}(1-x)}{2}+\frac{x-1}{2(x^2-2x+2)}-\frac{1}{2}+\frac{(x-1)^2}{x^2-2x+2}+C.$$

Although the $\arctan$ portion of the answer matches Wolfram, the remaining portion does not (since there is a square in the numerator after finding a common denominator). Where am I making the mistake?

I've also tried using the identity $\cos(2\theta)= 2\cos^2\theta-1$ instead of $\cos(2\theta)= 1-2\sin^2\theta$, but the same issue occurs.

Your work is correct; the only difference between your antiderivative and the one calculated by WolframAlpha is a constant of integration, $1/2$. You may verify that $$\frac{(x-1)^2}{x^2-2 x+2}+\frac{x-1}{2 \left(x^2-2 x+2\right)}-\frac{1}{2} = \frac{x^2-x-1}{2 \left(x^2-2 x+2\right)},$$ and it follows that $$\frac{x^2-x-1}{2 \left(x^2-2 x+2\right)}-\frac{x-3}{2 \left(x^2-2 x+2\right)} = \frac{1}{2}.$$


# Combinatorial explanation to following recurrence relation $a_n = 2 a_{n-1} + a_{n-2}$

Question was the following:

$a_n$ is the number of ternary strings (strings of 0,1,2) which contain no consecutive zeros and no consecutive ones. Find a formula for $a_n$?

By brute force, I found a recurrence relation for $a_n$ as the following:

$a_n = 2 a_{n-1} + a_{n-2}$

Now I am wondering if there is a good combinatorial explanation/proof to my recurrence relation. Can you see something?

Best Regards

-
Terminological note: those are ternary strings, not turning strings. –  Brian M. Scott Apr 8 '13 at 20:00
@BrianM.Scott thank you for correction –  Xentius Apr 8 '13 at 20:02

Let $b_{i,n}$ be the number of strings of length $n$ starting with $i\in\{0,1,2\}$. Then by your rules $$a_n = b_{0,n} + b_{1,n} + b_{2,n} = (b_{1,n-1} + b_{2,n-1}) + (b_{0,n-1} + b_{2,n-1}) + a_{n-1} = 2a_{n-1} + a_{n-2}.$$

ADDITION: This transformation can be translated into a proof by bijection. Let $X_n$ be the set of all sequences of length $n$. We define a map $$(X_{n-1} \times \{A,B\}) \cup X_{n-2} \quad\to\quad X_{n}$$ by ("$\cdot$" denotes concatenation; $\mu$ a sequence in $X_{n-2}$ and $\lambda$ a sequence in $X_{n-1}$):

$(\lambda,A) \mapsto 2\cdot\lambda$

$(\lambda,B)\mapsto\begin{cases} 1\cdot \lambda & \text{if }\lambda\text{ starts with }0\text{ or }2\\ 0\cdot \lambda & \text{if }\lambda\text{ starts with }1 \end{cases}$

$\mu \mapsto 0\cdot 2\cdot \mu$

This is a bijection, essentially because $(\lambda,A)$ gives all strings in $X_n$ starting with $2$, $(\lambda,B)$ gives all strings in $X_n$ starting with $10$, $01$ or $12$, and $\mu$ gives all strings starting with $02$. So $$\left|(X_{n-1} \times \{A,B\}) \cup X_{n-2}\right| = \left|X_n\right|,$$ which is $$2a_{n-1} + a_{n-2} = a_n.$$

-
I guess what @Xentius meant by a combinatorial proof is not this. He seems to be looking for an answer like in this question he asked: math.stackexchange.com/questions/340905/… –  Amadeus Bachmann Apr 8 '13 at 19:42
@AmadeusBachmann exactly! –  Xentius Apr 8 '13 at 19:45
@AmadeusBachmann: I think that azimut's equality has pure (and nice!) combinatorial sense. –  xen Apr 8 '13 at 19:55
I'm a bit baffled why my argumentation shouldn't be combinatorial. @Xentius could you please specify what kind of proof you are looking for? –  azimut Apr 8 '13 at 20:02
@xen I did not say azimut's proof is not combinatorial. I just wanted to say it may not be what Xentius looking for according to his previous questions. But of course only one to confirm this is Xentius. –  Amadeus Bachmann Apr 8 '13 at 20:06

Call a ternary string with no consecutive zeroes and no consecutive ones a good string. For $k=0,1,2$ let $a_n^k$ be the number of good strings of length $n$ ending in $k$. Then it’s clear that

\begin{align*} &a_n^0=a_{n-1}^1+a_{n-1}^2\\ &a_n^1=a_{n-1}^0+a_{n-1}^2\\ &a_n^2=a_{n-1}^0+a_{n-1}^1+a_{n-1}^2=a_{n-1}\;. \end{align*}\tag{1}

And now we can make the following computation:

\begin{align*} a_n&=a_n^0+a_n^1+a_n^2\\ &=a_n^0+a_n^1+a_{n-1}\\ &=a_{n-1}^1+a_{n-1}^0+2a_{n-1}^2+a_{n-1}\\ &=(a_{n-1}^0+a_{n-1}^1+a_{n-1}^2)+a_{n-1}^2+a_{n-1}\\ &=a_{n-1}+a_{n-1}^2+a_{n-1}\\ &=2a_{n-1}+a_{n-1}^2\\ &=2a_{n-1}+a_{n-2} \end{align*}

by the third line of $(1)$.

In more purely combinatorial terms the term $a_{n-1}$ in $a_n=a_n^0+a_n^1+a_{n-1}$ comes from the fact that each good string of length $n$ ending in $2$ is obtained by appending a $2$ to one of the $a_{n-1}$ good strings of length $n-1$. The rest is a little more complicated. If a good string of length $n-1$ ends in $0$ or $2$, I can append a $1$ to it to get a good string of length $n$ ending in $1$; that covers all good strings of length $n$ ending in $01$ or $21$, which is all good strings of length $n$ ending in $1$. Similarly, if a good string of length $n-1$ ends in $1$ or $2$, I can append a $0$ to get a good string of length $n$ ending in $0$, and that accounts for all good strings of length $n$ ending in $0$. Thus, to get the good strings of length $n$ ending in $0$ or $1$ I’ve used each good string of length $n-1$ ending in $0$ once, each good string of length $n-1$ ending in $1$ once, and each good string of length $n-1$ ending in $2$ twice. In other words, I’ve used each good string of length $n-1$ at least once, and I’ve used those ending in $2$ twice. Ignoring for a moment the double use of those ending in $2$, that accounts for another $a_{n-1}$ strings of length $n$. Finally, we already know that each good string of length $n-1$ ending in $2$ is just the extension by a $2$ of a good string of length $n-2$, so the double use of good strings of length $n-1$ ending in $2$ gives us another $a_{n-2}$ good strings of length $n$. Put the pieces together, and we see that $a_n=2a_{n-1}+a_{n-2}$.

-


# Formal way to evaluate this limit

I've some doubt about the formal way to evaluate the following limit:

$$\lim_{n\to\ +\infty}{\left(1-\frac{1}{n}\right)^{n^2}}$$

I know that

$$\lim_{n\to\ +\infty}{\left(1-\frac{1}{n}\right)^{n}}=e^{-1}$$

my calculus teacher says that we can't evaluate the limit by pieces, so we can't (in general) say that

$$\lim_{n\to\ +\infty}{\left(1-\frac{1}{n}\right)^{n^2}}=\lim_{n\to\ +\infty}{\left(e^{-1}\right)^{n}}=0$$ even if in this case it is the right answer.

So I'm asking a formal way to solve this, my approach is:

Say that the limit of a product is the product of the limits, so I can say that

$$\lim_{n\to\ +\infty}{\left(1-\frac{1}{n}\right)^{n^2}}=\lim_{n\to\ +\infty}{e^{n^2\ln\left(1-\frac{1}{n}\right)}}=e^{\lim_{n\to\ +\infty}{n^2\ln\left(1-\frac{1}{n}\right)}}=e^{\lim_{n\to\ +\infty}{n^2}{\lim_{n\to\ +\infty}\ln\left(1-\frac{1}{n}\right)}}=e^{\lim_{n\to\ +\infty}{-n}}=0$$

Can I do this (I've used the continuity of the exponential function) or am I still doing the limit by pieces when I've substituted $ln\left(1-\frac{1}{n}\right)$ with $-\frac{1}{n}$?

Furthermore, can I use the theorem of the product even if there is the indeterminate form $0\cdot(+\infty$)?

• Implicitly, you used an equivalent near $0$: we know that $\ln(1+u)\sim_0 u$. All usual functions have equivalents near $0$. This way saves many useless computations unrelated to the indetermination. Sep 21, 2017 at 10:58
• +1 for your question as well as your teacher. Unfortunately most book authors / instructors manage with lot of hand waving in teaching calculus. Sep 21, 2017 at 12:12

No, you can't. However, you may note that, as $n\to +\infty$, $$n^2\ln\left(1-\frac{1}{n}\right)=n\ln\left(\left(1-\frac{1}{n}\right)^n\right)\to +\infty \cdot \ln(e^{-1})=-\infty.$$ Hence $$\lim_{n\to\ +\infty}{\left(1-\frac{1}{n}\right)^{n^2}}=\lim_{n\to\ +\infty}{e^{n^2\ln\left(1-\frac{1}{n}\right)}}=e^{-\infty}=0.$$ Another way. Since $\lim_{n\to\ +\infty}{\left(1-\frac{1}{n}\right)^{n}}=e^{-1}\in (0,1/2)$ then, by definition of limit, there is $N$ such that for all $n\geq N$, $\left(1-\frac{1}{n}\right)^{n}<1/2$. Hence, for $n\geq N$, $$0<{\left(1-\frac{1}{n}\right)^{n^2}}=\left(\left(1-\frac{1}{n}\right)^{n}\right)^n<\frac{1}{2^n}.$$ Then use the Squeeze theorem.

• @Mephlip Any further doubt? Sep 21, 2017 at 11:48

One way of doing it is by comparison. For any fixed $k\in \Bbb N$, we have $$0\leq \lim_{n\to \infty}\left(1-\frac 1n\right)^{n^2}\leq\lim_{n\to \infty}\left(1-\frac1n\right)^{nk} = e^{-k}$$

The trick to do what you're trying to do is, after making your substitution, you also factor in a correction so that you leave the formula unchanged:

$$\lim_{n \to \infty} \left(1 - \frac{1}{n} \right)^{n^2} = \lim_{n \to \infty} \left( e^{-1} \cdot \frac{\left(1 - \frac{1}{n}\right)^{n}}{e^{-1}} \right)^n = \lim_{n \to \infty} e^{-n} \cdot \left( \frac{\left(1 - \frac{1}{n}\right)^{n}}{e^{-1}} \right)^n \\= \lim_{n \to \infty}\left( e^{-n} \right) \cdot \lim_{n \to \infty} \left( \frac{\left(1 - \frac{1}{n}\right)^{n}}{e^{-1}} \right)^n$$

assuming, of course, the limits exist and the product is defined. If you could show that second limit was $1$, then you'd compute the limit as $\infty \cdot 1 = \infty$ and be done.

The problem, however, is that the second limit is a $1^{\infty}$ form! And it does this in a way that makes it so you can't immediately determine what the value should be: the value of the limit is a race between how fast the base approaches $1$ versus how fast the exponent reaches $\infty$.

So, there isn't any immediate shortcut here; you have to do more work. In fact, that limit equals $e^{-1/2}$, so the 'obvious' guesses are, in fact, wrong!

You need a more sophisticated approximation to make something like this work. The thing to do can more easily be demonstrated in your alternate approach: the Taylor series for logarithm implies

$$\ln(1 + x) = x + O(x^2)$$

So, in particular,

$$\lim_{n \to \infty} n^2 \ln\left(1 - \frac{1}{n} \right) = \lim_{n \to \infty} n^2 \left( -\frac{1}{n} + O(n^{-2}) \right) = \lim_{n \to\ infty} -n + O(1) = -\infty$$

If you're not comfortable with $O$ notation, you could just use the next term of the Taylor series. If you put your mind to it, you should be able to obtain the exact value of the limit

$$\lim_{n \to \infty} n^2 \left(\ln\left(1 - \frac{1}{n} \right) + \frac{1}{n} \right)$$

so you could alternately compute the limit as

$$\lim_{n \to \infty} n^2 \ln\left(1 - \frac{1}{n} \right) = \left( \lim_{n \to \infty} n^2 \left(-\frac{1}{n}\right)\right) + \left( \lim_{n \to \infty} n^2 \left( \ln\left(1 - \frac{1}{n} \right) + \frac{1}{n} \right) \right)$$

Late answer since it was tagged as duplicate.

An elementary way without any $$e$$ or logarithm could be:

$$\begin{eqnarray*}\left(1-\frac{1}{n}\right)^{n^2} & = & \frac 1{\left(1+\frac{1}{n-1}\right)^{n^2}}\\ & \stackrel{\text{binomial formula}}{\leq} & \frac 1{\frac{n^2}{n-1}}\\ & < & \frac 1 n \stackrel{n\to \infty}{\longrightarrow} 0 \end{eqnarray*}$$


# Is it correct to say all extrema happen at critical points but not all critical points are extrema?

Is it correct to say all extrema happen at critical points but not all critical points are extrema?

This question is for single variable calculus. But it would be great if someone could also provide insight to how well this statement generalizes to more complex functions (multi-variable functions, vector-valued functions, etc)

• Extrema need not be critical points. They can also be the "end-points" in a given domain. This is what is called "absolute extrema". – Airdish Mar 31 '16 at 10:56
• All interior extrema are critical points. Of course, critical points need not be extrema. – Sangchul Lee Mar 31 '16 at 10:58

Every local extremum in the interior of the domain of a differentiable function is neccesarily a critical point, i.e. $f'(x)=0$ is a necessary condition for $x$ to be a local extremum. There are critical points which are not local extrema.

Note that I'm stressing local extremum in the interior here. To account for global extrema, one needs to consider the behavior on the boundary of the domain as well.

Consider the function $$f:[-1,1]\rightarrow \mathbb R, x\mapsto x^2.$$ $x_0=0$ is a critical point and indeed a local extremum (a minimum). For the global extrema note that $x^2 \leq 1$ for $x\in [-1,1]$ so that $f(1)=f(-1)=1$ and $x_1=1, x_2=-1$ are points where $f$ attains a (global) maximum, but they are not critical points.

Similarly, for $$f:[-1,1]\rightarrow \mathbb R, x\mapsto x^3.$$ $x_0=0$ is a critical point, but there's no extremum. Maximum and Minimum are attained at $x_1=1$ and $x_2=-1$, neither of which are critical points.

• When you say boundary points. You just mean boundary to domain (builtin or contrived, right?) What I mean is $2$ would be an inherent boundary point to $x/(x-2)$ and contrived ones would be $[-1,1]$. Sorry if this is not correct terminology. Or am I just thinking too hard? And the inherent ones are already covered by the $f'(c)=0$ or DNE clause? – AlanSTACK Apr 1 '16 at 1:13
• @Alan: I mean boundary points of the domain where the function is defined. – Roland Apr 1 '16 at 5:23

If you assume $f$ is a continuous, real-valued function on a closed, bounded interval $[a, b]$, then:

• $f$ has at least one absolute maximum and at least one absolute minimum. (The Extreme Value Theorem.)

• If $f$ has a local (relative) extremum at an interior point $x_{0}$, then either $f'(x_{0}) = 0$ or $f'(x_{0})$ does not exist. (I.e., $x_{0}$ is a critical point of $f$, modulo your definition of "critical point".)

• If your definition of "critical point" includes endpoints of $[a, b]$, then "yes", every local extremum of $f$ is a critical point of $f$. (This convention is reasonable, since strictly speaking $f'$ does not exist at an endpoint of an interval. On the other hand, this convention is not universal.)

For the other direction:

• An interior critical point can fail to be a local extremum. Examples (with $x_{0} = 0$) include $f(x) = x^{3}$ and $$g(x) = \begin{cases} x & x < 0, \\ 2x & x \geq 0, \end{cases}$$ both viewed as functions on some interval containing $0$ in the interior. (In the first example, $f'(0) = 0$; in the second, $g'(0)$ does not exist.)

• An endpoint can fail to be a local extremum, e.g. $$f(x) = \begin{cases} x^{2} \sin(1/x) & 0 < x, \\ 0 & x = 0. \end{cases}$$

There are analogous results for real-valued functions of more than one variable, but they're a little more work to state, because not every "connected subset" of the plane (say) is a formal analog of a closed, bounded interval. Loosely, though, a continuous function $f$ on a closed, bounded subset $D$ of $\mathbf{R}^{n}$ has at least one absolute maximum and at least one absolute minimum in $D$, and these must occur either at (i) an interior point $x_{0}$ of $D$ where the total derivative $Df(x_{0})$ is zero; (ii) an interior point $x_{0}$ where $Df(x_{0})$ does not exist; or (iii) a boundary point of $D$.

There is no analog for vector-valued functions because the concepts of "maximum" and "minimum" make no sense. (If $n > 1$, the set $\mathbf{R}^{n}$ is not ordered in any way compatible with vector addition and scalar multiplication.)

• For the left endpoint $a$, the differential quotient $\lim_{h \rightarrow 0}\frac{f(a+h)-f(a)}{h}$ is a limit which may (or may not) exist, and should be regarded as a one-sided limit (i.e. only for $h>0$). If $f'(a)$ exists or not is dependent on the existence of this one-sided limit. – Roland Mar 31 '16 at 11:38
• @Roland: Agreed, but in my experience that criterion of differentiability at an endpoint is (also) a convention, and (with some justification) not a universal one. (If it matters, I'm not advocating either convention of endpoint differentiability, just noting that as stated, the OP's question can only be answered with qualifications.) – Andrew D. Hwang Mar 31 '16 at 11:55
• yet you write 'strictly speaking $f′$ does not exist at an endpoint of an interval', which is wrong for functions which are differentiable in a larger open domain which includes the interval $[a,b]$. – Roland Mar 31 '16 at 12:02
• Strictly speaking, "$f$ is differentiable at $x_{0}$" involves a two-sided limit at $x_{0}$. If you extend the definition at an endpoint by requiring only a one-sided limit, that's fine, but you're no longer invoking the usual definition of differentiability from one-variable calculus. (If you're saying the extended definition is universal, I have no mathematical grounds to argue otherwise. I'm merely saying that this extension is not tacit in elementary calculus. For instance, $f(x) = |x|$ is not differentiable at $0$, but is differentiable on $[0, \infty)$ by your definition.) – Andrew D. Hwang Mar 31 '16 at 12:36
• @Roland It is explicitly stated in some real analysis textbooks (ex. Apostol) that for a derivative $f'(c)$ to exist, $f$ must be defined in an open interval containing $c$. Other authors, like Rudin, do not explicitly require this yet mention the issue of differentiability at endpoints in passing. The motivation for this requirement is far beyond the scope of introductory calculus. See the answer by Willie Wong here: math.stackexchange.com/questions/126176/… – MathematicsStudent1122 Apr 2 '16 at 5:07

Yes.

You can analyse this multi-variable example $z = x^2 - y^2$.

This has a critical point which is not an extrema. These points called saddle points.

• What's your function? What's your domain? – Roland Mar 31 '16 at 11:40
• @Roland $f: \mathbb R^2 \rightarrow \mathbb R$ with $z = f(x,y) = x^2 - y^2$. – crbah Mar 31 '16 at 11:44
• What if the domain is $\{(x,y): x^2 +y^2 \leq 1\}$? Is the answer still yes? – Roland Mar 31 '16 at 11:49
• @Roland Yes. You can see its graph on en.wikipedia.org/wiki/Saddle_point – crbah Mar 31 '16 at 11:53
• My comment for the restricted domain is not about the critical point which is not an extremum. It's about the extremal points which are not critical points ($(x,y)=(1,0)$ and $(x,y)=(0,1)$). – Roland Mar 31 '16 at 12:00


# Homework Help: Finding required resistor to reduce voltage

1. Sep 25, 2011

### deus_ex_86

1. The problem statement, all variables and given/known data
Your task is to design a "dummy" indicator light for your car. The cheapest bulb available is a #47 incandescent lamp rated at 6.3V for 150 mA. The problem is, your car produces 13.5 V when it's on. Choose the nearest 10% resistor that will reduce the voltage across the bulb to 6.3V.

2. Relevant equations
V = IR

3. The attempt at a solution

I modelled the bulb as a resistor:

6.3 V = .150 A * R
Which gives R = 42 $\Omega$.

From there, I plugged this value into a new circuit with a 13.5 V source instead of a 6.3 V source, and added the unknown resistor to the equation:

13.5 V = .150 A * R + 6.3 V
7.2 V = .150 A * R
R = 48 $\Omega$.

The nearest 10% resistor value is 47 $\Omega$, but this wouldn't reduce the voltage across the bulb to 6.3 V. The next closest 10% resistor is 56 $\Omega$. It just seems that this value is too high ... Did I follow this process correctly? What would you choose?

2. Sep 25, 2011

### lewando

48-ohms look right. What are you getting for the new bulb voltage (with the 47-ohm R)?

3. Sep 25, 2011

### deus_ex_86

48 ohms is the theoretical value, but I have to choose a 10% resistor to use. When I use the 47 ohm resistor, I end up with 6.37 V across the bulb.

4. Sep 25, 2011

### lewando

Close enough!

[edit: To the letter of the question the solution does not exist. To the intent of the question, 47-ohms is a good answer, if you stipulate your voltage deviation, you should be fine.]

5. Sep 27, 2011

### zgozvrm

With a 47Ω resistor, the bulb will have approximately 6.37 volts across it. Light bulbs are not very picky, so this will work fine.

With the 56Ω resistor, the bulb will only have about 5.79 volts across it. Still, a workable voltage, but it's the current that we're really concerned with...

The 47Ω resistor will limit the current through the bulb to about 151.69 mA which is just over the design rating. The bulb will burn slightly brighter (although probably not noticeably).

The 56Ω resistor will limit the current down to about 137.76 mA and the bulb will burn slightly dimmer. You're only looking at about an 8% loss of current though, so either will work.

I'd use the 47Ω resistor.

6. Sep 27, 2011

### deus_ex_86

Thanks, so would my TA, as I got a 100% on the assignment. :)

7. Sep 27, 2011

### 2milehi

With ±10% resistors there could be a resistor that is 42.3Ω and car battery voltage can spike into the 14.0 volt range. That would cause 166 ma to flow through the bulb or about 10.7% more. Since power is I²R, there can be an extra 23% power dissipated through the bulb which will shorten its life.

IMO the design would have had some breathing room built in if you went with the 56Ω bulb.