# Values of a, b, and c that the curve $y = ax^3 + 3x^2 + bx + cx + e^x$ has one point of inflection?

For what values of a, b and c does the curve $y = ax^3 + 3x^2 + bx + cx + e^x$ have exactly one point of inflection? Two points of inflection? No points of inflection? Provide a numerical approximation for the lowest value of a for which there is no inflection point.

I'm really stumped on this question. I've tried finding the second derivative but couldn't think of anything else to do from that point. Any help would be greatly appreciated. Thanks!

-
Points of inflection occur when the second derivative is zero. What is the second derivative of your curve? How can you assure there's only one zero such that we have $+/-$ on either side of the zero. (You're allowed other zeroes that don't change the inflection, i.e. $x=0$ of $y=x^2$). –  Ian Coley Dec 10 '13 at 19:46
I've found the second derivative to be $y'' = 6ax + 6 + e^x = 0$ but I could not think of how to solve that. –  DinoMint Dec 10 '13 at 19:48
What happens when $x=0,1,-1,-2, 2$ and so on? –  Manasi Dec 10 '13 at 20:02
Given that $e^x$ is positive will drive you to a negative x. Since it won't be too small you can probably use an estimate for $e^x$ around that x. –  half-integer fan Dec 10 '13 at 20:04
You don't need to solve $6ax+6+e^x=0$, @DinoMint, only figure out how many solutions it has. Think of it as intersecting the graph of $y=e^x$ with the line $y=-6ax-6$. If the slope $-6a$ is negative, there is exactly one intersection point, if it is positive you can find the tangent line to $y=e^x$ with the same slope ($-6a$) and see if this line, $y=-6ax-6$ is above or below the tangent. –  Omar Antolín-Camarena Dec 10 '13 at 20:05

As you stated in the comments, the second derivative is $$y'' = 6ax + 6 + e^x = 0$$
First, we note that if $a=0$ the equation becomes $$6 + e^x = 0$$ which has no real solutions, thus there are no inflection points.
Rewriting the equation as $$x = -\dfrac{6+e^x}{6a}$$ or $$x = -\dfrac1{a} \cdot \left(1 + \dfrac 16 e^x \right)$$ makes the behavior clearer.
If $a \gt 0$ we can see that $x$ must be negative and thus $e^x < 1$ and there will be a solution in the neighborhood of $x = -\dfrac1a$.
I will leave the case where $a \lt 0$, thus $x \gt 0$ for you to consider.


# Math Help - Possible mathematical induction problem

1. ## Possible mathematical induction problem

Course: Foundations of Higher MAth

Prove that $24|(5^{2n} -1)$ for every positive integer n.

This is a question from my final exam today.

P(n): $24|(5^{2n}-1)$
P(1): $24|(5^2 -1)$ is a true statement.

Assume P(k) is true. Then $5^{2k}-1 = 24a$ for some integer a.
Then $5^{2k}= 24a + 1$

P(k+1): $24|(5^{2(k+1)}-1)$

$5^{2(k+1)}-1=5^{2k+2}-1=5^{2k}*5^2-1$
$=(24a + 1)*25 -1$
$=(24a)(25)+25 -1$
$=(24a)(25)+24$
$=24(25a+1)$
$=24b$

Therefore, $24|(5^{2(k+1)}-1)$. By PMI, P(n) is true for every positive integer n.
None of my friends used this method though. Is this a correct way to do it?

2. ## Re: Possible mathematical induction problem

Course: Foundations of Higher MAth
Prove that $24|(5^{2n} -1)$ for every positive integer n.
This is a question from my final exam today.
P(n): $24|(5^{2n}-1)$
P(1): $24|(5^2 -1)$ is a true statement.
Assume P(k) is true. Then $5^{2k}-1 = 24a$ for some integer a.
Then $5^{2k}= 24a + 1$
P(k+1): $24|(5^{2(k+1)}-1)$
$5^{2(k+1)}-1=5^{2k+2}-1=5^{2k}*5^2-1$
$=(24a + 1)*25 -1$
$=(24a)(25)+25 -1$
$=(24a)(25)+24$
$=24(25a+1)$
$=24b$
Therefore, $24|(5^{2(k+1)}-1)$. By PMI, P(n) is true for every positive integer n.
None of my friends used this method though. Is this a correct way to do it?
A strict grader may like to have seen more grouping symbols.
However, the argument is correct.


Alternative way to find the probability in die throw problem

We throw a die 10 times. What's the probability of getting at least one 6?

Using the complentary that's $$1-Pr$$(Getting no $$6$$'s)

$$1- ({\frac{5}{6}})^{10} = 0.838494$$

There's a note that says that to solve the problem directly would require a complex use of the additivity property.

a) How do you solve the problem directly?

I think that to solve it directly, though not sure, is to find the $$P(A_1 \cup A_2 \cup A_3 \cup A_4 \cup A_5 \cup A_6)$$ in ten die throws, where $$A_i$$ is the event of getting $$i$$ $$6$$'s

As the events $$A_i$$ are not disjoint the exclusion-inclusion principle is needed.

My try:

$$\binom{10}{1} \frac{1}{6} - \binom{10}{2} \frac{1}{6^2} + \binom{10}{3} \frac{1}{6^3} - \binom{10}{4} \frac{1}{6^4}+ \binom{10}{5} \frac{1}{6^5} - \binom{10}{6} \frac{1}{6^6} =0.838091$$

It is a slightly different result that the one obtained using the complementary. What am I not doing right?

b)If the events aren't disjoint, can you talk about the "additivity property"? As it is defined for disjoint events.

It would be the following:

$$\sum_{n=1}^{10} \dbinom{10}{n}\left(\dfrac{1}{6}\right)^n\left(\dfrac{5}{6}\right)^{10-n}$$

Here the events are disjoint. You have exactly 1 roll of a 6, exactly two rolls of a six, ..., exactly ten rolls of a six.

Your attempt works as well (although you stopped at $$i=6$$). Had you continued using Inclusion/Exclusion up to $$i=10$$, it would have given the same answer:

$$\sum_{i=1}^{10}(-1)^{i+1}\dbinom{10}{i}\left(\dfrac{1}{6}\right)^i$$

Here you are counting if you choose a die, the probability that one die is a six, minus if you choose two dice, both of them are a six, plus if you choose three dice, all three are a six, etc.

b) Yes.

$$P(A\cup B) = P(A)+P(B)-P(A\cap B)$$

This is the property that yields the Inclusion/Exclusion principle in the first place.

You got a different answer because you only computed the first six terms of the inclusion-exclusion method. You have ten dice, each of which could produce a six, so you need ten terms.

• You use Inclusion-Exclusion when you have events that are not mutually exclusive. You can see that "roll six on the first die" and "roll six on the second die" are not mutually exclusive because it is possible that you roll sixes on both dice. I don't know what you mean by "inclusive." – David K May 3 at 21:27


# How to express the cardinality of $∏_{1≤i≤n} A_i$ in terms of cardinalities $|A_1|, |A_2|, . . . , |A_n|$

I was given the problem:

For finite sets $A_1, A_2,\dotsc , A_n$ define their Cartesian product $\prod_{i=1}^n A_i$ as the set of all $n$-sequences $(x_1, x_2,\dotsc, x_n)$, where $x_i \in A_i$ for every $i = 1, 2, \dotsc, n$. Find a formula expressing the cardinality of $\prod_{i=1}^n A_i$ in terms of cardinalities $|A_1|, |A_2|,\dotsc , |A_n|$.

And I am struggling to understand what it is actually asking for, could someone explain it to me please, thanks. :)

• Do you know what the Cartesian product is? For instance, if $A_1 = \{1,2\}$ and $A_2 = \{3,4,5\}$ could you explicitly write down $\prod_{1 \leq i \leq 2} A_i$? – Mees de Vries Jan 19 '17 at 13:24
• @MeesdeVries This is all prossible combinations right? So for that example {(1,3), (2, 3), (1, 4) ....}, But I have never seen the notation: ∏ 1≤i≤n Ai before, what does that mean? – Alfie Jan 19 '17 at 13:27

$\prod_{1\le i\le n}A_i$ is the cartesian product, that is, all finite sequences $(a_1,\ldots,a_n)$ such that $a_i \in A_i$ for each $i=1,\ldots,n$. How many such sequences can you choose? $|A_1|$ choices for $a_1$, ..., $|A_n|$ choices for $a_n$. Therefore $$\left|\prod_{1\le i\le n}A_i\right|=\prod_{1\le i\le n}|A_i|.$$

• So is this question asking for a formula for the carnality of the cartesian product of $A_1, A_2,\dotsc , A_n$ ? – Alfie Jan 19 '17 at 13:51
• Yes. ____________ – Paolo Leonetti Jan 19 '17 at 13:52
• So $\prod_{1\le i\le n}|A_i|$= $|A_1| * |A_2| * \dotsc * |A_n|$ – Alfie Jan 19 '17 at 13:57
• @Bram28 Assuming the axiom of choice, multiplication of infinite cardinal numbers is not difficult. If either $\kappa$ or $\mu$ is infinite and both are non-zero, then $\kappa \cdot \mu= \max\{\kappa, \mu\}$. In particular, $\kappa^n=\kappa$ for all $n\ge 1$. See here: en.wikipedia.org/wiki/Cardinal_number – Paolo Leonetti Jan 19 '17 at 14:56
• @Bram28 Well, you can find the answer in every introduction about cardinal arithmetics. Take a look here math.uchicago.edu/~may/VIGRE/VIGRE2009/REUPapers/Murphy.pdf and here euclid.colorado.edu/~monkd/m6730/gradsets06.pdf – Paolo Leonetti Jan 19 '17 at 16:00

We know that $$|A\times B|=|A|\times|B|\qquad(1)$$.

We want to show $$\left|\prod_{i=1}^nA_i\right|=\prod_{i=1}^n|A_i|$$ is true for any natural number $n$, where $\prod_{i=1}^n|A_i|=|A_1|\times|A_2|\times\dotsc\times|A_n|$. So, we have use induction.

The base case $n=1$ ($|A_1| = |A_1|$) is trivial. Now suppose inductively that $\left|\prod_{i=1}^nA_i\right|=\prod_{i=1}^n|A_i|$. We want to show $$\left|\prod_{i=1}^{n+1}A_i\right|=\prod_{i=1}^{n+1}|A_i|.$$ Now we need to show $$\left|\prod_{i=1}^{n+1}A_i\right|=\left|\left(\prod_{i=1}^nA_i\right)\times A_{n+1}\right|\qquad(2),$$ i.e., the cardinality of the set $\prod_{i=1}^{n+1}A_i$ is equal to the cardinality of the set $\left(\prod_{i=1}^nA_i\right)\times A_{n+1}$. So \begin{aligned}\left|\prod_{i=1}^{n+1}A_i\right|&=&\left|\left(\prod_{i=1}^nA_i\right)\times A_{n+1}\right|&\qquad\text{by }(2)\\&=&\left|\prod_{i=1}^nA_i\right|\times |A_{n+1}|&\qquad\text{by }(1)\\&=&|A_1|\times|A_2|\times\dotsc\times|A_n|\times|A_{n+1}|&\qquad\text{by induction hypothesis}\\&=&\prod_{i=1}^{n+1}|A_i|.\end{aligned}

• This is exact, but I think the OP was asked a formula, but not asked to prove it. – Jean Marie Jan 19 '17 at 14:46
• @CristianGz Do you know if (1) also holds for infinities? If so, how am I to think about multiplying 'infinities'? Is there a definition for that? – Bram28 Jan 19 '17 at 14:52
• @JeanMarie: Agree. I deleted the answer. But I though it can be useful. – Cristhian Gz Jan 19 '17 at 14:53
• @Bram28, the statement is true to infinite sets. It is possible using bijective functions to state equal cardinality between two sets. Check en.m.wikipedia.org/wiki/Cardinality – Cristhian Gz Jan 19 '17 at 14:55


# Lecture 21: Minimizing a Function Step by Step

Flash and JavaScript are required for this feature.

## Description

In this lecture, Professor Strang discusses optimization, the fundamental algorithm that goes into deep learning. Later in the lecture he reviews the structure of convolutional neural networks (CNN) used in analyzing visual imagery.

## Summary

Three terms of a Taylor series of $$F$$($$x$$) : many variables $$x$$
Downhill direction decided by first partial derivatives of $$F$$ at $$x$$
Newton's method uses higher derivatives (Hessian at higher cost).

Related sections in textbook: VI.1, VI.4

Instructor: Prof. Gilbert Strang

The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To make a donation or to view additional materials from hundreds of MIT courses, visit MIT OpenCourseWare at ocw.mit.edu.

GILBERT STRANG: Well, OK, I am happy to be back, and I am really happy about the project proposals that are coming in. This is like, OK, this is really a good part of the course. And so keep them coming, and I'm happy to give whatever feedback I can on those proposals, and do make a start there. They're really good, and if some are completed before the end of the semester and we can to offer you a chance to report on them, that that's good too. So well done with those proposals.

So today, I'm jumping to part six. So part six and part seven are optimization which is the fundamental algorithm that goes into deep learning. So we've got to start with optimization. Everybody has to get that picture, and then part seven will be the structure of CNNs, Convolution Neural Nets, and all kinds of applications.

And so can we start with optimization? So first, can I like get the basic facts about three terms of a Taylor series? So that's the typical. It's seldom that we would go up to third derivatives in optimization.

So that's the most useful approximation to a function. Everybody recognizes it. Here, I'm thinking of F as just one function, and x as just one variable, but now I really want to go to more variables. So what do I have to change if F is a function of more variables? So now, I'm thinking of x as-- well, now let me see.

Yeah, I want n variables here. x is x1 up to xn. So just to get the words straight so we can begin on optimization, so what will be the similar step so the function F at x-- remember, x is n variables. OK?

Now, what do I have? Delta x, so what's the point about delta x now? It's a vector, delta x1 to delta xn, and what about the derivative of F? It's a vector too, the derivative of F with respect to x1, the derivative of F with respect to x2, and so on.

What do I have to change about that? I know those guys are vectors, so it's their dot product. So it's delta x transpose at vector times this dF/dx. So now I'm replacing this by all the derivatives, and it's the gradient. So the gradient of F at x is the derivatives-- let's see.

It's essential to get the notation straight here. Yeah, so it'll be the partial derivatives of the function F. So grad F is the partial derivatives of F with respect to x1 down to partial derivative with respect to xn. OK, good.

That's the linear term, and now what's the quadratic term? 1/2, now delta x isn't a scalar anymore. It's a vector. So I'm going to have delta x transpose and a delta x, and what goes in between is the second derivatives, but I've got a function of n variables.

So now, I have a matrix of second derivatives, and I'll call it H. This is the matrix of second derivatives, Hjk is the second derivative of F with respect to xj and xk, and what's the name for this guy? The Hessian, Hessian matrix.

How the Hessians got into this picture I don't know. The only Hessians I know are the ones who fought in the Revolutionary War for somebody. Who? Which side were they on? I think maybe the wrong side. The French were on our side and--

Anyway, Hessian matrix, and what are the facts about that matrix? Well, the first fact is that it's [INAUDIBLE] and the key fact is it's symmetric. Yeah. OK, and again, it's an approximation. And everybody recognizes that if n is very large, and we have a function of many variables. Then, we had n derivatives to compute here, and about 1/2 n squared derivatives.

The 1/2 comes from the symmetry, but the key point is the n squared derivatives to compute there. So computing the gradient is feasible if n is small or moderately large. Actually, by using automatic differentiation, the key idea of back propagation, back prop, you can speed up the computation of derivatives quite amazingly. But still for the size of deep learning problems that's out of reach. OK.

So that's the picture, and then I will want to use this to solve equations. There is a parallel picture for a vector f. So now, this is a vector function. This is f1 of x up to fn of x, an x is x1 to xn. So I have n functions of n variables, n functions of n variables.

Well, that's exactly what I have in the gradient. Think of these two as parallel, the parallel being f corresponds to the gradient of F, n functions of n variables. OK. Now maybe, what I'm after here is to solve f equals 0. So I'm going to think about the f at x plus delta x, so it starts with f of x.

And then we have the correction times the matrix of first derivatives, and what's the name for that matrix of first derivatives? Well, if I'm just given n functions-- yeah, what am I after here? I'm looking for the Jacobian. So here we'll go the Jacobian, J. This is the Jacobian named after Jacoby, Jacobian matrix.

And what are its entries? J, the jk entry is the derivative of the J function with respect to the kth variable, and I'm stopping at first order there. OK, so these are sort of like facts of calculus, facts of 18.02 you could say. Multivariable calculus, that's the point.

Notice that we're doing just like the first half of 18.02, just do differential calculus, derivatives, Taylor series. We're not doing multiple integrals. That's not part of our world here. OK, so that's the background.

Now, I want to look at optimization. So over here, I want to optimize-- well, over here, let me try to minimize F of x, and I'll be in the vector case here. And over here, I want to solve f equals 0, and of course, that means f of 1 equals 0 all the way along to fn equals 0. Here, I have n equations, and n unknowns.

Let me start with that one, and I'll start with Newton's method, Newton's method to solve these n equations and n unknowns. OK, so Newton, Newton's method which is often not presented in 18.02. That's a crime, because that's the big application of gradients in Jacobians.

OK, so I'm trying to solve n equations and n unknowns, and so I want f at x plus delta x to be 0. Right? So I want f of x plus delta x to be 0. So f at x plus delta x is-- I'm putting in a 0. I'm just copying that equation-- is f at where I am. Let me use K for the case iteration.

So I'm at a point xK. I want to get to a point xK plus 1. And so I have 0 is f of x plus J, at that point, times delta x which is xK plus 1 minus xK. Good. That's Newton's method.

Of course, 0 isn't quite true. Well, 0 will be true if I'm constructing xK plus 1 here. I'm constructing xK plus 1. OK. So let me just rewrite that, and we've got Newton's method. So we're looking for this change, xK plus 1 minus xK. I'll put it on this side as plus xK, so that's this.

Now, I have to invert that and put it on the other side of the equation. So that will go with a minus. This guy will be inverted and f at xK. So that's Newton's methods. It's natural.

So let me just repeat that. You see where the xK plus 1 minus xK is sitting? Right? And I moved f of xK to the other side with a minus sign, and then I multiplied through by J inverse, so I got that. So that's Newton's method for a system of equations, and over there, I'm going to write down Newton's method for minimizing a function. This is such basic stuff that we have to begin here.

Let me even begin with an extremely straightforward example of Newton's method here. Suppose my function-- suppose I've only got one function actually. Suppose I only had one function. So suppose my function is x squared minus 9, and I want to solve f of x equals 0. I want to find the square root of 9.

OK, so what is Newton's method for it? My point is just to see how Newton's method is written and then rewrite it a little bit so that we see the convergence. OK, so of course, the Jacobian is 2x. So Newton's method says that xK plus 1-- I'm just going to copy that Newton's method-- minus 1 over 2xK. Right? That's the derivative times f at xK which is xK squared minus 9.

OK. We followed the formula, this determines xK plus 1, and let's simplify it. So here I have xK minus that looks like 1/2 of xK, so I think I have 1/2xK, and then this times this is 9/2 of 1 over xK. Is that right? 1/2 of xk from this stuff and plus 9/2 of 1 over xK. OK.

Can I just like check that I know the answer is 3? Can I be sure that I get the right answer, 3? That if xK was exactly 3, then of course, I expect xK plus 1 to stay at 3. So does that happen? So 1/2 of 3 and 9/2 of 1/3, what's that, 1/2 of 3 and 9/2 of 1/3?

OK, that's 3/2 and 3/2. That's 6/2, and that's 3. OK. So we've checked that the method is consistent which just means we kept the algebra straight. But then the really important point about Newton's method is to discover how fast it converges. So now let me do xK plus 1 minus 3.

So now, I'm looking at the error which is, I hope, approaching 0. Is it approaching 0? How quickly is it approaching 0? These are the fundamental questions of optimization.

So I'm going to subtract 3 from both sides somehow. OK, from here, I guess, I'm going to subtract 3. So I was just checking that it was correct. OK. Now, so xK plus 1 minus 3, I'm going to subtract 3 from both sides. I'm going to subtract 3 there, and then I hope that-- that box is what goes down here. Right?

Subtracted 3 from both sides, so I'm hoping now things go to 0. OK, so what do I have there? Let me factor out the 1 over xK. So what do I have then left? 1 over xK, so there's a 9/2 from there, 1 over xK.

So I really have 1/2 of xK squared, because I've divided by an xK. And this minus 3, I better put minus 3xK, because I'm dividing by xK. I claim that that's-- now I've got it. And let's see, let me take out the 2-- 2, forget these 2s, and make that a 6. So I have 1 over 2xK times 9 plus xK squared minus 6.

Anything good about that? We hope so. We hope that that is something attractive. So this is, again, the error at set K plus 1, and it's 1 over 2xK times this thing in brackets-- 9 plus xK squared minus 6xK. And we recognize that as xK minus 3 squared.

xK squared minus 6 of them plus 9, that's xK minus 3 squared. OK, that was the goal, of course. That's the goal that shows why Newton's method is fantastic. If you can execute it, if you can start near enough, notice that-- so how do I describe this great equation? It says that the error is squared at every step, squared at every step.

So if I'm converging to a limit, it will satisfy the-- it'll be 3, or I guess minus 3, is that possible? Yeah, minus 3 is another solution here. So we've got two solutions. Newton's method could converge to 3. Am I right, it could converge to minus 3?

So I'd have a similar equation sort of centered at minus 3, or does it always do one of those? It could blow up. So there are sort of regions of attraction. They're all the starting points that approach 3, and the whole point of that equation is with quadratic convergence the error being squared at every step. It zooms in on 3.

Then, there is all the starting points that would go to minus 3, and then there are the starting points that would blow up. And those, maybe for this very simple problem, the picture is not too difficult to sort out those three regions. And this is allowing for a vector, two equations or n equations, then we're in n variables, and really you get beautiful pictures.

You get some of the type of pictures that gave rise to these books on fractals, picture books on fractals for these basins of attraction. Does the starting point lead you to one of the solutions, or does it lead you to infinity? Here, that would be interesting to just draw it for this, but the essential point is the quadratic convergence, if it's close enough.

You see that it has to be close. If x0 is pretty near 3, then this is about 1/6 of that, and there would be a good region of attraction in this case. OK. So that's Newton's method for equations.

And now I want to do Newton's method. I just want to convert all those words over to Newton's method for optimization. So remember, these boards were solving f equals 0. This board is minimizing capital F, and what's the connection between them? Well of course, this corresponds to solving the gradient equals 0.

At a minimum, if I'm minimizing, I'm finding a point where all the first derivatives are 0. So that will be the match between these. This grad F in this picture is the small f in that picture. OK.

Now, I guess here I have-- and this is sort of the heart of our applications to deep learning-- we have very complicated loss functions to minimize, functions of thousands or hundreds of thousands of variables. OK. So that means that we would like to use Newton's method, but often we can't. So I need him to put down here two methods-- one that doesn't involve those high second derivatives and Newton's that does.

So first, I'll write down a method that does not involve, so method one, and this will be steepest descent. And what is that? That says that xK plus 1-- the new x is the old x minus-- steepest descent means that I move in the steepest direction which is the direction of the gradient of F. I move some distance, and I better have freedom to decide what that distance should be. So this is a step size, s, or in the language of deep learning, it's often called the learning rate, so if you see learning rate. OK.

So and it's natural to choose sK. We're going along, do you see what this right-hand side looks like? I'm at a point in n dimensions. We're in n dimensions here. We have functions of n variables.

There is a vector. There is a direction to move down the steepest slope of the graph. And here is a distance to move, and we will stop. We'll have to get off this step, normally. If we stay on it, it will swing back, it'll take us off to infinity.

You would like to choose sK so that you minimize capital F. You take the point on this line, so this a line in R n, a direction in R n. And for all the points on that line, in that direction, F has some value, and what you expect is that initially, because you chose it sensibly, the value of F will drop. But then at a certain point, it will turn back on you and increase.

So that would be the natural stopping point. I would call that an exact line search. So I exact line search would be, exact line search is the best s. Of course, that would take time to compute, and you probably, in deep learning, that's time you can't afford, so you fix the learning rate s. Maybe you choose 0.01 to be pretty safe.

OK, so that's method one, steepest descent. Now, method two will be Newton's method. So now, we have xK plus 1 equal to xK minus something times delta F, and now I'm going to do the right thing. I'm going to live right here, and the right thing is the Hessian, the second derivative.

This was cheap. We just took the direction and went along it. Now, we're getting really the right direction by using the second derivative, so that's H inverse. OK, and what I've done is to set that 0.

Do you see that's Newton's method? It's totally parallel to this guy. Actually, I'm really happy to have these two on the board parallel to each other, because you have to keep straight, are you solving equations, or are you minimizing functions? And you're using different letters in the two problems, but now you see how they match.

The Jacobian of-- so again the matches, think of f as the gradient of F. That's the way you should think of it. So the Jacobian of the gradient is the Hessian. The Jacobian of the gradient is the Hessian, and that makes sense, because the first derivative of the first derivative is the second derivative. Only we're doing matrix y, so the Jacobian of the gradient-- we're doing a vector matrix sentence instead of a scalar sentence-- the Jacobian of the gradient is a Hessian. Yeah, right.

OK, so that's what I wanted to start with, just to get those basic facts down. And so the basic facts were the three-term Taylor series. And then the basic algorithms followed naturally from it by setting f F at the new point to 0, if that's what you were solving or by assuming you had the minimum. Right, good, good, good, good. OK.

Now, what? Now, we have to think about solving these problems, studying. Do they converge? What rate do they converge? Well, the rate of convergence is like why I separated off this example.

So the convergence rate for Newton's method will be quadratic. The error gets squared, and of course, that means super-fast convergence, if you start and close enough. The rate of convergence for a steepest descent is, of course, not. You're not squaring errors here, because you're just taking some number instead of the inverse of the correct matrix, so you can't expect super speed.

So a linear rate of convergence would be right. You would like to know that the error is multiplied at every step by some constant below 1. That would be a linear rate compared to being squared at every step. OK, and so this will be our basic formula that we build on for really large scale problems.

And there are methods, of course, people are going to come up with methods that they're sort of a cheap Newton's method. Levenberg-Marquardt, and it's in the notes at the end of this section, at the end of 6.4 that we'll get to. So Levenberg-Marquardt is a sort of cheap man's Newton's method. It does not compute to Hessian, but it says, OK, from the gradient, I can see one term in the Hessian. So it grabs that term, but it's not fully second order.

OK. So now, we have to think about problems, and I guess the message here is, at our starting point, has to be convexity. Convexity is the key word for these problems, for the function that we want to minimize. If that's a convex function, well first of all, the convex function is likely to have one minimum. And the picture that's in our mind of steepest descent, this picture of a bowl, a bowl is the graph of the convex function.

So I'm turning to convexity now. I'll leave that board there, because that's pretty crucial, and speak about the idea of convexity. Convex function, convex set, so let's call the function f of x, and a typical convex set would be I'll call it K. OK. So we just want to remember what does that word can convex mean, and how do you know if you have a convex function or a convex set?

OK, let me start with convex set. So because here is my general problem, my convex minimization, which you hope to have, and in many applications, you do have. So you minimize a convex function for points in a convex set. So that's like the ideal situation. That's the ideal situation, to get something on your side, something powerful, convexity.

The function is convex, and you say, well, let me draw a convex function, the graph. OK, so I'll draw a convex function, say a bowl. So that's a graph of f of x, and then here are the x's. Let me maybe put x1 and x2 in the base and the graph of f of 1x x2 up here. OK. Actually, I'm over there.

I should be calling this function F, I think. Is that right? Yeah, a little f would be the gradient of this guy. Yeah, I think so. OK.

Now, I'm minimizing it over certain x's, not all x's. I might be minimizing, for example, K might be the set where Ax equals B. K might be, in that case, a subspace or a shifted subspace. I said subspace, but then 18.06 is reminding me in my mind that I only have a subspace when B is 0.

You know the word for a subspace that's sort of moved over? Affine, so I'll just put that word down here. Bunch of words to learn for this topic, but they're worth learning. OK.

So it's like a plane but not necessarily through the origin. If B is 0, it doesn't go through it. If B it's not 0, it doesn't go through the origin. OK. Anyway, or I have some other convex set. Let me just put this convex set K in the base for you, and did I make it convex? I think pretty luckily I did.

So now what's the? Well, the convex sets the constraint, so this is the constraint set. Constraint is that x must be in the set K. OK, and I drew it as a convex blob. Here was an example where it's flat, not a blob but a flat plane.

But let me come back to what does convex mean. What's a convex set? Yeah, we have to do that, should have done that before. In the notes, I had the fun of figuring out, if I took a triangle, is that a convex set? Let's just be sure.

So what's a convex set? That is a convex set, because if I take any two points in the set and draw the line between them, it stays in the set. So that's convexity, any edge, line, from x1 to x2 stays in the set. OK, good.

So here's my little exercise to myself. What if I took the union of two triangles? All I want to get you to do is just visualize convex and not convex possibilities. Suppose I have one triangle, even if it was obtuse, that's still convex, right? No problem.

But now what if I put those two triangles together, take their union? Well, if I take them sitting with a big gap between, like I've lost. I mean, I never had a chance that way, because if it was the union of these two-- well, you know what I'm going to say. If I'm doing that point and that point, of course, it goes outside and stupid. All right.

What if what if that triangle, that lower triangle, overlaps the upper triangle? Is that a convex set? Everybody's right saying no. Why how do I see that the union of those two triangles is not a convex set? Guys, you tell me where to pick two points, where the line goes out. Well, I take one from that corner and one from that corner, and the line between them went outside. So union is usually not convex.

Well, if I think of the union of two sets, my mind automatically goes to the other corresponding possibility which is the intersection of the two sets. So if I take the intersection of two sets. Now, what's the deal with that? When I had two triangles, two separated triangles, what can we say about the intersection of those two triangles?

AUDIENCE: [INAUDIBLE]

GILBERT STRANG: It's empty. So should we regard the empty set as a convex set? Yes. Isn't it?

AUDIENCE: Yeah, it's vacuous.

GILBERT STRANG: Vacuous, so it hasn't got any problems. Right? OK, but now the intersection is always convex. I'm assuming the two sets that we start with are. Now, that's an important fact, that the intersection of convex sets. Let's just draw a picture that shows an example.

So what's the intersection? Just this part and it's convex. OK, can you give me a little proof that the intersection is convex? So I take two points in the intersection-- let me start the proof.

To test if something's convex, how do you test it? You take two points in the set in the intersection, and you want to show that the line between them is in the intersection. OK, why is that?

So take two points, take x1 in the intersection. We've got two sets here, and that's the symbol for intersection, and we've got another point in the intersection. And now, we want to look at the line between them, the line from x1 to 2x. What's the deal with that one? Is that fully in K1?

AUDIENCE: Yes.

GILBERT STRANG: Why is it fully in K1? I took two points in the intersection, I'm looking at the line between them, and I'm asking, is it in the first set K1? And the answer is yes, because those points were in K1, and K1's convex. And is that line between them in K2? Yes, same reason, the two endpoints were in K2, so the line between them is in K2.

So the intersection of convex sets is always convex. The intersection of convex sets is convex. Good. So you'll see in the note these possibilities with two triangles. Sometimes, you can take the union but not very often. OK.

Now, what's the next thing I have to do? Convex functions, we got convex sets, what are convex functions, and we're good. Because this is our prototype of a problem, and I now want to know what it means for that F to be-- oh, I'm sorry. I now know what it means for the set K to be convex set, but now I have to look at the other often more important part of the problem. What's the function I'm minimizing, and I'm looking for functions with this kind of a picture. OK.

The coolest way is to connect the definition of a convex function to the definition of a convex set. This is really the nicest way. It's a little quick. It just swishes by you. But tell me, do you see a convex set in that picture? [INAUDIBLE]

You see a convex set in that picture. That's the picture of a graph of a convex function. It's a picture of a bowl. Are the points on that surface, is that a convex set? No, certainly not. No, but where is a convex set to be found here, in that picture? Yes.

AUDIENCE: The set of y, if y is greater than [INAUDIBLE]

GILBERT STRANG: Yes, the points on and above the bowl, inside the bowl, we could say, these points. So convex function, yes, a function's convex when the points on and above the graph are convex set. You could say, OK, mathematicians are just being lazy. Having got one definition straight for a convex set, now they're just using that to give an easy definition of a convex function. Actually, it's quite useful for functions that could maybe equal infinity, sort of generalized functions.

But it's not the quickest way to tell if the function is convex. It's not our usual test for convex functions. So now I want to give such a test. OK. So now, the definition of convex function, of a smooth convex, yeah. This fact, I shouldn't rush off away from it, from the definition of a convex function as having a convex set above its graph. The really official French name for the set above the graph is the epigraph, but I won't even write that word down. OK.

Why do I come back to that for a minute? Because I would like to think about two functions, F1 and F2. Out of two functions, I can always create the minimum or the maximum.

So suppose I have to convex functions, convex function F1 and F2. OK. Then, I could choose a minimum. I could choose my new function. Shall I call it little m for minimum? m of x is the minimum of F1 and F2.

And I could choose a maximum function which would be the maximum of F1 of x and F2 of x at the same point x. It's just a natural to think, OK, I have two functions. I've got a bowl and I've got another bowl, and suppose they're both convex.

So I'm just stretching you to think here. If I've got the graphs of two convex functions, and I would like to consider the minimum of those two functions and also the maximum of those two functions. I believe life is good. One of these will be convex, and the other won't.

And can you identify which one is convex and which one is not convex? What about the minimum? Is that a convex function? So just look at the graph. What does the minimum look like? The minimum is this guy until they meet somehow on some surface and then this guy.

Is that convex? We have like one minute to answer that question. Absolutely no. It's got this bad kink in it. What about the maximum of the two functions? So the maximum is the one that is above, all the points or things that are above or on.

There is the maximum function. That was the minimum function. It had a kink. The maximum function is like that, and it is convex, so maximum yes, minimum no. OK, and we could have a maximum of 1,500 functions. If the 1,500 functions are all convex, the maximum will be, because it's the part way above everybody's graph, and that would be the graph of the maximum. OK, good.

And now finally, let me just say, how do you know whether a function is convex? How to test, how of test. OK, so let me take just a function of one variable. What's the test you learned in calculus, freshman calculus actually, just show that this is a convex function? What's the test for that?

AUDIENCE: Use second derivative.

GILBERT STRANG: Second derivative should be?

AUDIENCE: Positive.

GILBERT STRANG: Positive or possibly 0, so second derivative greater or equals 0 everywhere. That's convex. OK, final question, suppose F is a vector. So this is a vector, and so I have n functions of n variable. No, I don't. I have one, sorry, I've got one function, but I'm in n variables. So this was just one.

What's the test for convexity? So it would be passed, for example, by x1 squared plus x2 squared. Would it be passed by-- so here would be the question-- would it be passed by x transpose some symmetric matrix S? That would be a quadratic, a pure quadratic.

Would it be convex? What would be the test? I'm looking for an n dimensional equivalent of positive second derivative. The n dimensional equivalent of positive second derivative is convexity, and we have to recognize what's the test. So I could apply it to this function, or I could apply it to any function of n variables. It should be OK.

What's the test here? Here, I have a matrix instead of a number. So what's the requirement going to be? Times out, yeah? [INAUDIBLE] Positive definite or semidefinite, or semidefinite just as here. Yeah.

So the test is positive, semidefinite, Hessian. And here, the Hessian is actually that S, because the second derivatives will produce-- I'll put a 1/2 in there-- the second derivatives will produce S equal the Hessian H. So here, the S-- so positive semidefinite, Hessian in general, second derivative matrix for a quadratic.

OK. So its convex problems that we're going to get farther with. We run into no saddle points. We run into no local minimum. Once we found the minimum, it's the global minimum. These are the good problems. OK, again, happy to see you today, and I look forward to Wednesday.


# Calculus - Integrals

I have 3 questions, and I cannot find method that actually solves them.

1) Integral [(4s+4)/([s^2+1]*([S-1]^3))]

2) Integral [ 2*sqrt[(1+cosx)/2]]

3) Integral [ 20*(sec(x))^4

1. 👍
2. 👎
3. 👁
1. 1) expand in partial fractions.

2) Using cos(2x) = 2 cos^2(x) -1 derive a formula for cos(1/2 x) in terms of cos(x). Express the integrand in terms of cos(1/2 x)

3) [Notation: cos = c, sin = s]

1/c^4 = (s^2 + c^2)/c^4 =

1/c^2 + s^2/c^4

1/c^2 yields a tangent when integrated

To integrate s^2/c^4 do partial integration:

s^2/c^4 = s (s/c^4)

Integral of s/c^4 is 1/3 1/c^3

So, we need to integrate

1/c^3
times the derivative of of s, i.e. 1/c^2, but that is tan(x)!

Note that the way to solve such problems is not to systematically work things out in detail at first, because then you would take too long to see that a method doesn't work.

Instead, you should reason like I just did, i.e. forget the details, be very sloppy, just to see if things works out and you get an answer in principle, even though you need to fill in the details.

If you get better at this, you can do the selection of what method to use in your head, you'll see it in just a few seconds when looking at an integral. You can then start to work out the solution for real on paper.

1. 👍
2. 👎
2. Could you expand on #1 a bit more? I tried Partial Fractions, but I couldn't get a definite answer...

1. 👍
2. 👎
3. I'll show you how to do it without solving any equations.

The function is up to a factor 4:

f(s) = (s+1)/{(s^2+1)*[(s-1)^3]}

The partial fractions are precisely the singular terms when expanding around the singularities. So, let's examine the singularity at s = 1:

Put s = 1 + u and expand in powers of u, keeping only the singular terms:

f(1+u) = u^(-3) (2+u)/[(u+1)^2+1] =

u^(-3) (2+u)/(2+2u+u^2) =

u^(-3) (2+u)/2 1/(1+u+u^2/2) = (use
1/(1+x) = 1-x+x^2-x^3+...)

u^(-3) (2+u)/2 [1-u-u^2/2 +u^2+...]

=[u^(-3) + u^(-2)/2][1-u+u^2/2+...]

u^(-3) -1/2 u^(-2) + nonsingular terms

This means that in the neighborhood of s = 1 we have:

f(s) = 1/(s-1)^3 - 1/2 1/(s-1)^2 +.. nonsingular terms

f(s) also has singularities at s = i and s =-i. Around s = i, we have:

f(s) = a/(s-i) + nonsingular terms

Multiply both sides by (s-i) and take the limit s --> i to find a:

a = (i+1)/[2i(i-1)^3] =

-1/2 1/(i-1)^2

Around s = -i, we have:

f(s) = b/(s+i) + nonsingular terms

Multiply both sides by (s+i) and take the limit s --> -i to find b:

b = (-i+1)/[-2i(-i-1)^3] =

-1/2 1/[(i+1)^2]

The sum of all the singular terms of the expansions around the singular points is:

1/(s-1)^3 - 1/2 1/(s-1)^2 +

-1/2 1/(i-1)^2 1/(s-i)

-1/2 1/[(i+1)^2] 1/(s+i) =

1/(s-1)^3 - 1/2 1/(s-1)^2 +

1/2 1/(s^2+1)

This is the desired partial fraction decomposition. The proof of why this works is a consequence of Liouville's theorem

http://en.wikipedia.org/wiki/Liouville's_theorem_(complex_analysis)#Proof

Just consider the difference of f(s) and the sum of all the singular terms. The resulting function doesn't have any singularites and is bounded. So, by Liouville's theorem it is a constant. We know that f(s) and all the singular terms tend to zero, so that constant must be zero.

1. 👍
2. 👎

## Similar Questions

1. ### Calculus

If f(x) and g(x) are continuous on [a, b], which one of the following statements is true? ~the integral from a to b of the difference of f of x and g of x, dx equals the integral from a to b of f of x, dx minus the integral from a

2. ### calculus integrals

Evaluate the integral by making the given substitution. (Use C for the constant of integration. Remember to use absolute values where appropriate.) integral x^5/x^6-5 dx, u = x6 − 5 I got the answer 1/6ln(x^6-5)+C but it was

3. ### Calculus

Suppose the integral from 2 to 8 of g of x, dx equals 5, and the integral from 6 to 8 of g of x, dx equals negative 3, find the value of the integral from 2 to 6 of 2 times g of x, dx . 8 MY ANSWER 12 16 4

4. ### Calculus

Find the volume V of the solid obtained by rotating the region bounded by the given curves about the specified line. y= 2e^(−x), y= 2, x= 6; about y = 4. How exactly do you set up the integral? I know that I am supposed to use

1. ### calculus

1.Evaluate the integral. (Use C for the constant of integration.) integral ln(sqrtx)dx 2. Use the method of cylindrical shells to find the volume V generated by rotating the region bounded by the curves about the given axis. y =

2. ### Calculus check and help

Let f and g be the functions given by f(x)=1+sin(2x) and g(x)=e^(x/2). Let R be the shaded region in the first quadrant enclosed by the graphs of f and g. A. Find the the area of R. B. Find the value of z so that x=z cuts the

3. ### Physics, Calculus(alot of stuff together)= HELP!!

A rod extending between x=0 and x= 14.0cm has a uniform cross- sectional area A= 9.00cm^2. It is made from a continuously changing alloy of metals so that along it's length it's density changes steadily from 2.70g/cm^3 to

4. ### Calculus (math)

The volume of the solid obtained by rotating the region enclosed by y=1/x4,y=0,x=1,x=6 about the line x=−2 can be computed using the method of cylindrical shells via an integral. it would be great if you can just even give me

1. ### Calculus - Integrals

I have 3 questions, and I cannot find method that actually solves them. 1) Integral [(4s+4)/([s^2+1]*([S-1]^3))] 2) Integral [ 2*sqrt[(1+cosx)/2]] 3) Integral [ 20*(sec(x))^4 Thanks in advance.

2. ### Science

Hi, I have two questions about biology I need help with. 1) Some questions fall outside the realm of science, which of the following questions could not be answered using the scientific method? A)What is the function of the

3. ### Math

Consider the curve represented by the parametric equations x(t)= 2+sin(t) and y(t)=1-cos(t) when answering the following questions. A) Find Dy/Dx in terms of t B) Find all values of t where the curve has a horizontal tangent. C)

4. ### calculus

A question on my math homework that I can't seem to solve... Rotate the region bounded by y=x^2-3x and the x-axis about the line x=4. Set up the integral to find the volume of the solid. I'm pretty sure that the integral is in


# General Plotting Code for Cone in 3D with GLMakie or Plots

Hi all,

so I want to plot a general cone of pyramid and a right circular cone, I get this formula:

But I think the plotting does not use the volume formula. Because of this torus code for GLMakie that I have:

using GLMakie
using ColorSchemes
cmap3 = get(colorschemes[:plasma], LinRange(0,1,100))
cmap4 = [(cmap3[i],0.65) for i in 1:100]
ξ = -40:1:40
c = 20
a = 15
torus = [((hypot(X,Y)-c)^2+Z^2-a^2) for X in ξ, Y in ξ, Z in ξ]
volume(torus, algorithm = :iso,isovalue =100,isorange =50, colormap=cmap4)
current_figure()

For general cone of pyramid, If the based is made of a closed random curves, then we might need to plot in x-y plane the curves then plot the top of pyramid afterwards.

For the right circular cone, I believe there is a general formula already.

You could conveniently define both as parametric surfaces:

using Plots; plotlyjs()

z, Θ = range(0,10,200), range(0,2π,300)

# Right-cone:
X = [u * cos(v) for u in z, v in Θ]
Y = [u * sin(v) for u in z, v in Θ]
Z = [-2u for u in z, _ in Θ]
surface(X, Y, Z, size=(600,600), cbar=:none, legend=false)

# Trefoil cone:
X = [u/3 * (sin(v) + 2*sin(2v)) for u in z, v in Θ]
Y = [u/3 * (cos(v) - 2*cos(2v)) for u in z, v in Θ]
Z = [-2u for u in z, _ in Θ]
surface(X, Y, Z, size=(600,600), cbar=:none, legend=false)

1 Like

From your questions posted on this forum it seems that you are teaching math. Hence you should explain to your students how is parameterized a general cone,
defined by its vertex V, given as a 3 vector, and a closed (but not necessarily) planar curve,

x = x(u)
y = y(u)
z= b # b from base plane; usually b=0

u \in [\alpha, \beta]
.
The cone is generated by all segments of line connecting its vertex, V, with the points
(x(u), y(u), b), on the base curve.
Such a segment has the equations:
\displaystyle\frac{X-V[1]}{x(u)-V[1]} = \displaystyle\frac{Y-V[2]}{y(u)-V[2]} =\displaystyle\frac{Z-V[3]}{b-V[3]}=v
Hence:

X = v(x(u)-V[1])+V[1]
Y = v(y(u)-V[2])+V[2]
Z = v(b-V[3])+V[3]

u \in [\alpha, \beta], v\in[0,1]
Example:

vert=[0, 0.75, 3] #cone vertex
base = 0 #the cone base is included within the plane z=base (here z=0)
#functions that define the cone base parameterization
x(u) = cos(u)
y(u) = sin(u)+ sin(u/2);
m, n = 72, 30
u= range(0, 2π, length=m)
v = range(0, 1, length=n)
us = ones(n)*u'
vs = v*ones(m)'
#Surface parameterization
X = @. vs* (x(us)-vert[1]) + vert[1]
Y = @. vs* (y(us)-vert[2]) + vert[2]
Z = @. vs*(base-vert[3]) + vert[3];
surface(X, Y, Z, size=(600,600), cbar=:none, legend=false) #line copied from Rafael

2 Likes

Yes 100 for you, I was a Mathematics teacher for Junior High School students in Papua, but it was 2 years ago. Afterwards, I still love learning Mathematics even if I no longer teach, now I am learning the undergraduate Mathematics, from Calculus, It would be lovely to teach Math again in the future.

This is the first time I learn Calculus with Julia from bottom, it is rewarding knowing the application of this is enormous.

Thanks for this I will use your code and learn the parameterization, vertex, etc.

1 Like


# Root equation

#### Albert

##### Well-known member
$m,n \in N$

satisfying :

$\sqrt {m+2007}+\sqrt {m-325}=n$

find Max(n)

#### Bacterius

##### Well-known member
MHB Math Helper
Re: root equation

[JUSTIFY]Apply the variable substitution $u = m - 325$, and hence $m + 2007 = u + 2332$. We get:
$$\sqrt{u + 2332} + \sqrt{u} = n$$
For $n$ to be an integer, both square roots have to be integers*. So we are looking for two (positive) squares which differ by $2332$ units. That is, we need to solve:
$$x^2 - y^2 = 2332$$
Doing some factoring:
$$(x - y)(x + y) = 2^2 \times 11 \times 53$$
After some observation** we have the following solution pairs:
$$(x, y) \to \{ ( 64, 42), ~ (584, 582) \}$$
It follows that the only solutions for $u$ are $u = 42^2$ and $u = 582^2$. This gives $n = 106$ and $n = 1166$ (and $m = 2089$, $m = 339049$ respectively).

Therefore $\max{(n)} = 1166$. $\blacksquare$

* perhaps this part merits justification, you can check Square roots have no unexpected linear relationships | Annoying Precision which is pretty hardcore (perhaps a reduced argument suffices here) but I will take it that the question assumed this to be true. Other approaches which do not rely on this assumption would be interesting to see as well.

** this can be solved efficiently by using every reasonable factor combination for $x - y$ and deducing $x + y$ from it.[/JUSTIFY]

Last edited:

#### Opalg

##### MHB Oldtimer
Staff member
Re: root equation

As a slight variation on Bacterius's solution, take $u$ to be $m+841$ rather than $m-325$. The equation then becomes $$\sqrt{u+1166} + \sqrt{u-1166} = n.$$ Square both sides to get $$2u + 2\sqrt{u^2-1166^2} = n^2.$$ For an integer solution, $u^2-1166^2$ must be a square, say $u^2-1166^2 = w^2.$ Thus $(w,1166,u)$ is a pythagorean triple, which must be of the form $(p^2-q^2,\,2pq,\,p^2+q^2)$ for some integers $p,q$ with $p>q$. In particular, $1166=2pq$. But $1166 = 2*11*53$, so the only possibilities are $p=53,\ q=11$, or $p=583,\ q=1.$ That then leads to the same solutions as those of Bacterius.

Last edited:

##### Well-known member
Re: root equation

we have
(m+ 2007) – (m- 325) = 2332 ..1
√(m+2007)+√(m−325) = n ..(2) given

Dividing (2) by (1) we get

√(m+2007)-√(m−325) = 2332/n … (3)

And (2) and (3) to get 2 √(m+2007) = n + 2332/n

Now RHS has to be even so n is even factor of 2332/2 or 1166 hence largest n = 1166.

#### Albert

##### Well-known member
let :
$u^2=m-325-------(1)$
$(u+a)^2=m+2007-------(2)$
$(2)-(1):2332=a^2+2ua-----(3)$ (so a must be even)
max(n) must happen while a=2,so from (3) we have u=582
so max(n)=582+584=1166

#### Opalg

##### MHB Oldtimer
Staff member
Re: root equation

we have
(m+ 2007) – (m- 325) = 2332 ..1
√(m+2007)+√(m−325) = n ..(2) given

Dividing (2) by (1) we get

√(m+2007)-√(m−325) = 2332/n … (3)

And (2) and (3) to get 2 √(m+2007) = n + 2332/n

Now RHS has to be even so n is even factor of 2332/2 or 1166 hence largest n = 1166.
Very neat!

#### Albert

##### Well-known member
now ,find min(n)=?

##### Well-known member
now ,find min(n)=?
√(m+2007)+√(m−325) = n
put m- 325 = p (which is >=0)

we get √(p+2332)+√p which is >= sqrt(2332) >= 49

now we should look for lowest even factor of 2332(even : reason same as my previous solution) which is >= 49

now 2332 = 2 * 2 * 11 * 53 and lowest even factor of 2332 >= 49 is 2 * 53 = 106

#### Albert

##### Well-known member
let :
$u^2=m-325-------(1)$
$(u+a)^2=m+2007-------(2)$
$(2)-(1):2332=a^2+2ua-----(3)$ (so a must be even)
max(n) must happen while a=2,so from (3) we have u=582
so max(n)=582+584=1166
$2332=a^2+2ua=a(2u+a)=a\times n=2\times 1166=22\times 2\times53=22\times 106$
so max(n)=1166 ,and a=2
min(n)=106, and a=22
(here a,and n=2u+a are all even numbers)


# Math Help - Help again

1. ## Help again

Please explain how to solve this.

The product of two consecutive even integers is 168. Find the two integers.
Hint: Assume the first integer is x
Set up the equation first that satisfies the given condition. Then solve the equation.

This is the equation that i came up with. Ican t seem to get past

x(x+2)=168

x^2+2x-168=0 (i cant get past here)

Thanks,
Chester

2. Originally Posted by Chester

x(x+2)=168

x^2+2x-168=0 (i cant get past here)
Good job.
Find some factors of 168: 12 and 14
which diffrence is 2 thus,
$(x+14)(x-12)=168$
Thus,
$x=-14,x=12$

3. You could always fall back on the quadratic formula. I'd rather factor.

What 2 numbers when added equal 2 and when multiplied equal -168.

Let's see.......how about.....................-12 and 14. (-12)(14)=-168

-12+14=2

$x^{2}-12x+14x-168$

$(x^{2}-12x)+(14x-168)$

$x(x-12)+14(x-12)$

(x-12)(x+14)

4. Hello, Chester!

You did an excellent on job on the hard part: setting up the equation.

I assume you know to solve a quadratic equation
. . and that you know how to factor.
Did you run of factorings to try?

$x^2+2x-168\:=\:0$

We want two numbers with a product of 168 and a difference of 2.

Start dividing 168 by 1, 2, 3, . . .

$168 \div 1 = 168\quad\Rightarrow\quad 1\cdot168$

$168 \div 2 = 84\quad\Rightarrow\quad 2\cdot84$

$168 \div 3\;\;\text{ not exact}$

$168 \div 4 = 42\quad\Rightarrow\quad 4\cdot42$

$168 \div 5,\; 168 \div 6,\;\168 \div 7\;\;\text{ not exact}$

$168 \div 8 = 21\quad\Rightarrow\quad 8\cdot21$

$168 \div 9,\;168 \div 9,\;168\div 10,\;168\div11\;\;\text{ not exact}$

$168 \div 12 = 14\quad\Rightarrow\quad 12\cdot14\;\;\leftarrow$ There! a difference of 2

Therefore: . $x^2 + 2x - 168 \;= \;(x - 12)(x + 14)$

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

Of course, you can use the Quadratic Formula for factoring . . .

5. ## Thanks

Thanks again everyone.

I really appreciate the help!

Chester

6. I believe the answer is $12\cdot14$ not $(-12)\cdot14$
notice that negative 12 and 14 are not consecutive even integers.

7. Originally Posted by Quick
I believe the answer is $12\cdot14$ not $(-12)\cdot14$
notice that negative 12 and 14 are not consecutive even integers.
There two answers for $x$.
$x=12, x+2=14$ and $12\times 14=168$
And,
$x=-14,x+2=-12$ and $-14\times -12=168$


# Toronto Math Forum

## MAT244--2018F => MAT244--Tests => Quiz-7 => Topic started by: Victor Ivrii on November 30, 2018, 04:05:34 PM

Title: Q7 TUT 0201
Post by: Victor Ivrii on November 30, 2018, 04:05:34 PM
(a) Determine all critical points of the given system of equations.

(b) Find the corresponding linear system near each critical point.

(c) Find the eigenvalues of each linear system. What conclusions can you then draw about the nonlinear system?

(d)  Draw a phase portrait of the nonlinear system to confirm your conclusions, or to extend them in those cases where the linear system does not provide definite information about the nonlinear system.
\left\{\begin{aligned} &\frac{dx}{dt} = 1 - xy, \\ &\frac{dy}{dt} = x - y^3. \end{aligned}\right.

Bonus: Computer generated picture
Title: Re: Q7 TUT 0201
Post by: Yulin WANG on November 30, 2018, 04:39:52 PM
(a)

\left\{
\begin{array}{**lr**}
1-xy=0 &  \\
x-y^{3}=0\\
\end{array}
\right.

\left\{
\begin{array}{**lr**}
xy=1 &  \\
x=y^{3}\\
\end{array}
\right.

\left\{
\begin{array}{**lr**}
x=1 &  \\
y=1\\
\end{array}
\right.
or
\left\{
\begin{array}{**lr**}
x=-1 &  \\
y=-1\\
\end{array}
\right.

Therefore, the critical points are (1,1) and (-1,-1)
(b)
The Jacobian matrix of the vector field is:
\begin{align*}
J &= \begin{bmatrix}
-y & -x \\
1 & -3y^{2}
\end{bmatrix}\\
~\\
J(1,1) &= \begin{bmatrix}
-1 & -1 \\
1 & -3
\end{bmatrix}\\
~\\
J(-1,-1) &= \begin{bmatrix}
1 & 1 \\
1 & -3
\end{bmatrix}
\end{align*}
(c)
\begin{align*}
For (1,1), let A&= \begin{bmatrix}
-1 & -1 \\
1 & -3
\end{bmatrix}\\
~\\
A-\lambda I &= \begin{bmatrix}
-1-\lambda & -1 \\
1 & -3-\lambda
\end{bmatrix}\\
~\\
det(A-\lambda I) &=(\lambda+3)(\lambda+1)+1=0\\
~\\
\lambda_{1} &= \lambda_{2} = -2 \\
~\\
Then \ the \ system \ has \ a \ stable \ improper \ node \ at \ (1,1) \\
~\\
For (-1,-1), let A&= \begin{bmatrix}
1 & 1 \\
1 & -3
\end{bmatrix}\\
~\\
A-\lambda I &= \begin{bmatrix}
1-\lambda & 1 \\
1 & -3-\lambda
\end{bmatrix}\\
~\\
det(A-\lambda I) &=(\lambda+3)(\lambda-1)-1=0\\
~\\
\lambda = -1 \pm \sqrt{5} \\
~\\
Then \ the \ system \ has \ a \ unstable \ saddle \ point \ at \ (1,1) \\
\end{align*}
(d) In the attachment.
Title: Re: Q7 TUT 0201
Post by: Zhuojing Yu on November 30, 2018, 06:29:30 PM
I think when (1,1), it is node or spiral point, not IN(improper node).
Title: Re: Q7 TUT 0201
Post by: Jingze Wang on November 30, 2018, 08:31:23 PM
I think the phase portrait that Yulin drew is correct, here is computer generated picture since no one posted
Title: Re: Q7 TUT 0201
Post by: Yulin WANG on November 30, 2018, 11:13:57 PM
I think the phase portrait that Yulin drew is correct, here is computer generated picture since no one posted
Thanks for submitting the computer-generated phase portrait!!!
BTW, how do u plot the phase portrait on a computer?
Title: Re: Q7 TUT 0201
Post by: Victor Ivrii on December 01, 2018, 03:57:59 AM
Sure, it is improper node. Jingze finally got a decent computer generated picture (took a correct range of variables)

Syllabus lists several free sites. My favourite -- downloadable pplain java applet


# What does it mean to be proportional to something?

I am asked a physics homework question, but it is really simply a mathematical question I think, dealing with proportional reasoning.

The period of a pendulum is proportional to the square root of its length.

A pendulum of length $2$ has a period of $3$.

They give units but it really should not matter here.

What I have done is written this down, and I am not really sure the first step is the correct one, because I am unsure how to read the question:

$$3P_1 = \sqrt 2$$

$$P_1 = \frac{\sqrt 2}{3}$$

They want to know about a pendulum of length $4.5$ so,

$$xP_2 = \sqrt {4.5}$$

My reasoning then is that:

$$\frac{\sqrt 2}{3} = \frac{\sqrt{4.5}}{x}$$

$$xP_2 = \frac{3\sqrt{4.5}}{\sqrt 2} = 4.5$$

I never really deal with proportional reasoning, so I am going out on a limb here to make this connection, but it all seems very intuitive. Of course, my intuition is not always right. My question then is, am I doing this right? Is this good reasoning?

-

Hint:

Take T to be the time period of the pendulum.

$T_1 = k \cdot \sqrt {l_1}$

$T_2=k \cdot \sqrt{l_2}$

When you divide them both(Since none of the terms are $0$)

$\dfrac{T_1}{T_2}= \sqrt{\dfrac{l_1}{l_2}}$

Note: When L is proportional to M, you can write it as L=k. M, where k is a constant.

-
Hm that is interesting, and it confirms my answer when I use the k, that really helps too. It is truly discomforting that my brain does all that without informing me how it was done.. Many thanks! –  Leonardo Apr 7 '13 at 10:56
You're Welcome. And do note that there might be many cases of proportionality, when you come across Gravitational force (or maybe coulomb's force), you come across 'inversely proportional to'. –  Inceptio Apr 7 '13 at 10:59
It may be noted that here the actual value of k is 2*pi/sqrt(g) where g is accelaration due to gravity. –  Sreekanth Karumanaghat Apr 7 '13 at 11:24
@SreekanthKarumanaghat: That really doesn't matter when you have two relations, cause: they just scare off each other. –  Inceptio Apr 7 '13 at 11:50
Yeah I know that I was just noting for info sake :) –  Sreekanth Karumanaghat Apr 7 '13 at 12:08

The correct meaning of propotional:- If x is directly propotional to y. x/y = k(a constant)

Analytically

Graph between x and y is straight line whose slope is k.

Applying the above formula here. T1 = k sqrt(L1) T2 = k sqrt(L2)

dividing 2 by 1,we get T1/T2 = sqrt(L1)/sqrt(L2)

3/T2 = sqrt(2)/sqrt(4.5)

T2 = sqrt(4.5)*3/sqrt(2)

T2 = 4.5

-


# Recursion question

The first two terms of a sequence are $a_1 = 1$ and $a_2 = \frac {1}{\sqrt3}$. For $n\ge1$,

$$a_{n + 2} = \frac {a_n + a_{n + 1}}{1 - a_na_{n + 1}}.$$ What is $|a_{2009}|$?

So I tried (thanks to Paul Wellin):

fun[n_] := Module[{prev = 1, this = 1/Sqrt[3], next},
Do[next = Simplify[(prev + this)/(1 - prev this)];
prev = this;
this = next, {n - 1}];
prev]

And I got:

fun[2009]

(* 0 *)

Which is the correct answer. Kind of amazed it went so quickly. I then tried:

Table[fun[i], {i, 1, 100}]

Which produces the first 100 terms of the sequence. Again, amazingly quick. Now, this turns out to be a periodic sequence. I counted with my finger, and determined 24.

Anyone have a good way to use Mathematica to determine if the sequence is periodic and find the period?

• mathematica.stackexchange.com/questions/80163/… – Marvin Dec 5 '15 at 9:31
• Entirely different method: Recognize the recursion as the sum of angles formula for tangent. Set $\tan \theta_{n} = a_n$ so $\theta_1 = \pi/4$, $\theta_2 = \pi/6$, and $\theta_{n+2} = \theta_n + \theta_{n+1}$. This is a much easier recurrence... – Eric Towers Dec 5 '15 at 19:08
• @EricTowers Could you add this as an answer? I'd love to see what you do. – David Dec 6 '15 at 3:33

One way of doing this is starting with your list of the first 100 terms.Then ask for

zzz = SequencePosition[lst, Take[lst, -2]]

(* {{3, 4}, {27, 28}, {51, 52}, {75, 76}, {99, 100}} *)

The length of this result is larger than 1, so your list must be periodic. The period is

zzz[[2, 1]] - zzz[[1, 1]]

(* 24 *)

• thank you introducing me to SequencePosition – ubpdqn Dec 5 '15 at 10:56
• @FredSimons I agree, really simple explanation to help students with exploration. Thanks. – David Dec 5 '15 at 18:19

Started as a comment to the OP. Turning this into an answer was requested. The OP asked for Mathematica help solving the recurrence. I suggested recognizing that the recurrence was the sum of angles formula for tangent, then going from there. Consequently, this answer uses Mathematica to solve this problem using only one "external" ingredient right at the beginning. (At the end, we explore a claim made at the beginning.)

Problem: Find the period of \begin{align} a_1 &= 1 \\ a_2 &= \frac{1}{\sqrt{3}} \\ a_{n+2} &= \frac{a_n + a_{n+1}}{1-a_n a_{n+1}}, n \geq 1 \end{align}

(It would be seriously convenient if FunctionPeriod[] just did this. We could "punt" and use the accepted answer here, applying it to the straightforward implementation of the above recursion and initial values. However, that's not what I'm here to write.)

"External" fact: The recursion is the sum of angles formula for tangent.

Claim at the beginning: We could replace the recursion formula with the analog for any other sum of angles formula and get exactly the same sequence of angles. I.e., there are at least two other recursions with this same solution.

First, we check this external fact with Mathematica and get the initial values.

Simplify[Tan[a+b] == (Tan[a] + Tan[b])/(1-Tan[a]Tan[b])
(*  True  *)
ArcTan[1]
(*  Pi/4  *)
ArcTan[1/Sqrt[3]]
(*  Pi/6  *)

So we may reformulate the question as \begin{align} \theta_1 &= \frac{\pi}{4} \\ \theta_2 &= \frac{\pi}{6} \\ \theta_{n+2} &= \theta_1 + \theta_2 \pmod{2\pi}, n \geq 1 \end{align}

Sums of multiples of $\pi/4$ and $\pi/6$ have denominators dividing $12$.

LCM[4,6]
(*  12  *)

There are $24$ twelfths of $\pi$ in a circle.

2 Pi / (Pi/12)
(*  24  *)

Consequently, the period of this recurrence is at most $24^2$. (The recurrence is order $2$, so it is perhaps better to think of each adjacent pair of sequence members producing the next adjacent pair of sequence members.) (Although, as is frequently the case with homogeneous recurrences, if $\dots 0, 0 \dots$ occurs in our sequence, every subsequent angle is zero. So it is possible for the period to be less than $24$ and for there to be an initial aperiodic part, say if $\theta_1 = \theta_2 = \pi$, although it will turn out that this is not the case in this problem.)

So we generate the first $2 \times 24^2$ entries, which will contain two or more periods.

Remove[q];
q[1] = Pi/4;
q[2] = Pi/6;
q[n_ /; n >= 3] := q[n]= Mod[q[n-1]+q[n-2],2 Pi];
(* We memoize members of the sequence to avoid redundant recomputation. *)

Generate the $2 \times 24^2$ entries and glance at some of them to see if periodicity seems likely.

Table[ {k, q[k]} , {k, 24, 2*24^2, 24} ]
(*  {{ 24, 23 Pi/12 }, { 48, 23 Pi/12 }, ... , {1152, 23 Pi/12 }}  *)

Seems rather likely to be periodic. Test this with Fourier[]:

periods = Flatten[
Position[
Chop[Fourier[Table[q[k], {k, 1, 2*24^2}]]],
n_ /; n != 0
]
]
(*  {1, 49, 97, 145, 193, 241, 289, 337, ... , 1009, 1057, 1105}  *)
GCD @@ Select[DeleteDuplicates[Flatten[
Outer[Abs[#1 - #2] &, periods, periods]
]], # > 0 &]
(*  48  *)

So the period divides $48$. (Actually, we could know that it divides $24$. We ran to $2 \times 24^2$. Try it again with $3 \times 24^2$ and get $72$. In fact, if we run to $N \times 24^2$ for $N$ up to $24$, we'll get $24N$ for the GCD above.)

Let's have Mathematica try every divisor of $48$ as a candidate period.

{#, Simplify[q[3 + #] == q[3]]} & /@ Divisors[48]
(*  {{1, False}, {2, False}, {3, False}, {4, False},
{6, False}, {8, False}, {12, False}, {16, False},
{24, True}, {48, True}}  *)

so the only candidate periods are $24$ and $48$. (Note that starting at q[3], we're finding out about the recursion moreso than the initial values.) Then we test the shortest candidate:

q /@ Range[24] == q /@ Range[25, 2*24]

The above method works, and is valid, but perhaps one would be happier seeing that the recurrence actually recurs after $24$ steps. Starting with the symbolic first two angles $a,b$, what is the resulting angle after (a divisor of $24$) applications of the recursion rule. We frame this as working on pairs in Nest[].

TableForm[
{#[[1]], #[[2]] === {a, b}, #[[2]]} & /@ (
{#, PolynomialMod[
Nest[
(* Thinking in pairs, the new first angle is the old second
angle and the new second angle is the sum of the two old
angles. *)
{#[[2]], #[[1]] + #[[2]]} &,
{a, b},
#],
#]} & /@
Divisors[24]),
TableDepth -> 1
]
(*  { { 1, False, {0, 0}},
{ 2, False, {a + b, a}},
{ 3, False, {a + 2 b, 2 a}},
{ 4, False, {2 a + 3 b, 3 a + b}},
{ 6, False, {5 a + 2 b, 2 a + b}},
{ 8, False, {5 a + 5 b, 5 a + 2 b}},
{12, False, {5 a, 5 b}},
{24,  True, {a, b}} }  *)

So the recursion has a natural period of $24$. It's possible for the choice of initial conditions to cause the period to be shorter. (Recall that if the first two angles are $0,0$, then the sequence is all zeroes.) So we check for this. The resulting period still has to divide $24$, so we only check those (although if we were not certain of this, we could check every period up to $24$).

TableForm[
{ #[[1]] , #[[2]] == #[[3]] , #[[2]] , #[[3]] } & /@ (
{ # , {q[1], q[2]}, {q[1 + #], q[2 + #]} } & /@
Divisors[24]
),
TableDepth -> 1]
(*  { { 1, False, {Pi/4, Pi/6}, {  Pi/ 6,  5 Pi/12}},
{ 2, False, {Pi/4, Pi/6}, {5 Pi/12,  7 Pi/12}},
{ 3, False, {Pi/4, Pi/6}, {7 Pi/12,    Pi   }},
{ 4, False, {Pi/4, Pi/6}, {  Pi   , 19 Pi/12}},
{ 6, False, {Pi/4, Pi/6}, {7 Pi/12,    Pi/ 6}},
{ 8, False, {Pi/4, Pi/6}, {3 Pi/ 4, 11 Pi/12}},
{12, False, {Pi/4, Pi/6}, {  Pi/ 4,  5 Pi/ 6}},
{24,  True, {Pi/4, Pi/6}, {  Pi/ 4,    Pi/ 6}} }  *)

And so the period is $24$. Then it's easy to compute the desired number:

Tan[q[Mod[2009,24,1]]]  (*Don't want to inadvertently try to evaluate q[0]. *)
(* This is Tan[ q[17] ] = Tan[ Pi ]. *)
(*  0  *)

The original problem statement asked about $|a_{2009}|$ but since $0 = |0|$, there's no need to apply the absolute value function.

Returning to the claim at the beginning. Since adding angles is pretty straightforward, we can use any other sum of angles formula. This means there are (at least) two other recursion problems looking wildly different from this one (by having a wildly different looking general recursion formula), but having the same underlying computation. The sum of angles formulas for sine and cosine are, with the corresponding recursion: \begin{align} \sin(\theta_1 + \theta_2) &= \sin(\theta_1) \cos(\theta_2) + \cos(\theta_1) \sin(\theta_2) \\ a_{n+2} &= a_n c(a_{n+1}) \sqrt{1-a_{n+1}^2} + a_{n+1} c(a_n) \sqrt{1-a_n^2} \\ \\ \cos(\theta_1 + \theta_2) &= \cos(\theta_1)\cos(\theta_2) - \sin(\theta_1)\sin(\theta_2) \\ a_{n+2} &= a_n a_{n+1} - s(a_n)s(a_{n+1}) \sqrt{1-a_n^2}\sqrt{1-a_{n+1}^2} \end{align} where the sign-tracking functions $s$ and $c$ are $s(\theta)$ is $1$ in quadrants I and II and the angle $\pi/2$ and is $-1$ otherwise, and $c$ is $1$ in quadrants I and IV and the angle $0$ and is $-1$ otherwise. We could eliminate these two sign-tracking functions by having two sequences, $q_n$ and $r_n$: $a_n \mapsto (q_n, r_n) = (\sin(\theta_n), \cos(\theta_n))$ or by switching to exponentials $a_n \mapsto \mathrm{e}^{\mathrm{i} \theta_n} = \cos(\theta_n) + \mathrm{i}\sin(\theta_n)$, which the final equality shows is really the same as switching to sines and cosines, but using real and imaginary parts of complex numbers to hold the two sequences, instead of pairs of real numbers.

Taking $\theta_1 = \pi/4$ and $\theta_2 = \pi/6$ and using either the sum of angles for sine or for cosine, we get the same sequence of angles. Consequently, we will get a final, final answer of $a_{2009} = \tan^{-1}(\sin(\theta_{2009})) = 0$ for the sine recursion and similarly for the cosine recursion. (Whether you take the simple recurrence $\theta_{n+2} = \theta_n + \theta_{n+1}$ and obscure it via sines, cosines, tangents, or, I suppose, other periodic functions, like Weierstrass's $\wp$-functions, you still get the same sequence of fractions of the functions's period(s), and the same period of the recurrence.)

• +1, but the recurrence you display for the sine and cosine is in fact numerically unstable, and thus cannot be recommended in general. – J. M. will be back soon Dec 10 '15 at 5:18
• @J.M. : I agree in part. If we're going to talk about stability, the initial tangent recursion isn't stable either. Replace $a_{n+1}$ by $a_{n+1}+\varepsilon$ and expand in powers of $\varepsilon$ and find that the error is magnified by $\frac{1+a_n^2}{(1-a_n a_{n+1})^2}$. This is harder to interpret than doing the same thing to the tangent version, yielding $1+\tan^2(a_n + a_{n+1})$, which is necessarily $\geq 1$. So the instability is baked into the problem and the alternate recursions are merely reflecting it. – Eric Towers Dec 10 '15 at 17:11

You can use NestWhileList to show the same pair of consecutive elements appear and then determine the period, e.g.

res = NestWhileList[{#[[2]],
Simplify[(#[[1]] + #[[2]])/(1 - #[[1]] #[[2]])]} &, {1,
1/Sqrt[3]}, Unequal, All];
plt = (Most@(First /@ res))~Join~(Style[#, Red, Bold] & /@ res[[-1]])
Length[plt] - 2
ListPlot[plt~Join~res[[1]], Joined -> True]

I add this as a separate answer to amplify another answer,in relation to $\tan(x+y)$.

This sequence could be pursued as Fibonacci or linear recurrence of angles,e.g.

mp[n_] :=
Mod[MatrixPower[{{1, 1}, {1, 0}}, n].{Pi/6, Pi/4}, Pi, -Pi/2];
an[1] := mp[0][[2]];
an[2] := mp[0][[1]];
an[n_?(# > 2 &)] := First@mp[n - 2]
os[n_] := Tan[an[n]];
SequencePosition[an /@ Range[1, 26], {Pi/4, Pi/6}]
os /@ Range[26]

I exploited Fred Simons SequencePosition (yielding: {{1, 2}, {25, 26}}) and the last line reproduces the original sequence:

$\left\{1,\frac{1}{\sqrt{3}},\sqrt{3}+2,-\sqrt{3}-2,0,-\sqrt{3}-2,-\sqrt{3}-2,\frac{1}{\sqrt{3}},-1,\sqrt{3}-2,-\sqrt{3},-\sqrt{3}-2,1,-\frac{1}{\sqrt{3}},2-\sqrt{3},\sqrt{3}-2,0,\sqrt{3}-2,\sqrt{3}-2,-\frac{1}{\sqrt{3}},-1,-\sqrt{3}-2,\sqrt{3},\sqrt{3}-2,1,\frac{1}{\sqrt{3}}\right\}$

A quick visual inspection helps to see how a pattern with period 24 pops up

n = 100;

tab = Table[fun[i], {i, 1, n}];

pos = Flatten @ Position[tab, First @ tab]

{1, 13, 25, 37, 49, 61, 73, 85, 97}

tra = Transpose[{pos, Array[First @ tab &, Length @ pos]}];

ListPlot[{tab, tra}, GridLines -> {pos[[;; ;; 2]], None}]

I rewrote the code to produce a list of the current "state" of the recursion, which is given by the last two terms $(a_n,a_{n-1}$. The system is autonomous, so the state is completely determined by this pair. Therefore if a pair ever occurs again, there is a loop.

Some utility functions:

step =           (* basic recursive step *)
{Last[#], Simplify[Plus @@ #/(1 - Times @@ #)]} &;
steps[n_] :=     (* equivalent to fun[n], except it returns a list of all states *)
NestList[step, {1, 1/Sqrt[3]}, n];
findloop[] :=    (* like steps[n], except it runs until a loop is found; caveat forever *)
NestWhileList[step, {1, 1/Sqrt[3]}, UnsameQ, All];

First proof:

gr = Rule @@@ Partition[findloop[], 2, 1] // Graph;
cycle = First@FindHamiltonianCycle[gr];
Length@cycle
HighlightGraph[gr, PathGraph[cycle]]

Less fussy proof, assuming you can make a good guess (i.e. 24):

Rule @@@ Partition[steps[24], 2, 1] // Graph
(* graph similar to above, but without highlighting *)

Even less fussy, assuming you can make a sufficient guess (i.e. 100):

gr = Rule @@@ Partition[steps[100], 2, 1] // Graph
Length@VertexList[gr]
(*
graph similar to above, but with multiple edges
24  <-- number of vertices == period
*)

Here is a translation of Brent's algorithm for finding the length of a cycle. See Brent, doi:10.1007/BF01933190 (1980). This could be compiled when step can be compiled for cases where a loop is long or occurs a long way down the sequence.

brentcyclelength[step_, x0_, ρ_: 2, u_: 0] :=
Module[{x, y, r, j, k, done = False},
y = x0;
r = ρ^u;
k = 0;
While[! done,
x = y;
j = k;
r = ρ*r;
While[! done && k < r,
k++;
y = step[y];
done = x == y
];
];
k - j
]

brentcyclelength[step, {1, 1/Sqrt[3]}]
(*  24  *)


# Picture/intuitive proof of $\cos(3 \theta) = 4 \cos^3(\theta)-3\cos(\theta)$?

Is there a nice geometric, intuitive or picture proof as to why the easily algebraically provable identity $\cos(3 \theta) = 4 \cos^3(\theta)-3\cos(\theta)$ is true?

Note I'm not looking for a computational proof like the one linked to, more a proof without words or intuitive style proof, thanks.

Enhancing my diagram for the angle-sum formula (currently featured in Wikipedia) to use three angles will get you pretty close ...

Thus,

\begin{align} \cos(\alpha+\beta+\gamma) &= \cos\alpha \cos\beta \cos\gamma - \sin\alpha \sin\beta \cos\gamma - \sin\alpha \cos\beta\sin\gamma - \cos\alpha \sin\beta\sin\gamma \\ \sin(\alpha+\beta+\gamma) &= \sin\alpha \cos\beta \cos\gamma + \cos\alpha \sin\beta \cos\gamma + \cos\alpha \cos\beta \sin\gamma - \sin\alpha \sin\beta \sin\gamma \end{align}

With $\alpha = \beta = \gamma = \theta$, these become ... \begin{align} \cos 3\theta &= \cos^3\theta - 3 \sin^2\theta \cos\theta \\ \sin 3\theta &= 3\cos^2\theta \sin\theta - \sin^3\theta \end{align} ... which the Pythagorean identity helps us rewrite as ... \begin{align} \cos 3\theta &= \cos^3\theta - 3 (1-\cos^2\theta) \cos\theta = 4\cos^3\theta - 3 \cos\theta \\ \sin 3\theta &= 3(1-\sin^2\theta) \sin\theta - \sin^3\theta = 3\sin\theta - 4\sin^3\theta \end{align}

Off-hand, I don't know of a diagram that goes directly from $\cos 3\theta$ to $4\cos^3\theta-3\cos\theta$.

• That is absolutely amazing. – bobby Jun 30 '14 at 13:29
• Very colorful! =) – Arnie Bebita-Dris Sep 4 '14 at 12:36
• I just love it when someone has the time and effort to make a truly helpful and fascinating visual explanation. Sometimes when the numbers and letters just swim around, a picture can be very helpful – Asimov Sep 4 '14 at 14:17
• How do you get something featured on Wikipedia? Do you submit it somewhere and then wait for someone to place it on an article? – étale-cohomology Aug 9 '17 at 22:31
• @étale-cohomology: The "wiki" in "Wikipedia" indicates that the content is user-editable. Anybody can go in and make improvements. As for my diagrams: I'd posted them here, and then someone posted "similar" versions to Wikipedia (without credit or notice); someone from here at Math.SE edited the post so that I'd get credit. (Thanks again @ChrisSherlock!) I, myself, recently went in and edited the article's description of those diagrams and provided a link to my new website for such things in the article's list of references. – Blue Aug 9 '17 at 23:00

Assemble four congruent right triangles with hypotenuse $1$ and angle $\theta$ as shown:

In the diagram, the marked angles are all $\theta$. Since $OQ = \cos\theta$, we have $OU = \cos^2\theta$, so $OS = 2\cos^2\theta$, and so $$OS' = 2\cos^3\theta$$ On the other hand, $$OS' = OP' + P'Q' + Q'S' = \cos(3\theta) + P'Q' + \cos(\theta)$$ and $$OS' = OR' - Q'R' + Q'S' = \cos(\theta) - Q'R' + \cos(\theta)$$ Since $P'Q' = Q'R'$, adding these together yields $$\cos(3\theta) + 3\cos(\theta) = 2OS' = 4\cos^3\theta$$

I hope the diagram is reasonably self-explanatory, that it's clear what needs to be proved to justify the steps of the argument, and that it's easy to prove those things once you've identified them. But if I've misjudged this, let me know and I'll fill in some more details.

I don't think it is a very good idea to try an find a geometric picture for every trig identity because that would take exceedingly long. I will show you that your formula comes from the idea that a rotation by $n\theta$ is equal to $n$ rotations by $\theta$.

Denote $\langle a,b\rangle$ as the vector to the ordered pair $(a,b)$. We will discuss rotations of these vectors. First, consider that the rotation of the vector $\langle 1,0\rangle$ by an angle of $\theta$ is given by $\langle \cos\theta,\sin\theta\rangle$. Similarly, rotation of the vector $\langle 1,0\rangle$ by $3\theta$ is given by $\langle \cos(3\theta),\sin(3\theta)\rangle$.

I will now define a new type of multiplication between vectors. Let $$\langle a,b\rangle\ltimes\langle c,d \rangle = \langle ac-bd,ac+bc\rangle$$

It so happens that if the vector $\langle a,b\rangle$ makes an angle $\phi_1$ with the horizontal and $\langle c,d \rangle$ makes an angle $\phi_2$ then $\langle a,b\rangle\ltimes\langle c,d \rangle$ makes an angle $\phi_1 + \phi_2\!$. Using this, there is another way to find the rotation of a vector by $3\theta$. We can rotate it three times by $\theta$ rather than rotating it once by $3\theta$. In other words, we will find $\left(\langle \cos\theta,\sin\theta \rangle \ltimes \cos\theta,\sin\theta \rangle\right) \ltimes \cos\theta,\sin\theta \rangle.$ Using this, one could suspect that \begin{align}\langle \cos(3\theta),\sin(3\theta)\rangle &= \left(\langle \cos\theta,\sin\theta \rangle \ltimes \cos\theta,\sin\theta \rangle\right) \ltimes \cos\theta,\sin\theta \rangle \\ &= \langle \cos^2\!\theta-\sin^2\!\theta,2\sin\theta\cos\theta\rangle \ltimes \langle \cos\theta, \sin\theta \rangle \\ &= \langle \cos^{3}\!\theta-\sin^2\!\theta\cos\theta-2\!\sin^2\!\theta\!\cos\theta, 2\!\sin\theta\!\cos^2\!\theta+\sin\theta\cos^2\!\theta-\sin^3\!\theta\rangle \\ &=\langle 4\cos^3\!\theta-3\cos\theta,3\sin\theta-4\sin^3\!\theta\rangle\end{align}

Where the last step follows from the Pythagorean identities. If we then equate the first elements and the second elements we find the familiar results

\begin{align} \cos(3\theta) &= 4\cos^3\!\theta-3\cos\theta \\ \sin(3\theta) &= 3\sin\theta-4\sin^3\!\theta\end{align}

This is essentially a result of complex numbers and is called De moivre's formula. You can see it being used to prove your identity here. Our type of multiplication mirrors complex multiplication which is inherently rotational in nature. You can see why here. De moivre's formula says that a rotation by $n\theta$ is equal to $n$ rotations by $\theta$.

The best geometric proof of your formula comes from this basic idea which is so simple that no picture is needed to represent it.

This is advantageous because it can be used to show other identites such as $$\cos(5\theta) = 16 \cos^5\! \theta - 20 \cos^3 \!\theta + 5 \cos \theta$$

• This is neither geometric nor intuitive and doesn't address the question in a natural way at all. – beep-boop Jul 2 '14 at 22:14
• @alexqwx: most of the proofs, including those using De Moivre's, are geometrically based. However, it is hard to find any that I would call intuitive. – robjohn Jul 7 '14 at 0:18

This is not a direct proof but a link to the Fourier series: $4\cos^3\theta=3\cos\theta+\cos3\theta$.

Similarly, for the fifth power: $16\cos^5\theta=10\cos\theta+5\cos3\theta+\cos5\theta$.

The main lesson is that to represent the $k^{th}$ power, the odd harmonics from $1$ to $k$ suffice.

The explanation is not so difficult: the Fourier coefficients are computed from the integrals $$\int_0^{2\pi}\cos^k\theta\ e^{in\theta}d\theta=\int_0^{2\pi}\left(\frac{e^{i\theta}-e^{-i\theta}}2\right)^ke^{in\theta}d\theta.$$ When developing, the lowest exponent of $e^{i\theta}$ is $n-k$. If $n>k$, the integrand is oscillatory and the integral vanishes.

If you admit that, then $\cos^3\theta=a\cos\theta+b\cos3\theta$.

From the figure, at $\theta=0$ the values add up to $1$ and at $\theta=\pi/2$ the slopes cancel out, so that $$a+b=1\\a-3b=0,$$ $$\cos^3\theta=\frac34\cos\theta+\frac14\cos3\theta.$$

Similarly, $\cos^5\theta=a\cos\theta+b\cos3\theta+c\cos5\theta$, at $\theta=0$ the values add up to $1$ and at $\theta=\pi/2$ the first and third derivatives cancel out, so that $$a+b+c=1\\ a-3b+5c=0\\ a-27b+125c=0,$$ $$\cos^5\theta=\frac{10}{16}\cos\theta+\frac{5}{16}\cos3\theta+\frac{1}{16}\cos5\theta.$$

yes.you can write: $cos(3\theta) = cos(2\theta +\theta)$ =$$cos(2\theta)cos(\theta) - sin(2\theta)sin\theta$$ =$$2cos^3(\theta)-cos \theta -sin(2\theta) sin(\theta)$$=$$2cos^3\theta -cos\theta -2sin^2\theta cos\theta$$=$$2cos^3\theta - cos \theta - 2(cos\theta -cos^3 \theta)$$ so we have : $$4cos^3\theta -3cos\theta$$

• I've already linked to an easy algebraic proof, I'm hoping for a more intuitive, geometric and less computational proof. – bobby Jun 30 '14 at 12:10
• sorry I do not see it .for picture you can use Matlab software. – user157745 Jun 30 '14 at 12:16


IntMath Home » Forum home » Methods of Integration » Find integral sqrt (x^2 + 1) using trigonometric substitution

# Find integral sqrt (x^2 + 1) using trigonometric substitution [Solved!]

### My question

Find int sqrt (x^2 + 1) dx with limits of integration from 0 to 1 using Trigonometric Substitution.

### Relevant page

8. Integration by Trigonometric Substitution

### What I've done so far

I used x = tan theta and dx = sec^2 theta d theta.

Replacing x and dx gives sqrt (tan^2 theta + 1) sec^2 theta = sqrt (sec^2 theta) sec ^2 theta = sec ^3 theta d theta.

I looked up the integral of sec ^3 theta and converted tan, sec, sin, and cos in the formula by drawing a triangle based on x = tan theta and arrived at .57155 and not 1.15.

X

Find  int sqrt (x^2 + 1) dx with limits of integration from 0 to 1 using Trigonometric Substitution.
Relevant page

8. Integration by Trigonometric Substitution

What I've done so far

I used x = tan theta and dx = sec^2 theta d theta.

Replacing x and dx gives sqrt (tan^2 theta + 1)  sec^2 theta = sqrt (sec^2 theta)  sec ^2 theta = sec ^3 theta d theta.

I looked up the integral of sec ^3 theta and converted tan, sec, sin, and cos in the formula by drawing a triangle based on x = tan theta and arrived at .57155 and not 1.15.

## Re: Find integral sqrt (x^2 + 1) using trigonometric substitution

@phinah: Good on you for using the math entry system! (I tidied up some of the math expressions.)

Just a small (but important) point - don't miss out the "d theta" parts in your second line. It should be:

Replacing x and dx gives sqrt (tan^2 theta + 1) (sec^2 theta) d theta = sqrt (sec^2 theta) (sec ^2 theta) d theta = sec ^3 theta d theta.

Now, to give you a hint about why your final number is not correct (I'm guessing 1.15 comes from the Answers in your text book, right?).

When we change x to tan theta and x goes from 0 to 1, what will theta's lower and upper values be?

X

@phinah: Good on you for using the math entry system! (I tidied up some of the math expressions.)

Just a small (but important) point - don't miss out the "d theta" parts in your second line. It should be:

Replacing x and dx gives sqrt (tan^2 theta + 1)  (sec^2 theta) d theta = sqrt (sec^2 theta)  (sec ^2 theta) d theta = sec ^3 theta d theta.

Now, to give you a hint about why your final number is not correct (I'm guessing 1.15 comes from the Answers in your text book, right?).

When we change x to tan theta and x goes from 0 to 1, what will theta's lower and upper values be?

## Re: Find integral sqrt (x^2 + 1) using trigonometric substitution

theta = arctan (0) = 0

theta = arctan (1) = .7853

X

theta = arctan (0) = 0

theta = arctan (1) = .7853

## Re: Find integral sqrt (x^2 + 1) using trigonometric substitution

Also this is not a textbook exercise. This is from your website, the question at the end of the Integration chapter, section 4: The Definite Integral. You state it can be solved via Trigonometric Substitution but you solved it using the Trapezoidal Rule in section 5. Thanks.

X

Also this is not a textbook exercise.  This is from your website, the question at the end of the Integration chapter, section 4: The Definite Integral. You state it can be solved via Trigonometric Substitution but you solved it using the Trapezoidal Rule in section 5. Thanks.

## Re: Find integral sqrt (x^2 + 1) using trigonometric substitution

Ahh, I see. Thanks for giving me the context.

Your lower and upper values are correct. Now substitute those in the integral of sec^3 theta you found from the table.

X

Ahh, I see. Thanks for giving me the context.

Your lower and upper values are correct. Now substitute those in the integral of sec^3 theta you found from the table.

## Re: Find integral sqrt (x^2 + 1) using trigonometric substitution

Leaving it in terms of theta:

int sec^3 theta d theta from 0 to .7853

According to Wolfram, the integral formula is

1/2[tan theta sec theta {: - ln (cos {:theta/2:} - sin {:theta /2:}) {: + ln (sin {:theta/2:} + cos {:theta/2:})]

Therefore, 1/2 [tan .7853\ sec .7853  {:- ln (cos .7853/2 - sin .7853/2) {: + ln (sin .7853/2 + cos .7853/2)]  - 1/2 [0 - ln (1-0) + ln (0+1) ]

= 1/2[tan .7853\ sec .7853 {: - ln (cos .7853/2 - sin .7853/2) {: + ln (sin .7853/2 + cos .7853/2)]  - [0]

=1.15

which is the web site's answer using the Trapezoidal Rule!

Thank you for the guidance.

Note: concerning how theta is written above, I wrote it out in Word.

X

Leaving it in terms of theta:

int sec^3 theta d theta from 0 to .7853

According to Wolfram, the integral formula is

1/2[tan theta sec theta {: - ln (cos {:theta/2:} - sin {:theta /2:}) {: + ln (sin {:theta/2:} + cos {:theta/2:})]

Therefore, 1/2 [tan .7853\ sec .7853  {:- ln (cos .7853/2 - sin .7853/2) {: + ln (sin .7853/2 + cos .7853/2)]  - 1/2 [0 - ln (1-0) + ln (0+1) ]

= 1/2[tan .7853\ sec .7853 {: - ln (cos .7853/2 - sin .7853/2) {: + ln (sin .7853/2 + cos .7853/2)]  - [0]

=1.15

which is the web site's answer using the Trapezoidal Rule!

Thank you for the guidance.

Note: concerning how theta is written above, I wrote it out in Word.

## Re: Find integral sqrt (x^2 + 1) using trigonometric substitution

OK - looks good.

BTW, the "theta" symbols didn't show because Word uses a different set of fonts. It's always best to type the math directly in the text box, for best results. I edited your answer so the thetas showed properly and also so the answer worked OK on a phone.

X

OK - looks good.

BTW, the "theta" symbols didn't show because Word uses a different set of fonts. It's always best to type the math directly in the text box, for best results. I edited your answer so the thetas showed properly and also so the answer worked OK on a phone.


# Fundamental theorem of calculus on Wikipedia

In Wikipedia is written in one step that for the integral $\int_{x_1}^{x_1 + \Delta x}f(t) dt$ that by mean value theorem there exists a $c$ in $[x_1, x_1 + \Delta x]$ such that

$\int_{x_1}^{x_1 + \Delta x}f(t) dt = f(c) \Delta x$

But mean value theorem states that there exists $c$ in $(x_1, x_1 + \Delta x)$. (the open interval)

It seems to be a problem when squeeze theorem is later applied.

Is this mistake in the proof or is the step valid? If it is valid can you please explain me why? Thank you for any help.

-
The open interval is contained in the closed interval, so the condition that $c$ is in the closed interval is weaker than the conclusion of the mean value theorem. –  Matthew Pressland Apr 23 '13 at 14:33
@MattPressland But if $c \in (x_1, x_1 + \Delta x)$ and by applying squeeze theorem, $c = x_1$ then this is contradiction because $\Delta x \to 0$ and $x_1 \notin (x_1, x_1)$? –  blue Apr 23 '13 at 15:03
The squeeze theorem doesn't tell you $c=x_1$, it tells you that $c\to x_1$ as $\Delta x\to 0$. A sequence of points in the open interval can converge to one of the boundary points in the closed interval. –  Matthew Pressland Apr 23 '13 at 15:10
@MattPressland I did not know it can converge to boundary point. You can write in answer? If you do I accept. –  blue Apr 23 '13 at 15:13
@blue .Lagrage's Mean value theorem for differentiation differ's from first mean value theorem for integration(which you used!) at that point(the interval in which $c$ is expected to be found is closed in the latter and open in the former). –  Fermé somme Apr 23 '13 at 15:20

As boywholived points out, a possible statement of the mean value theorem allows for $c$ to lie in the closed interval. In fact this is simply a weaker statement - if $c$ lies in the open interval, then in particular it lies in the closed interval.
This doesn't cause any problems when applying the squeeze theorem. Perhaps a change of notation is useful; for a particular choice of $\Delta x$, the mean value theorem gives you some $x<c<\Delta x$ (assuming the open interval version of the mean value theorem for now). This $c$ depends on $\Delta x$, so we should maybe write $c(\Delta x)$, making it clear that $c$ is really a function whose value depends on $\Delta x$. Then when applying the squeeze theorem, we are interested in the limit of this function as $\Delta x\to 0$. The fact that $c(\Delta x)>x$ for all $\Delta x>0$ only implies that $\lim_{\Delta x\to0}c(\Delta x)\geq x$, not that the inequality is strict. (Compare to the sequence $a_n=1/n$; every term is strictly positive, but $a_n\to 0$ as $n\to\infty$).


# finding the remainder of $x^{100}-2x^{51}+1$

I have never been great with polynomials. Here's my problem.

Find the remainder of $f(x)=x^{100}-2x^{51}+1$ when $f$ is divided by $x^2-1$

This sounds easy right? Why can't I figure it out? My thought was to try and create it such that $f(x)=q(x)g(x)+r(x)$. But I can not get past getting $deg[r(x)]<deg[g(x)].$

$$f(x)=x^{100}-2x^{51}+1$$ $$=x^{100}-x^{51}-x^{51}+x^2-x^2+1$$ $$=x^{51}(x^{49}-1)-x^2(x^{49}-1)-x^2+1$$ $$=(x^{51}-x^2)(x^{49}-1)-x^2+1$$ $$=x^2(x^{49}-1)(x^{49}-1)-x^2+1$$ $$=x^2[(x^{49}-1)^2-1]+1=?.......$$ I don't see what I am missing

This is the standard approach, especially if you know the roots of the divisor.

Let $f(x) = x^{100} - 2x^{51} + 1$, and $f(x) = g(x) (x^2-1) + ax + b$ be the division

Then, $0 = f(1) = g(1) ( 1^2 - 1) + a (1) + b = a + b$,
and $4 = f(-1) =g(-1) ( (-1)^2 -1) + a(-1) + b = -a + b$.

Hence $a= -2, b = 2$.

Thus the remainder is $-2x+2$.

• I like that. I've never seen it done like that before. That is great! – Eleven-Eleven Apr 18 '13 at 22:57
• @ChristopherErnst You should review the Remainder-Factor Theorem. This is a standard application of it. For more questions, you can check this out. – Calvin Lin Apr 18 '13 at 22:58
• So basically depending on the degree of your particular divisor, if say $deg[g(x)]=3$ you set your remainder to $ax^2+bx+c$ and take one more value and solve the system for a,b,and c. – Eleven-Eleven Apr 18 '13 at 23:25
• @ChristopherErnst Correct. This way is direct and you are simply solving linear equations, though it assumes that you can find the roots of $g(x)$. Of course, there are other ways to approach these kind of polynomial remainder problem, like the other (deleted) solution. – Calvin Lin Apr 18 '13 at 23:34
• Very nice. This way is particularly nice should the divisor factor into nice linear terms with real solutions like the one in the problem. Can this be extended when there are complex factors in our divisor? – Eleven-Eleven Apr 18 '13 at 23:42

Hint $\ \,$ Interpolate the remainder $\rm\:r(x)\:$ at the roots $\rm\:\color{#c00}{x = \pm1},\:$ where $\rm\ r(\pm1)\, =\, f(\pm1)$

$$\qquad\ \ \begin{eqnarray} &&\rm\ \ r(x) &=\,&\rm f(x) - (\color{#c00}{x^2\!-\!1})\, q(x),\ \ \ deg\ r < 2\\ \\\Rightarrow\, &&\rm 2\, r(x) &=\,&\rm f(1)\, (x\!+\!1) - f(-1)\, (x\!-\!1)\end{eqnarray}$$

Remark $\$ Or, equivalently, use Chinese Remainder (CRT) to solve

$$\begin{eqnarray}\rm r(x) &\equiv&\rm \ \ \ f(1) &&\rm\ (mod\ \color{#c00}{x-1}) \\ \rm r(x)&\,\equiv\,&\rm f(-1)&&\rm\ (mod\ \color{#c00}{x+1})\end{eqnarray}$$

Generally, as here, Lagrange interpolation is a special case of CRT.


# What does .9 with a line above the 9 mean?

What does this mean? $$\Large.\overline9$$ I've never seen this notation before.

• Perhaps $0.9999...$? – ajotatxe Jun 2 '15 at 23:28
• It also means $1$, by that's a whole 'nother discussion. – PyRulez Jun 3 '15 at 0:32
• @AlbertMasclans Apparently this notation style depends on geography (en.wikipedia.org/wiki/Repeating_decimal): overline=US, overdot=China, parentheses=Europe. – user3449173 Jun 3 '15 at 8:02
• @Nordik Yes, it depends on geography, but parentheses are used only sometimes in Europe. In Germany we typically use the overline, too. Parentheses are used to denote an uncertanty in the last digit(s). – Christoph Jun 3 '15 at 10:58
• By the way, the overline is technically known as a vinculum. – Brian M. Scott Jun 3 '15 at 14:38

It is called a vinculum and it denotes a repeating decimal.

• +1 for a good word I need to remember to use when the time is right. – JoeTaxpayer Jun 2 '15 at 23:58
• Sounds like something in a gynecologist's office. – zhw. Jun 3 '15 at 0:36
• @JoeTaxpayer: Do you mean +1 or +0.9...? – mipadi Jun 3 '15 at 22:18

It means a repeating decimal. One can write $\frac 16=0.1\overline 6$, or $\frac 1{14}=0.0\overline{714852}$ for example. The repeating part is whatever is under the overline.

$0.\overline{9}=0.999999\ldots=1$

More generally, $0.\overline{n}=0.nnnnnnnnn\ldots$

For example, $\frac 13=0.333333333\ldots=0.\overline3$

As other answers have said, it stands for a repeating decimal, where the digits under the line are repeated. $$0.\overline{9} = 0.9999999\ldots$$

But if you want to be a little pedantic, you might prefer to say that both $0.\overline{9}$ and $0.9999999\ldots$ are two different forms of notation for the same number. That number is the limit of the sequence formed by repeatedly appending copies the digits covered by the line. In other words, given the notation $0.\overline{9}$, you can write out the following sequence: \begin{align} a_1 &= 0.9 \\ a_2 &= 0.99 \\ a_3 &= 0.999 \\ a_4 &= 0.9999 \\ &\vdots \end{align} As you tack on more and more repetitions, these numbers get closer and closer to some limiting value, which I'll call $A$. If you know calculus notation, $$\lim_{n\to\infty} a_n = A$$ The number represented by $0.\overline{9}$ is $A$. It happens to work out to be $1$ (or if we're being pedantic, $1$ is yet another notation for the same number).

As another example of this way of interpreting repeating decimals, consider $0.257\overline{143}$. You can write the sequence \begin{align} b_1 &= 0.257143 \\ b_2 &= 0.257143143 \\ b_3 &= 0.257143143143 \\ b_4 &= 0.257143143143143 \\ &\vdots \end{align} and similarly, the number represented by $0.257\overline{143}$ is the value that this sequence gets closer and closer to as you add more repetitions; or $$\lim_{n\to\infty} b_n$$ This one works out to $\frac{128443}{499500}$.

• Did you just randomly pick that last fraction or did you already have it in mind? – user1717828 Jun 3 '15 at 12:19
• Worth noting, since the 'overdot' notation being standard in UK and apparently China has come up in comments on OP, that in that variant we dot the first and last in a sequence (as opposed to each digit). – OJFord Jun 3 '15 at 22:13
• @user1717828 totally random, I didn't feel like going to the trouble of looking up a "significant" fraction. – David Z Jun 4 '15 at 5:08

This symbol is called a vinculum or a overline.

The number(s) under this symbol are repeated indefinitely.

$0.\overline{9} = 0.99999999999999...$
$2.52\overline{346} = 2.52346346346346...$


# Arithmetic Series Word Problem (Analysis)

#### iNET

Hi, I'm not sure if this is the right section for this question, so if not please redirect me to the correct subforum.

Q: There are k animal feeding stations arranged in a line with a supply hut. The stations are s yards apart and the nearest is t yards from the hut. An attendant carries n bags of feed, one at a time, to each feeding station. How far will he have traveled when he arrives back at the hut after servicing all stations?

Here's what I did, but I don't know if it's correct: (S.k denotes 'S of k')

S.k=(2t + 2(t+s)+...+2(t+(k-1)s))n
= n((k/2)(2(2t)+(k-1)2s))
= n((k(4t+2sk-2s))/(2))
= n((4kt+2sk^2-2sk)/(2))
= n(kt+sk^2+sk)
= nk(t+sk+s) yards

#### romsek

MHF Helper
I get

$2 n t + 2n(s+t) + 2n(2s+t) + \dots 2n((k-1) s + t) = 2 n t k+2 n s \displaystyle{\sum_{j=1}^{k-1}}j = 2 n t k + 2 n s \dfrac {k(k-1)}{2}=2 n k \left(t + \dfrac{s(k-1)}{2}\right)$

1 person

#### iNET

Thanks! I don't exactly understand the method you used to get your answer, but using your answer I was able to see the mistake in my own work that–when corrected–gave me a solution identical to yours.

#### romsek

MHF Helper
the main thing is

$\displaystyle {\sum_{j=1}^{k-1}}j =\dfrac {k(k-1)}{2}$

It looks like you set the problem up correctly. We both start from the same basic equation.

#### iNET

I see.

This may be a stupid question, but the answer could also be simplified to:

nk(2t+s(k-1))

Is one answer somehow 'more' correct than the other one, or are both answers equally acceptable?

Thanks for your help.

#### romsek

MHF Helper
I see.

This may be a stupid question, but the answer could also be simplified to:

nk(2t+s(k-1))

Is one answer somehow 'more' correct than the other one, or are both answers equally acceptable?

Thanks for your help.
they are both the same answer.

Yours is a bit simpler than mine.