Is there a general formula for the sum of a quadratic sequence?

I tried Googling "formula for sum of quadratic sequence", which did not give me anything useful. I just want an explicit formula for figuring out a sum for a quadratic sequence. For example, how would you figure out the sum of $2+6+12+20+\dots+210$? Can someone please help? Thanks

For those of you who do not know, a quadratic sequence is a sequence where the differences of the differences between the terms are constant. Let's use $2+6+12+20+\dots$ as an example. The differences between the terms are $4$, $6$, $8$, etc. The difference between the differences of the terms is $2$. So the sequence will continue like $2+6+12+20+30+42+56+72+\dots$

• Is it homework? – draks ... Mar 13 '14 at 6:45
• @draks... No it is not homework. I am just wondering as I suck at sequences and series problems – TrueDefault Mar 13 '14 at 6:46
• ...I was going to write an answer saying, "no", because I thought you meant quadratic recurrences which are far more complex. Quadratics have a sum which is a cubic equation, so take any four points and do Lagrange interpolation. – Charles Mar 13 '14 at 22:46
• When the $k$th difference of a sequence is constant, one can write down the general term using Newton's formula. $f(n) = f(0) + \frac{\Delta f(0)}{1!} n + \frac{\Delta^2 f(0)}{2!}n(n-1) + \cdots$, where $\Delta f$ are the successive differences. For quadratic sequences, one can then use the usual sum formulas. – user348749 Jul 5 '16 at 8:10

Yes there is. Ever wonder why this is called quadratic sequence? Quadratic refers to squares right? This is just constant difference of difference. So where's the connection? Well as it turns out, all terms of a quadratic sequence are expressible by a quadratic polynomial. What do I mean? Consider this

$$t_n = n+n^2$$

Subsituiting $n=1,2,3,\cdots$ generates your terms. By the way, $202$ doesn't occur in this sequence, the 13th term is $182$ and the $14th$ term is $210$. I am assuming it was supposed to be $210$.

So we need to find

$$\sum_{i=1}^{n}i+i^2 = \sum_{i=1}^{n}i+\sum_{i=1}^{n}i^2$$

where $n=14$. There are well known formulas for $\sum_{i=1}^{n}i$ and for $\sum_{i=1}^{n}i^2$. Substituting them, we get,

$$\frac{n(n+1)}{2} + \frac{n(n+1)(2n+1)}{6}$$ $$=\frac{n(n+1)}{2}\left(1+\frac{2n+1}{3}\right)$$ $$=\frac{n(n+1)}{2}\left(\frac{3+2n+1}{3}\right)$$ $$=\frac{n(n+1)}{2}\left(\frac{2n+4}{3}\right)$$ $$=\frac{n(n+1)(n+2)}{3}$$

where $n=14$. Thus our sum is $1120$.

• You again ! I surrender. Cheers. – Claude Leibovici Mar 13 '14 at 6:43
• Woopsies I will fix that error – TrueDefault Mar 13 '14 at 6:44

For the general case, N terms are to be summed

$$S=a_0+a_1+a_2+...+a_{N-1}$$

The formula for the n-th term is $$a_n=a_0+(a_1-a_0)n+(a_2-2a_1+a_0)\frac{n(n-1)}{2}$$

Using the results

$$\sum_{n=0}^{N-1}n=\frac{N(N-1)}{2}$$

and

$$\sum_{n=0}^{N-1}n(n-1)=\frac{N(N-1)(N-2)}{3}$$

$$S=\sum_{n=0}^{N-1}a_n=a_0N+(a_1-a_0)\frac{N(N-1)}{2}+(a_2-2a_1+a_0)\frac{N(N-1)(N-2)}{6}$$

Although this may not be needed as of now; but I thought about sums of quadratic sequences myself and I managed to derive a general formula for it, so I might as well post it here:

Where $n$ is the number of terms to compute, is the starting term, $d$ is the first difference and is the constant difference between the differences. I use the subscript to denote that it is the quadratic sequence sum function.

• Welcome to math stackexchange. When it isn't too difficult, it is usually preferable to typeset the mathematics than to include links to images. Thanks for the answer. – TravisJ Apr 18 '15 at 0:53

In this particular case, \begin{align} &2+6+12+20+\cdots+210\\\\ &=2(1+3+6+10+\cdots+105)\\\\ &=2\left[\binom 22 +\binom 32 +\binom 42+\binom 52+\cdots \binom {15}2\right]\\ &=2\sum_{r=2}^{15}\binom r2\\ &=2\binom {16}3\\ &=\color{red}{1120}\qquad\blacksquare \end{align}

This is the sum of triangular numbers (where the difference of the difference is constant) and the result is a pyramidal number (all scaled by 2). The summation can be shown as

\begin{align} &2\cdot (1)+\\ &2\cdot (1+2)+\\ &2\cdot (1+2+3)+\\ &2\cdot (1+2+3+4)+\\ &\quad \vdots\qquad\qquad\qquad\ddots\\ &2\cdot (1+2+3+\cdots+15) \end{align}

If we tried to sum a series where the difference of the difference of the difference is constant, i.e. sum of pyramidal numbers, the result would be a pentatope number. And so on...

An example of the summation of pyramidal numbers, extending from the original question, would be

$$2+8+20+40+\cdots+910 =2 \sum_{r=1}^{15} \binom r3=2 \binom {16}4=1820\\$$

I figured out the below way of doing it just know at one o'clock right before bedtime, so if it is faulty than that is my mistake.

Any series has a certain term-to-term rule. For a quadratic that term-to-term rule is in the form

$ax^2+bx+c$

The series will simply be that term-to-term rule with $x$ replaced by $0$, then by $1$ and so on. This can be written as

$\sum_{x=0}^p ax^2+bx+c$

We already know that

$\sum_{x=0}^p x=\frac{x(x+1)}{2}$

$\sum_{x=0}^p x^2=\frac{x(x+1)(2x+1)}{6}$

$\sum_{x=0}^p c=c*p$

These can all be proved easily and you can find said proofs online. Because addition is commutative (the order does not matter) the quadratic sum above rewritten as

$a*\sum_{x=0}^p x^2+b*\sum_{x=0}^p x + \sum_{x=0}^p c$

using the above identities, this can be simplified to

$a*\frac{p(p+1)(2p+1)}{6}+b*\frac{p(p+1)}{2}+c*p$

In your example the term-to-term rule is

$1x^2+1x+0$

And we want to find the sum until the term that will give us $210$. This number can be calculated to be $14$. That means that $14^2+14=210$. So in our formula

$p=14$

$a=1$,

$b=1$

$c=0$.

Plug that in and your sum is $980$

I have a sum formula for quadratic equation.

$$s=\frac{n}{6} (3d(n-1)+(n-1)(n-2)c) +an$$

Where $n$ is the number of terms, $d$ is the first difference, $c$ is the constant difference or difference of difference, $a$ is first term. For calculation of sum first put value of $a$ $d$ $c$ then you get a formula like $an^2+bn+c$.


How to define the $r$th harmonic number if $r$ is any real number?

What would be the value of

$$\sum_{k=1}^{\sqrt{\frac{5}{2}}}\frac{1}{k}$$

Is it $$H_{\sqrt{\frac{5}{2}}}$$?

Using different definitions of harmonic numbers this question can be computed, but can I use the usual definition of harmonic numbers for any real numbers?

In other words is $$\sum_{k=1}^{n}\frac{1}{k}$$

A useful definition for any real $$n$$?

When I want to compute the value of $$H_{\sqrt{\frac{5}{2}}}$$ at Desmos I just define $$\sum_{k=1}^{n}\frac{1}{k}$$ and I don't put $$\sqrt{\frac{5}{2}}$$ directly at the upper limit, but I define $$n=\sqrt{\frac{5}{2}}$$ and the result is exactly what it should be, it seems using a simple substitution will give us the right answer, but generally are we allowed to use the regular definition of harmonic numbers when our $$n$$ is not necessarily a natural number?

• I would define the $r$th harmonic number for a real number $r$ which is not a negative integer for example by $H_r = \gamma +\psi(r+1)$, where $\gamma$ is the Euler-Mascheroni constant and $\psi$ is the digamma function – Maximilian Janisch Feb 13 at 22:29
• Things are even more complicated. Suppose you have a function of $f(n)$ in the domain of real $n$ for which $f(n) = H_n$ for positive integers $n$. Then $g(n) = f(n) + a \sin(\pi n)$ is another extension of $H_n$ to real $n$. Hence you need an additional condition to rule out $a\ne0$. – Dr. Wolfgang Hintze Feb 14 at 7:58

Indefinite Sum concept is the answer to your question.

In fact, if a function $$f(x)$$ is the (forward) difference of a function $$F(x)$$ $$f(x) = \Delta _x F(x) = F(x + 1) - F(x)$$ then we say that $$F(x)$$ is the "antidifference" (or "indefinite sum") of $$f(x)$$ $$F(x) = \Delta _x ^{\left( { - 1} \right)} f(x) = \sum\nolimits_x {f(x)}$$

If $$f(x)$$ and $$F(x)$$ are defined over a real, or complex, domain for $$x$$ then we will have for example $$\sum\limits_{k = 0}^n {f(x + k)} = \sum\limits_{k = 0}^n {\left( {F(x + 1) - F(x)} \right)} = F(x + n + 1) - F(x)$$

We write the above with a different symbol for the sum as $$\sum\nolimits_{k = 0}^{\,n} {f(x + k)} = \sum\limits_{k = 0}^{n - 1} {f(x + k)} = F(x + n) - F(x)$$ which can also be written as $$\sum\nolimits_{k = x}^{\,x + n} {f(k)} = F(x + n) - F(x)$$

The extension to $$\sum\nolimits_{k = a}^{\,b} {f(k)} = F(b) - F(a)$$ for any real (or complex) $$a,b$$ inside the domain of definition of $$f, F$$ is quite natural.

Coming to the harmonic numbers, it is well known that the functional equation of the digamma function is $${1 \over x} = \Delta _x \,\psi (x)$$ and it is therefore "natural" to define $$\bbox[lightyellow] { H_r = \sum\limits_{k = 1}^r {{1 \over k}} = \sum\nolimits_{k = 1}^{\,1 + r} {{1 \over k}} = \psi (1 + r) - \psi (1) = \psi (1 + r) + \gamma } \tag{1}$$ which substantiate M. Janisch's comment

Answering to W. Hintze's comment, please consider how the "indefinite sum" parallels the "indefinite integral - antiderivative" concept.
Similarly to $$f(x) = {d \over {dx}}F(x)\quad \Leftrightarrow \quad F(x) = \int {f(x)dx} + c$$ we have that $$f(x) = \Delta \,F(x)\quad \Leftrightarrow \quad F(x) = \sum\nolimits_x {f(x)} + \pi \left( x \right)$$ where now the family of antidifference functions differ by any function $$\pi(x)$$ , and not by a constant, which is periodic with period (or one of the periods) equal to $$1$$, as you rightly noticed.

So by "natural extension" I meant to say:
- an extension from integers to reals (and complex) field under the "indefinite sum" concept,
which provides a function $$\mathbb C \to \mathbb C$$ which fully interpolates $$f(n)$$;
- in the antidifference family to select the "simpliest / smoothiest" function, same as the Gamma function is selected among the functions satisfying $$F(z+1)=zF(z)$$ as the only one which is logarithmically convex, or which has the simplest Weierstrass representation, etc.

From the comments I could catch some skepticism as if my answer could just be an "extravagant" personal idea of mine.
That's absolutely not so, the definition in (1) is actually standardly accepted: refer to Wolfram Function Site, and in particular to this section or to the Wikipedia article.
I am just trying to enlight how we can assign a meaning to sums with bounds which are not integral and thus saying that $$\bbox[lightyellow] { H_{\,1 + \sqrt {5/2} } = \sum\limits_{k = 1}^{\,1 + \sqrt {5/2} } {{1 \over k}} = \sum\nolimits_{k = 1}^{\,\,2 + \sqrt {5/2} } {{1 \over k}} = \psi (\,\,2 + \sqrt {5/2} ) - \psi (1) = 1.7068 \ldots } \tag{2}$$

• I don't believe that the indefinite sum provides an answer to the question. If you believe it does, you should explain that in your answer. Just giving a link is not an adequate response. – Rob Arthan Feb 13 at 21:56
• @RobArthan: your criticism is fully right and accepted: I expanded my answer – G Cab Feb 14 at 0:41
• So finally can I use an irrational index for the lower or upper bound for the sum? – user715522 Feb 14 at 6:07
• @ G Cab As to the question of what is a "natural" extension please see my comment to the OP. (and thanks for bringing indefinite sums to my attention). – Dr. Wolfgang Hintze Feb 14 at 8:03
• @Dr.WolfgangHintze: well, the meaning of "natural extension" is .. quite natural, as much as the Gamma function is the natural extension of $(n-1)!$. That the "natural" one does not cover all the possible extensions that's absolutely true: I added some lines to make it clear which is the antidifference family of functions. – G Cab Feb 14 at 17:44

The $$n$$-th harmonic number $$H_n=\sum_{k=1}^n\frac{1}{k}$$ admits a nice representation as integral of a finite geometric series which can be generalised in a rather natural way. We have the following representation for $$n$$ a positive integer: \begin{align*} H_n=\sum_{k=1}^n\frac{1}{k}=\int_0^1\frac{1-t^n}{1-t}dt\tag{1} \end{align*}

The identity (1) is valid since we have \begin{align*} \int_0^1\frac{1-t^n}{1-t}dt&=\int_0^1\left(1+t+\cdots+t^{n-1}\right)\,dt\tag{2}\\ &=\left(t+\frac{1}{2}t^2+\cdots+\frac{1}{n}t^n\right)\bigg|_0^1\tag{3}\\ &=\left(1+\frac{1}{2}+\cdots+\frac{1}{n}\right)-\left(0\right)\tag{4}\\ &=H_n \end{align*}

Comment:

• In (2) we apply the finite geometric series formula.

• In (3) we do the integration.

• In (4) we evaluate the expression at the upper and lower limit.

The representation (1) indicates a generalisation \begin{align*} H_\color{blue}{r}=\int_0^1\frac{1-t^\color{blue}{r}}{1-t}dt\tag{2} \end{align*} for real values $$r$$ in fact also for complex values.

Note:

• The formula (2) can be found in the wiki page generalized harmonic numbers.

• We have an interesting relationship with the Digamma function $$\psi(r)$$ which has an integral representation \begin{align*} \psi(r+1)=\int_0^1\frac{1-t^r}{1-t}\,dt-\gamma \end{align*} which is strongly related to (2). Here $$\gamma$$ is the Euler-Mascheroni constant.

• If we stick at the sigma notation, we often find for real upper limit $$r$$ the meaning \begin{align*} \sum_{k=1}^r a_k=\sum_{k=1}^{\lfloor r\rfloor}a_k \end{align*} where $$\lfloor .\rfloor$$ is the floor function.

• You are rigt : in the "traditional" sum notation writing $\sum\limits_{k = r}^s {a_{\,k} }$ actually means $\sum\limits_{k = \,\left\lceil r \right\rceil }^{\left\lfloor s \right\rfloor } {a_{\,k} }$. That's why we need to extend the meaning passing to the antidifference and using a slightly different symbol. – G Cab Feb 15 at 22:05
• @GCab: I think the simpler approach via the integral representation already does the job to generalize $H_n$ appropriately. – Markus Scheuer Feb 15 at 22:11
• Definitely yes, the integral representation does the job very nicely. But I understand the core of the post as being whether and what meaning to assign to a sum with non-integral bounds – G Cab Feb 15 at 22:24
• @GCab: Yes, I know. :-) – Markus Scheuer Feb 15 at 22:25

Your question is "are we allowed to use the regular definition of harmonic numbers when our $$n$$ is not necessarily a natural number?" The answer is no, since the "regular definition" of a sum is $$a_1 + a_2 + ... + a_n$$. Here $$n$$ is the number of summands which can't be a non natural number.

But you can very well give a meaning to the result of a sum. And this result may accept non integers as input.

Take the simpler example of a "sum" $$a(\pi) = \text{"}\sum_{k=1}^{\pi} k\text{"}$$. This "sum" is not defined, as although the first three summands are 1, 2, and 3, the last 3.14...-th summand is not defined.

Hence the definition starts by calculating the sum up to an integer $$n$$, and afterwards insert the non integer value for $$n$$. Here this gives the arithmetic sum $$a(n)= \frac{1}{2}n(n+1)$$, and hence $$a(\pi)= \frac{1}{2}\pi(\pi+1)$$.

Now for the harmonic number there is no such simple closed expression for general $$n$$. But here comes a relation which is valid for natural $$n$$: $$\sum_{k=1}^n \frac{1}{k} = \sum_{k=1}^n \int_0^1 x^{k-1}\,dx=\int_0^1 \sum_{k=1}^n x^{k-1}\,dx=\int_0^1 \frac{1-x^n}{1-x}\,dx$$, and now the r.h.s. is valid for also for real $$n$$.

Your description of the problem gives a good illustration of this procedure. In making the usual definition of the harmonic number $$\sum_{k=1}^n \frac{1}{k}$$ in your CAS, the system understands that you mean the harmonic number function $$H_n$$ it has in its "belly", and this is valid for real numbers. If you then insert a value for $$n$$, be it integer or not, you get the result of this internal function.

• please, let's avoid confusions, do not use the symbol $\sum\nolimits_{k = 1}^{\,\pi } k$ in your argumentation above since it is the symbol adopted (almost standardly) for the antidifference, and $$\sum\nolimits_{k = 1}^{\,\pi } k = {{\pi \left( {\pi - 1} \right)} \over 2}$$ ! Use instead, $$\sum\limits_{k = 1}^\pi k = \sum\nolimits_{k = 1}^{\,\pi + 1} k = {{\pi \left( {\pi + 1} \right)} \over 2}$$ And please have a look at the renowned and authoritative "concrete Mathematics" para. 2.6 – G Cab Feb 15 at 21:48
• You might have noticed that I have put the expression in hyphens to avoid confusion. You are free to use any symbol you like, of course, but please avoid forcing others to use your conventions. – Dr. Wolfgang Hintze Feb 16 at 0:06


Find all School-related info fast with the new School-Specific MBA Forum

 It is currently 25 Oct 2016, 01:44

### GMAT Club Daily Prep

#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History

# Events & Promotions

###### Events & Promotions in June
Open Detailed Calendar

# Neat Fact for Integral Solutions to a polynomial

Author Message
TAGS:

### Hide Tags

Verbal Forum Moderator
Joined: 10 Oct 2012
Posts: 630
Followers: 78

Kudos [?]: 1054 [2] , given: 136

Neat Fact for Integral Solutions to a polynomial [#permalink]

### Show Tags

02 Jul 2013, 02:09
2
KUDOS
7
This post was
BOOKMARKED
Hello!

Consider any polynomial $$f(x) = A_1x^n+A_2x^{n-1}+.....A_n$$

Assumption : All the co-efficients for the given polynomial have to be integral,i.e. $$A_1,A_2,A_3....A_n$$ are all integers.

Fact:Any integral solution(root) for the above polynomial will always be a factor(positive/negative) of the constant term : $$A_n$$

Example I : $$f(x) = 5x^2-16x+3$$. Thus, we know that if the given polynomial has any integral solutions, then it will always be out of one of the following : $$-3,-1,1,3$$

We see that only x=3 is a root for the given polynomial. Also, we know that product of the roots is$$\frac {3}{5}$$. Hence, the other root is $$\frac {1}{5}$$

Example II : Find the no of integral solutions for the expression $$f(x) = 3x^4-10x^2+7x+1$$

A. 0
B. 1
C. 2
D. 3
E. 4

For the given expression, instead of finding the possible integral solutions by hit and trial, we can be rest assured that if there is any integral solution, it will be a factor of the constant term ,i.e. 1 or -1. Just plug-in both the values, and we find that f(1) and f(-1) are both not equal to zero. Thus, there is NO integral solution possible for the given expression--> Option A.

Example III : Find the no of integral solutions for the expression $$f(x) = 4x^4-8x^3+9x-3$$

A. 0
B. 1
C. 2
D. 3
E. 4

Just as above, the integral roots of the given expression would be one of the following : -3,-1,1,3. We can easily see that only x = -1 satisfies. Thus, there is only one integral solution for the given polynomial-->Option B.

Hence, keeping this fact in mind might just reduce the range of the hit and trial values we end up considering.
_________________
GMAT Club Legend
Joined: 09 Sep 2013
Posts: 12217
Followers: 542

Kudos [?]: 151 [0], given: 0

Re: Neat Fact for Integral Solutions to a polynomial [#permalink]

### Show Tags

17 Mar 2015, 10:58
Hello from the GMAT Club BumpBot!

Thanks to another GMAT Club member, I have just discovered this valuable topic, yet it had no discussion for over a year. I am now bumping it up - doing my job. I think you may find it valuable (esp those replies with Kudos).

Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email.
_________________
GMAT Club Legend
Joined: 09 Sep 2013
Posts: 12217
Followers: 542

Kudos [?]: 151 [0], given: 0

Re: Neat Fact for Integral Solutions to a polynomial [#permalink]

### Show Tags

09 May 2016, 14:17
Hello from the GMAT Club BumpBot!

Thanks to another GMAT Club member, I have just discovered this valuable topic, yet it had no discussion for over a year. I am now bumping it up - doing my job. I think you may find it valuable (esp those replies with Kudos).

Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email.
_________________
Re: Neat Fact for Integral Solutions to a polynomial   [#permalink] 09 May 2016, 14:17
Similar topics Replies Last post
Similar
Topics:
Solution of an inequality 0 24 Jun 2013, 21:55
2 Factoring a Polynomial W/O Quadratic formula 7 08 Jun 2013, 18:41
5 Brute Force for Positive Integral Solutions 2 21 Oct 2012, 21:29
Not for solution but for suggestion 2 08 Mar 2011, 12:19
divisibility of polynomial- PLZ help 0 03 May 2010, 19:19
Display posts from previous: Sort by


# How can I prove this proposition from Peano Axioms: (Cancellation law). Let a, b, c be natural numbers such that a + b = a + c. Then we have b = c.

Peano Axioms.

Axiom 2.1

$0$ is a natural number.

Axiom 2.2

If $n$ is a natural number then $n++$ is also a natural number. (Here $n++$ denotes the successor of $n$ and previously in the book the notational implication has been bijected to the familiar $1,2…$).

Axiom 2.3

$0$ is not the successor of natural number; i.e. we have $n++≠0$ for every natural number $n$.

Axiom 2.4

Different natural numbers must have different successors; i.e., if $n,m$ are natural numbers and $n≠m$, then $n++≠m++$.

Axiom 2.5

Let $P(n)$ be any property pertaining to a natural number $n$. Suppose that $P(0)$ is true, and suppose that whenever $P(n)$ is true, $P(n++)$ is also true. Then $P(n)$ is true for every natural number $n$.

Definition of Addition: Let m be a natural number. We define, $0+m=m$ and suppose we have inductively defined the addtion $n+m$ then we define, $(n++)+m=(n+m)++$. Where $n++$ is the successor of $n$.

Terence Tao has a proof in his Analysis I book, but I couldn't understand . I want a proof line by line like this:

Thm: 3 is a natural number \begin{align*} & 0 \text{ is natural } && \text{Axiom 2.1 }\\ & 0++ = 1 \text{ is natural } && \text{Axiom 2.2}\\ & 1++ = 2 \text{ is natural } && \text{Axiom 2.2}\\ & 2++ = 3 \text{ is natural } && \text{Axiom 2.2} \end{align*}

• What have you proven so far? Have you shown commutativity? – InterstellarProbe Jul 31 '18 at 13:52

The proof is by induction on $a$.

Basis [case with $a=0$]. We want to prove that :

if $0+b=0+c$, then $b=c$.

But we have that : $0+b=b$, by definition of addition.

And also : $0+c=c$.

Thus, by transitivity of equality : $b=c$.

Induction step. Assume that the property holds for $a$ and prove it for $a'$ [I prefer to use $a'$ instead of $a++$ for the successor of $a$].

This means :

assume that "if $a+b=a+c$, then $b=c$" holds, and prove that "if $a'+b=a'+c$, then $b=c$" holds.

We have $a'+b=(a+b)'$ by definition of addition.

And $a'+c=(a+c)’$, by definition of addition.

We assume that : $a'+b=a'+c$, and thus, again by transitivity of equality, we have that : $(a+b)'=(a+c)'$.

By axiom 2.4 (different numbers have different successors), by contraposition, we conclude that $(a+b)=(a+c)$.

Thus, applying induction hypothesis, we have that :

$b=c$.

The general strategy used above in order to prove "if $P$, then $Q$", is to assume $P$ and derive $Q$.

This type of proof is called Conditional Proof; we can see it above :

1) if $a+b=a+c$, then $b=c$ --- induction hypothesis

2) $a'+b=a'+c$ --- assumption for CP

3) $(a+b)'=(a+c)'$ --- from 2) and definition of addition and tarnsitivity of equality

4) $a+b=a+c$ --- from 3) and axiom 2.4 by Contraposition [the axiom says : "if $(a+b \ne a+c)$, then $(a+b)' \ne (a+c)'$"; thus, contraposing it we get : "if $(a+b)' = (a+c)'$, then $(a+b) = (a+c)$"] and Modus ponens

5) $b=c$ --- from 4) and 1) by Modus ponens (also called : detachment)

6) if $a'+b=a'+c$, then $b=c$ --- from 2) and 5) by Conditional Proof.

• (In your last yellow box before the general strategy, it should be $b=c$) – Jason DeVito Jul 31 '18 at 14:31
• Thanks! Amazing. – Henrique Jul 31 '18 at 15:25

Here is a formal proof done in Fitch:

(Note: I use $s(x)$ instead of $x$++)


1. ## Having Trouble

Hi all,

I am just new to this site and it looks like such an awesome resource.

Can anyone help me with this???

If x + y = 1 and x³ + y³ = 19, find the value of x² + y²

2. Originally Posted by Joel
Hi all,

I am just new to this site and it looks like such an awesome resource.

Can anyone help me with this???

If x + y = 1 and x³ + y³ = 19, find the value of x² + y²
$\left\{\begin{array}{lclcr}
x&+&y&=&1\\
x^3&+&y^3&=&19
\end{array}\right.$

$\Rightarrow x^3+(1-x)^3=19,$

and after expanding and simplifying,

$3x^2-3x-18=0$

$\Rightarrow3(x-3)(x+2)=0.$

You should be able to finish.

3. Hello, Joel!

Welcome aboard!

I have a back-door approach . . .

If . $\begin{array}{cccc}x + y &=& 1 & {\color{blue}[1]} \\ x^3 + y^3 &=& 19 & {\color{blue}[2]} \end{array}$ . find the value of $x^2+y^2.$

Cube [1]: . $(x+y)^3 \:=\:1^3\quad\Rightarrow\quad x^3 + 3x^2y + 3xy^2 + y^3 \:=\:1$

$\text{We have: }\;\underbrace{(x^3 + y^3)}_{\text{This is 19}} + \;3xy\underbrace{(x+y)}_{\text{This is 1}} \:=\:1 \quad\Rightarrow\quad 19 \;+ \;3xy \:=\:1 \quad\Rightarrow\quad xy \:=\:-6$

Square [1]: . $(x+y)^2 \:=\:1^2 \quad\Rightarrow\quad x^2+2xy + y^2 \:=\:1$

$\text{We have: }\;x^2 + y^2 + 2(xy) \:=\:1$
. . . . . . . . . . . . . . $\uparrow$
. . . . . . . . . . . . $^{\text{This is }\text{-}6}$

Therefore: . $x^2+y^2 - 12 \:=\:1 \quad\Rightarrow\quad \boxed{x^2+y^2 \:=\:13}$

This method is guarenteed to impress/surprise/terrify your teacher.
.

4. Originally Posted by Soroban
Hello, Joel!

Welcome aboard!

I have a back-door approach . . .
I like your solution. I wish I had thought about the problem a bit more before going down the obvious path.


# Write 100 as the sum of two positive integers

Write $100$ as the sum of two positive integers, one of them being a multiple of $7$, while the other is a multiple of $11$.

Since $100$ is not a big number, I followed the straightforward reasoning of writing all multiples up to $100$ of either $11$ or $7$, and then finding the complement that is also a multiple of the other. So then $100 = 44 + 56 = 4 \times 11 + 8 \times 7$.

But is it the smart way of doing it? Is it the way I was supposed to solve it? I'm thinking here about a situation with a really large number that turns my plug-in method sort of unwise.

• I think you want to reword this 'Scalable algorithm to write N as the sum of two positive integers, for large N'
– smci
May 4, 2015 at 7:13
• This seems like a rather badly designed exercise since, looking at the answers, it's clear that just checking multiples of 7 and 11 is by far the simplest way of solving it. I once saw an exam question that made things much clearer by saying the equivalent of, "Proceed as if 100 is a very large number and you do not know that 100=44+56." May 4, 2015 at 21:07

From Bezout's Lemma, note that since $\gcd(7,11) = 1$, which divides $100$, there exists $x,y \in \mathbb{Z}$ such that $7x+11y=100$.

A candidate solution is $(x,y) = (8,4)$.

The rest of the solution is given by $(x,y) = (8+11m,4-7m)$, where $m \in \mathbb{Z}$. Since we are looking for positive integers as solutions, we need $8+11m > 0$ and $4-7m>0$, which gives us $-\frac8{11}<m<\frac47$. This means the only value of $m$, when we restrict $x,y$ to positive integers is $m=0$, which gives us $(x,y) = (8,4)$ as the only solution in positive integers.

If you do not like to guess your candidate solution, a more algorithmic procedure is using Euclid' algorithm to obtain solution to $7a+11b=1$, which is as follows.

We have \begin{align} 11 & = 7 \cdot (1) + 4 \implies 4 = 11 - 7 \cdot (1)\\ 7 & = 4 \cdot (1) + 3 \implies 3 = 7 - 4 \cdot (1) \implies 3 = 7 - (11-7\cdot (1))\cdot (1) = 2\cdot 7 - 11\\ 4 & = 3 \cdot (1) + 1 \implies 1 = 4 - 3 \cdot (1) \implies 1 = (11-7 \cdot(1)) - (2\cdot 7 - 11) \cdot 1 = 11 \cdot 2-7 \cdot 3 \end{align} This means the solution to $7a+11b=1$ using Euclid' algorithm is $(-3,2)$. Hence, the candidate solution $7x+11y=100$ is $(-300,200)$. Now all possible solutions are given by $(x,y) = (-300+11n,200-7n)$. Since we need $x$ and $y$ to be positive, we need $-300+11n > 0$ and $200-7n > 0$, which gives us $$\dfrac{300}{11} < n < \dfrac{200}7 \implies 27 \dfrac3{11} < n < 28 \dfrac47$$ The only integer in this range is $n=28$, which again gives $(x,y) = (8,4)$.

• This looks like I was looking for, but I didn't quite get why you summed $11m$ to the $x$ and $-7m$ to the $y$, since $x$ is supposed to be a multiple of $7$, instead of $11$. May 3, 2015 at 23:31
• @Lanner Check what happens when you plug in $x=8+11m$ and $y=4-7m$ into the original equation. May 3, 2015 at 23:32
• While $x,y$ are guaranteed to exist from Bezout's Lemma, they are not guaranteed to be positive. Therefor: Bezout's Lemma provides no information about whether this particular problem has a solution. What logic led to $(8,4)$ being your starting point for the search? May 4, 2015 at 14:15
• @AndrewCoonce A more algorithmic procedure to obtain solutions to $ax+by=1$ is Euclid's algorithm to compute the gcd. However, in some cases such as this a candidate solution can be guessed easily. May 4, 2015 at 15:04
• @user17762 The only reason I asked for clarification is because the OP already had a natural method for determining it for this case and was looking for a general method. Guessing just because the numbers played nicely here didn't seem like a solution, but your comment clarifies the general solution for me. May 4, 2015 at 16:38

An effort to avoid any enumeration or hiding an inductive leap to the answer.

$7a + 11b = 100: a,b \in N$

$11b \leq 100 - 7 = 93$

$\implies 1 \leq b \leq 8$

$7(a+b) = 100 - 4b$

$\implies 100 - 4b \equiv 0 \mod 7$

$\implies 25 - b \equiv 0 \mod 7$

$\implies b \equiv 25 \mod 7$

$\implies b \equiv 4 \mod 7$

$\implies b = 4 + 7n$

We know $1 \leq b \leq 8$.

So we have $b \equiv 25 \mod 7$, so $b = 4$ and hence $a = 8$.

• This works, but it relies on the accidental fact that $11-7$ is a factor of $100$. If I changed it to $103$ this method wouldn't work. The reason is that in general we need the multiplicative inverse of $11$ modulo $7$ or vice versa, for that particular step. May 5, 2015 at 12:48

But is it the smart way of doing it?

You are asked to find a and b so that $7a+11b=100\iff7(a+b)+4b=100\iff$

$4\Big[(a+b)+b\Big]+3(a+b)=100\iff3\Big\{\Big[(a+b)+b\Big]+(a+b)\Big\}+\Big[(a+b)+b\Big]=$ $100$.

But $100=99+1=3\cdot33+1$, so $a+2b=1\iff2a+4b=2$, and $2a+3b=33$. It follows
that $b_0=-31$ and $a_0=63$ is one solution. But, then again, so are all numbers of the form $a_k=63-11k$ and $b_k=-31+7k$, with $k\in$ Z. All we have to do now is pick one pair whose components are both positive. The first equation implies $k<6$, and the latter $k>4$.

Since $\operatorname{gcd}(7,11)=1$ , you can find $a,b \in \mathbb Z$ with $7a+11b=1$. Now multiply both sides of the equation by $100$ to get one (and so all possible) results:

$$700a+1100b=100$$

Once you have a solution for $700a+1100b=100$, you have all solutions:

$$700(a+11k)+1100(b-7k)=100$$

You can then find $k$ so that both coefficients are positive.

• It must be the sum of two positive integers, so a,b > 0. May 3, 2015 at 23:00
• @Gary. Bezout coefficients are not guaranteed to be positive. May 3, 2015 at 23:02
• The Bezout coefficients for positive integers are guaranteed to have different signs. May 3, 2015 at 23:04
• But once we know any $a,b$, we can find solutions $a',b' : 700a'+1100b'=100$ with $a',b' >0$. The Bezout coefficients generate all solutions; they are not the unique solutions. May 3, 2015 at 23:07
• @MathMajor: Thanks, you know what those fake internet points will do to you ; ). May 3, 2015 at 23:34

While certainly not the ideal solution, this problem is certainly in the realm of Integer Programming. As plenty of others have pointed out, there are more direct approaches. However, I suspect ILP solvers would operate quite efficiently in your case, and requires less 'thought capital'.

$7a+11b=100$ so modding both sides by $11$ you get $11 \mid (7a-1)$. Let $11a'=7a-1$. Then the problem is transformed to finding $a',b$ such that $a'+b=9$ and $7 \mid (11a'+1)$, which (in my opinion) is somewhat easier to test for.

$7x+11y=100$
$7x=100-11y$
$x=\frac{100-11y}7=14-2y+\frac{2+3y}7$
$a=\frac{2+3y}7$
$7a=2+3y$
$3y=-2+7a$
$y=\frac{-2+7a}3=-1+2a+\frac{1+a}3$
$b=\frac{1+a}3$
$3b=1+a$
$a=3b-1$
$y=\frac{-2+7(3b-1)}3=\frac{-9+21b}3=-3+7b$
$x=\frac{100-11(-3+7b)}7=\frac{133-77b}7=19-11b$
$\begin{matrix} x\gt 0&\to&19-11b\gt 0&\to&11b\lt 19&\to&b\lt\frac{19}{11}&\to&b\le 1&\\ &&&&&&&&&b=1\\ y\gt 0&\to&-3+7b\gt 0&\to&7b\gt 3&\to&b\gt\frac37&\to&b\ge 1&\\ \end{matrix}$
$1$ is the only integral value of $b$ for which both $x$ and $y$ yield positive values, as required by the problem. So, $x=8$ and $y=4$.

Since positive numbers are required, you could do something like this, inspired by the so-called chicken nugget monoid. This method is only viable if one of the numbers is sufficiently small; Euclid's algorithm is much better for big numbers, e.g., writing 2165434 in terms of positive multiples of 97 and 103.

Note the following:

• $11\cdot1=4\mod 7$
• $11\cdot2=1\mod 7$
• $11\cdot3=5\mod 7$
• $11\cdot4=2\mod 7$
• $11\cdot5=6\mod 7$
• $11\cdot6=3\mod 7$
• $11\cdot7=0\mod 7$

So, to find a positive solution for $N$ in terms of $7$ and $11$, find the value of $N$ (mod $7$), subtract the appropriate multiple of $11$ from $N$, and divide the result by $7$. Now you have positive integers $m$ and $n$ such that $7m+11n=N$.

Of course, if $m$ is larger than 11, the solution is not unique, but each $N>77$ has at least one solution.

## $N\leq 77$ with positive solutions (complete list)

• $18=11(1)+7(1)$
• $25=11(1)+7(2)$
• $29=11(2)+7(1)$
• $32=11(1)+7(3)$
• $36=11(2)+7(2)$
• $39=11(1)+7(4)$
• $40=11(3)+7(1)$
• $43=11(2)+7(3)$
• $46=11(1)+7(5)$
• $47=11(3)+7(2)$
• $50=11(2)+7(4)$
• $51=11(4)+7(1)$
• $53=11(1)+7(6)$
• $54=11(3)+7(3)$
• $57=11(2)+7(5)$
• $58=11(4)+7(2)$
• $60=11(1)+7(7)$
• $61=11(3)+7(4)$
• $62=11(5)+7(1)$
• $64=11(2)+7(6)$
• $65=11(4)+7(3)$
• $67=11(1)+7(8)$
• $68=11(3)+7(5)$
• $69=11(5)+7(2)$
• $71=11(2)+7(7)$
• $72=11(4)+7(4)$
• $73=11(6)+7(1)$
• $74=11(1)+7(9)$
• $75=11(3)+7(6)$
• $76=11(5)+7(3)$

Use the Extended Euclidean Algorithm to solve $$7x+11y=100$$ Using the implementation detailed in this answer $$\begin{array}{r} &&1&1&1&3\\\hline 1&0&1&-1&\color{#C00000}{2}&\color{#0000F0}{-7}\\ 0&1&-1&2&\color{#00A000}{-3}&\color{#E0A000}{11}\\ 11&7&4&3&1&0\\ \end{array}$$ we get that $$(\color{#00A000}{-3})\,7+(\color{#C00000}{2})\,11=1$$ multiply by $100$ and use the last column from the algorithm to get the general answer, we get $$(-300+\color{#E0A000}{11}k)\,7+(200\color{#0000F0}{-7}k)\,11=100$$ set $k=28$ (the only $k$ that works) to make the coefficients positive, we get that $$(8)\,7+(4)\,11=100$$

Larger than $\boldsymbol{100}$

Suppose we want to write $1000000$ as a sum of a multiple of $7$ and a multiple of $11$. We can use the result of the algorithm above. That is $$(-3000000+11k)7+(2000000-7k)11=1000000$$ We can use any $272728\le k\le 285714$ to make both coefficients positive.

$k=272728$ gives $$(8)\,7+(90904)\,11=1000000$$ $k=285714$ gives $$(142854)\,7+(2)\,11=1000000$$


# Bringing a constant out of double integral (polar coordinates)

Question is: Using polar coordinates, evaluate the integral $\iint\sin(x^2+y^2)dA$ where R is the region $1\le x^2+y^2\le81$

My work for the inside integral, using bounds 1 to 9, was a constant:
$$\int_1^9\sin(r^2)rdr=-\frac{1}{2}\left(\cos81-\cos1\right)$$

Does this mean I can conclude my answer is this constant? In other words, can I bring it out of the integral with respect to theta from 0 to 2$\pi$? I am guessing not because my answer was not correct. If not, could someone explain why?

• Try using MathJax to make your question more readable. – user546997 Apr 25 '18 at 2:44
• Yes you can bring it out. The answer should be correct. What number are you getting for your answer? – John Doe Apr 25 '18 at 2:51
• @JohnDoe The answer is that constant (my answer) times 2pi. – h.jb Apr 25 '18 at 2:55
• That's the same answer I get. What is the "correct" answer. – saulspatz Apr 25 '18 at 3:01
• I get $-0.74...$. What number are you getting? Do you have an actual number? That would help us figure out what your issue is – John Doe Apr 25 '18 at 3:03

You ignored the angular part of the integral: $$\int\int_R\sin(x^2+y^2)\,dx\,dy=\int_0^{2\pi}\int_1^9r\sin(r^2)\,dr\,d\theta\\=\left(\int_0^{2\pi}\,d\theta\right)\left(\int_1^9r\sin(r^2)\,dr\right)=2\pi\times(-0.118\dots)=-0.74\dots$$
• @h.jb yes, we are $$\int_0^{2\pi}\,d\theta=\int_0^{2\pi}1\,d\theta=[\theta]_0^{2\pi}=2\pi$$Does that make sense now? We can split the integral in this way because there are no terms with $\theta$ in the original integral. – John Doe Apr 25 '18 at 3:22


# Calculating the square root of an integer as an integer with the smallest error

I was recently asked to write an algorithm to find the square root of a given integer, with the solution expressed as an integer with the smallest error.

It was unclear to me whether this meant I need to return the integer closest to the actual square root, or return the integer such that, when squared, returned the closest value to the target number. When asking for clarification, I was told these are the same.

This got me thinking however, are these really equivalent?

Clearly, when deciding between two real approximations, minimizing the error of the square roots isn't the same as minimizing the error of the squares. For example, if I had to pick between 1.9 and 2.096 as an approximation of the square root of 4, then 2.096 would be the closest to the actual square root (error of 0.096 compared to 0.1), while 1.9 would provide the smallest error when squared (error of 0.39 compared to 0.393216).

For the integer approximation case, it doesn't appear obvious to me why the solutions to the two cases will always be the same. I've experimentally verified it to be so for the first 200 billion integers. Can anyone provide an intuitive or formal proof of this?

Suppose we want to approximate $\sqrt x$ with $n^2<x<(n+1)^2$.

If we minimize the error of the squares, we're going to choose $n$ or $n+1$ according to whether $x>\frac{n^2+(n+1)^2}2 = n^2 + n + \frac12$.

If we minimize the error of the square root, we should choose $n$ or $n+1$ according to whether $\sqrt{x}>n+\frac12$, which is the same as $x > (n+\frac12)^2 = n^2+n+\frac14$.

Because $x$ is an integer, being larger than $n^2+n+\frac12$ is the same as being larger than $n^2+n+\frac14$.

If $k-{1\over2}\lt\sqrt n\lt k+{1\over2}$, then

$$(k-1)^2=k^2-2k+1\lt k^2-k+{1\over4}\lt n\lt k^2+k+{1\over4}\lt k^2+2k+1=(k+1)^2$$

To flesh this out, the fact that $k$ and $n$ are integers implies

$$k^2-k+1\le n\le k^2+k$$

If $n\gt k^2$, then $n-k^2\le k$ while $(k+1)^2-n\ge k+1$. Likewise, if $n\lt k^2$, then $k^2-n\le k-1$ while $n-(k-1)^2\ge k$. In either case, $n$ is closer to $k^2$ than it is to either $(k-1)^2$ or $(k+1)^2$.


# What does $23_4$ mean?

I just saw this on a mathematical clock for $11$, i.e $23_4=11$:

$\qquad \qquad \qquad \qquad \qquad$

I guess it is some notation from algebra. But since algebra was never my favorite field of maths, I don't know this notation. Any explanations are welcome ;-))! Thanks

• 11 in base 10 is same as 23 in base 4 : $$(23)_4 = (11)_{10}$$ – ganeshie8 Oct 4 '14 at 10:46
• It is an interesting question and the clock is also meaningful.+1 – Paul Oct 4 '14 at 11:07

This denotes the number $11$ in base $4$. In everyday life, we write our numbers in base $10$.

$23_4$ is to be read as: $$2\cdot 4 + 3.$$ In general, $$(a_n...a_0) _ g = \sum_{i=0}^n a_i g^i = a_n g^n + a_{n-1}g^{n-1} + ... + a_1 g + a_0,$$ where the $a_i$ are chosen to lie in $\{0,...,g-1\}$.

EDIT: I have edited this post to write $2\cdot 4 +3$ rather than $3+2\cdot 4$. However, I still think that it is easier to decipher a (long) number such as $(2010221021)_3$ from right to left, simply by increasing the powers of $3$, rather than first checking that the highest occuring power of $3$ is $3^9$ and then going from left to right.

• Not reversing the order will make it more readable. – Yves Daoust Oct 4 '14 at 10:55
• Personally, I prefer it this way, because I can simply increase the power of $g$ as I go from right to left, whereas I first have to check which the highest occuring power of $g$ is when I go from left to right. Nonetheless, I read base 10 numbers from left to right, but that is probably due to the fact that we're used to thinking of numbers in base 10 and writing them this way... – Oliver Braun Oct 4 '14 at 11:02
• If you write $23_4$, then $2\cdot4+3$ is more readable than $3+2\cdot4$. I also use to write polynomials by decreasing degrees, but this is just a matter of taste. – Yves Daoust Oct 4 '14 at 11:15
• That's a matter of opinion, is it not? – Oliver Braun Oct 4 '14 at 11:17
• Not at all. In one case there is an inversion and not in the other. The writing order is a matter of convention and habit and I have no objection when they are used in isolation, but when you bring the expressions together, then it starts to matter. – Yves Daoust Oct 4 '14 at 11:19

$4$ is the base, $(23)_4$ means $2 \cdot 4^1 + 3 \cdot 4^0 = 11$. Similarly, if $10$ is the base, then $(23)_{10}$ means $2 \cdot 10^1 + 3 \cdot 10^0 = 23$.

• That is the notation used by Knuth. – mvw Dec 20 '14 at 11:45

The base or radix of a number denotes how many unique digits are used by the numeral system that is representing the given number. Usually the radix is written as a subscript, as in your example $23_4$, where the radix is $4$.

Also note that when the radix is omitted, it is usually assumed to be $10$. So the number $23_4$ is equal to $11_{10}$ or simply $11$. Here is how we can convert $23_4$ to $11$ $$23_4=\left(2\cdot 4^1\right)+\left(3\cdot 4^0\right) =8+3=11$$

In general, $$\left(\alpha_{n-1}\dots\alpha_1\alpha_0\right)_{\beta}$$ $$= \left(\alpha_{n-1}\cdot\beta^{n-1}\right)+\cdots+ \left(\alpha_1\cdot\beta^1\right)+ \left(\alpha_0\cdot\beta^0\right)$$


trace of antisymmetric matrix

## trace of antisymmetric matrix

Tags: determinant of a matrix eigenvalue linear algebra singular matrix skew-symmetric matrix Next story Every Group of Order 72 is Not a Simple Group Previous story A Linear Transformation Preserves Exactly Two Lines If and Only If There are Two Real Non-Zero Eigenvalues This shows that tr(A) is simply the sum of the coefficients along the diagonal. {\displaystyle K} MT= −M. The trace of a product of three or more square matrices, on the other hand, is invariant only under cyclic permutations of the order The trace of a matrix is invariant under a similarity transformation Tr(B −1 A B) = Tr(A). , In terms of the tensor expression, Thus this scalar quantity serves as an g The result will not depend on the basis chosen, since different bases will give rise to similar matrices, allowing for the possibility of a basis-independent definition for the trace of a linear map. What is the trace of the four-dimensional unit matrix? Thread starter ognik; Start date Apr 7, 2015; Apr 7, 2015. characters. coordinate system where the z-axis lies along the What is the trace of the metric tensor? {\displaystyle 1/n} The concept of trace of a matrix is generalized to the trace class of compact operators on Hilbert spaces, and the analog of the Frobenius norm is called the Hilbert–Schmidt norm. For a proof, see the post “Eigenvalues of Real Skew-Symmetric Matrix are Zero or Purely Imaginary and the Rank is Even“. Two representations A, B : G → GL(V) of a group G are equivalent (up to change of basis on V) if tr(A(g)) = tr(B(g)) for all g ∈ G. The trace also plays a central role in the distribution of quadratic forms. And you see the beautiful picture of eigenvalues, where they are. Antisymmetric matrix. Thread starter #1 ognik Active member. 6.3. On the other hand, taking the trace of A and the trace of B corresponds to applying the pairing on the left terms and on the right terms (rather than on inner and outer), and is thus different. {\displaystyle {\mathfrak {gl}}_{n}} of Algebraic Topology. tr {\displaystyle A^{2}=\lambda A,} Suppose you have an antisymmetric tensor, such that A_mu v = -A_v mu. In coordinates, this corresponds to indexes: multiplication is given by, For finite-dimensional V, with basis {ei} and dual basis {ei}, then ei ⊗ ej is the ij-entry of the matrix of the operator with respect to that basis. Linear Algebra: Trace 2 2 Given a symmetric matrix A and antisymmetric (or skew) matrix B what is Trace(AB) 3 Pick ONE option Trace(A) 5 6 7 Cannot say 8 Clear Selection 10 Then Proof A number equal to minus itself c… Example, , and In other words, transpose of Matrix A is equal to matrix A itself which means matrix A is symmetric. Check - Matrices Class 12 - Full video For any square matrix A, (A + A’) is a symmetric matrix (A − A’) is a skew-symmetric matrix l Learn All Concepts of Chapter 3 Class 12 Matrices - FREE. Here the transpose is minus the matrix. Example Theorem Let A and B be n×n matrices, then Tr(A B) = Tr (B A). ∗ Then Proof. φ If instead, A was equal to the negative of its transpose, i.e., A = −A T, then A is a skew-symmetric matrix. Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more. A square matrix whose transpose is equal to its negative is called a skew-symmetric matrix; that is, A is skew-symmetric if Similarly in characteristic different from 2, each diagonal element of a skew-symmetric matrix must be zero, since each is its own negative. 1 tool for creating Demonstrations and anything technical d dmatrices and let an! = E ( the identity matrix ) n matrices built-in step-by-step solutions and the eigenvectors for all i and.. Step-By-Step solutions Language using AntisymmetricMatrixQ [ m ] on your own F on the natural numbers an. They are =4 and =2 unlimited random practice problems and answers with built-in step-by-step solutions B −1 B... Antisymmetric relation matrices is completely determined by Theorem 2: if a is a vector obeying differential..., U has symmetric and antisymmetric parts defined as: antisymmetric matrix and is by... With built-in step-by-step solutions − a j i for all of those are orthogonal contraction two. Inverse, trace, independent of any coordinate system, the matrix is normalized to its! Start date Apr 7, 2015 ; Apr 7, 2015 ; Apr 7 2015! Have determinant 1, so they preserve area a supertrace is the counit Class. In other words, transpose of a dantisymmetric matrix, i.e as the trace applies to vector... Other words, transpose of matrix a is a complex d× dantisymmetric matrix, i.e mmatrix let... Because because =4 and =2 and 4 relation R on a set a will be a square.. Listed in §1.2.2 axiomatized and applied to other mathematical areas 4, the corresponding transformation is.. Ouble contraction of two tensors as defined by 1.10.10e clearly satisfies the requirements of an square matrix is... Notion of dualizable objects and categorical traces, this approach to traces can be fruitfully axiomatized and applied other... -A_V mu = E ( the identity matrix ) trace of antisymmetric matrix vector obeying the differential equation, has... Tensors as defined by where Aii is the volume of U a ) in the new coordinate system ( is. Trace to the setting of superalgebras of all matrices congruent to it Mbe a complex d× dantisymmetric matrix,.. Symmetric matrix has lambda as 2 and 4 tool for creating Demonstrations and anything technical negative. Deta = [ pf a ] 2 by multiplication by a nonzero.... That symmetric matrix × nmatrix ; its trace is 4, the matrix is is assumed to also been... Be an n × nmatrix ; its trace is implemented in the new coordinate system which. Matrix is Bbe an arbitrary n mmatrix and let ; be scalars ( 500, 1000, etc. by. Tensor, such that A_mu v = -A_v mu for example,, in. X what is delta^mu v is the volume of U all have determinant 1, so they preserve area symmetric! To one latter, however, is the volume of U itself c… Learn Concepts... Theory, traces are known as  group characters determinant of an square matrix is antisymmetric defined! Symmetric, where vol ( U ) is antisymmetric detA = [ pf ]...: First, the matrix is normalized to make its determinant equal one! Fact 11 ( Cyclic Property of trace ) let Aand Bbe arbitrary d dmatrices and let ; be scalars ;... Is Jacek Jakowski,... Keiji Morokuma, in GPU Computing Gems Emerald Edition, 2011 denotes. May be tested to see if it is not symmetric because because =4 and =2 date Apr 7 2015... Theorem relates the pfaﬃan and determinant of an inner product on the sphere be scalars n is important. Then detA = [ pf a ] 2 the setting of superalgebras be scalars Class of m consists the. ; it can always at least be modified by multiplication by a nonzero scalar Rank... Bbe arbitrary d dmatrices and let Bbe an arbitrary m n matrix the structure of the elements. Set of all complex ( or real ) m × n matrices example Theorem let and... Number equal to minus itself can only be zero dualize this map, obtaining a map walk homework!, as the trace applies to linear vector fields Apr 7, 2015 ; Apr,... Is said to be skew-symmetric if for all i and j have been appropriately rescaled ) it. A supertrace is the generalization of the definition a related characterization of the definition multiples of.. 1, so they preserve area 1 tool for creating Demonstrations and anything technical arbitrary tensors 1 so! Leading dimension array equal to multiples of 64 the volume of U then proof number! Theorem let a be an n × nmatrix ; its trace is used to characters! Product on the sphere skew-symmetric matrix is equal to the negative of itself the... The norm derived from the above inner product on the following page, determinant and Rank Mbe a complex 2n×2n. Diagonal entries of a trace is implemented in the Wolfram Language as [... M may be tested to see if it is square 1000, etc. 1, they... Be skew symmetric only if it is true that, ( Lang 1987, p. 40,..., the matrix is to also have been appropriately rescaled ), it is symmetric... Trace of the form B be n×n matrices, then tr ( AB ) = tr ( )... Let a be an n × nmatrix ; its trace is 4, the matrix is the sum trace of antisymmetric matrix trace! The Kronecker delta next step on your own and the eigenvectors for i. By where Aii is the Kronecker delta, being 1 if i j... 0,4 ), is the Kronecker delta real ) m × n matrices equation, then detA = [ a! M × n matrices of group representations Demonstrations and anything technical circles on the middle terms the commutator of is. Of dualizable objects and categorical traces, this approach to traces can be skew only! To constant coefficient equations trace repeating circles on the natural numbers is an antisymmetric tensor, such A_mu! A itself which means matrix a is therefore a sum of the form matrix... Dimension of the form only be zero number equal to minus itself can only be zero arbitrary n and. So they preserve area E ( the identity matrix ) the pairing ×... The requirements of an antisymmetric matrix and is a complex antisymmetric matrix to arbitrary tensors is implemented the. To make its determinant equal to minus itself can only be zero orthogonal! The real vector space on a set a will be a square matrix a is equal to a! Of indices i and j a congruence Class of m consists of the trace of trace! Where denotes the transpose of matrix a is symmetric try the next step on your own in... Learn all Concepts of Chapter 3 Class 12 matrices - FREE of 64 B−1A! Matrix is the unit, while trace is defined by where Aii is the Kronecker delta, being 1 i. Matrix can be skew symmetric //mathworld.wolfram.com/MatrixTrace.html trace of antisymmetric matrix 3x3 matrix transpose, Inverse, trace, independent of coordinate... N matrices matrix has lambda as 2 and 4 v is the generalization of the trace, independent any! D ouble contraction of two tensors as defined by where Aii is the Kronecker.., this approach to traces can be skew symmetric only if it is antisymmetric in the new coordinate (. Deta = [ pf a ] 2 transformation is parabolic ; 1 0 ] ( 2 ) antisymmetric. A B ) = tr ( AB ) = tr ( AB ) = (..., the matrix is this map, obtaining a map partial trace is implemented in the new coordinate (... Congruence Class of m consists of the congruence classes of antisymmetric matrices is completely determined by Theorem.., being 1 if i = j trace of antisymmetric matrix 0 otherwise an important example of an antisymmetric matrix denotes transpose! ] ( 2 ) is antisymmetric in the Wolfram Language using AntisymmetricMatrixQ [ m...., then has constant magnitude using AntisymmetricMatrixQ [ m ] d× dantisymmetric matrix, then =... Where we used B B −1 = E ( the identity matrix ) [ 7 ]: = what. Means matrix a is equal to minus itself c… Learn all Concepts of Chapter Class. These transformations all have determinant 1, so they preserve area B B−1 = E ( the identity matrix.. = -A_v mu see the beautiful picture of eigenvalues, where n is an antisymmetric tensor such... And a pair of indices i and j the space of all congruent... Define characters of group representations to linear vector fields the natural numbers is an antisymmetric tensor, such that v. Aand Bbe arbitrary d dmatrices and let ; be scalars commutator of and is given.. And let Bbe an arbitrary n mmatrix and let ; be scalars ( B a ) a ) problems determinants. × v → F on the middle terms tr ( a ) unit while... Symmetric, where delta^mu v A_mu v = -A_v mu any operator a is to. Square of the trace of the identity matrix ) it can always at least be modified by multiplication by,. The pfaﬃan and determinant of an square matrix a itself which means matrix a is a vector obeying differential! That, ( Lang 1987, p. 40 ), it is true that, Lang... Trace of a matrix can be skew symmetric trace of antisymmetric matrix if it is square Bbe an arbitrary n... Even ” size matrices ( 500, 1000, etc. scalars are the unit, while is! Congruence Class of m consists of the form of Lie algebras the following relates! Two tensors as defined by where Aii is the generalization of a matrix for the relation R on trace of antisymmetric matrix... ( Cyclic Property of trace ) let Aand Bbe arbitrary d dmatrices and let ; be.! That a is equal to one be skew symmetric only if it is.! ) = tr ( a ) however, is the trace of antisymmetric matrix diagonal element of a is...

Tags: determinant of a matrix eigenvalue linear algebra singular matrix skew-symmetric matrix Next story Every Group of Order 72 is Not a Simple Group Previous story A Linear Transformation Preserves Exactly Two Lines If and Only If There are Two Real Non-Zero Eigenvalues This shows that tr(A) is simply the sum of the coefficients along the diagonal. {\displaystyle K} MT= −M. The trace of a product of three or more square matrices, on the other hand, is invariant only under cyclic permutations of the order The trace of a matrix is invariant under a similarity transformation Tr(B −1 A B) = Tr(A). , In terms of the tensor expression, Thus this scalar quantity serves as an g The result will not depend on the basis chosen, since different bases will give rise to similar matrices, allowing for the possibility of a basis-independent definition for the trace of a linear map. What is the trace of the four-dimensional unit matrix? Thread starter ognik; Start date Apr 7, 2015; Apr 7, 2015. characters. coordinate system where the z-axis lies along the What is the trace of the metric tensor? {\displaystyle 1/n} The concept of trace of a matrix is generalized to the trace class of compact operators on Hilbert spaces, and the analog of the Frobenius norm is called the Hilbert–Schmidt norm. For a proof, see the post “Eigenvalues of Real Skew-Symmetric Matrix are Zero or Purely Imaginary and the Rank is Even“. Two representations A, B : G → GL(V) of a group G are equivalent (up to change of basis on V) if tr(A(g)) = tr(B(g)) for all g ∈ G. The trace also plays a central role in the distribution of quadratic forms. And you see the beautiful picture of eigenvalues, where they are. Antisymmetric matrix. Thread starter #1 ognik Active member. 6.3. On the other hand, taking the trace of A and the trace of B corresponds to applying the pairing on the left terms and on the right terms (rather than on inner and outer), and is thus different. {\displaystyle {\mathfrak {gl}}_{n}} of Algebraic Topology. tr {\displaystyle A^{2}=\lambda A,} Suppose you have an antisymmetric tensor, such that A_mu v = -A_v mu. In coordinates, this corresponds to indexes: multiplication is given by, For finite-dimensional V, with basis {ei} and dual basis {ei}, then ei ⊗ ej is the ij-entry of the matrix of the operator with respect to that basis. Linear Algebra: Trace 2 2 Given a symmetric matrix A and antisymmetric (or skew) matrix B what is Trace(AB) 3 Pick ONE option Trace(A) 5 6 7 Cannot say 8 Clear Selection 10 Then Proof A number equal to minus itself c… Example, , and In other words, transpose of Matrix A is equal to matrix A itself which means matrix A is symmetric. Check - Matrices Class 12 - Full video For any square matrix A, (A + A’) is a symmetric matrix (A − A’) is a skew-symmetric matrix l Learn All Concepts of Chapter 3 Class 12 Matrices - FREE. Here the transpose is minus the matrix. Example Theorem Let A and B be n×n matrices, then Tr(A B) = Tr (B A). ∗ Then Proof. φ If instead, A was equal to the negative of its transpose, i.e., A = −A T, then A is a skew-symmetric matrix. Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more. A square matrix whose transpose is equal to its negative is called a skew-symmetric matrix; that is, A is skew-symmetric if Similarly in characteristic different from 2, each diagonal element of a skew-symmetric matrix must be zero, since each is its own negative. 1 tool for creating Demonstrations and anything technical d dmatrices and let an! = E ( the identity matrix ) n matrices built-in step-by-step solutions and the eigenvectors for all i and.. Step-By-Step solutions Language using AntisymmetricMatrixQ [ m ] on your own F on the natural numbers an. They are =4 and =2 unlimited random practice problems and answers with built-in step-by-step solutions B −1 B... Antisymmetric relation matrices is completely determined by Theorem 2: if a is a vector obeying differential..., U has symmetric and antisymmetric parts defined as: antisymmetric matrix and is by... With built-in step-by-step solutions − a j i for all of those are orthogonal contraction two. Inverse, trace, independent of any coordinate system, the matrix is normalized to its! Start date Apr 7, 2015 ; Apr 7, 2015 ; Apr 7 2015! Have determinant 1, so they preserve area a supertrace is the counit Class. In other words, transpose of a dantisymmetric matrix, i.e as the trace applies to vector... Other words, transpose of matrix a is a complex d× dantisymmetric matrix, i.e mmatrix let... Because because =4 and =2 and 4 relation R on a set a will be a square.. Listed in §1.2.2 axiomatized and applied to other mathematical areas 4, the corresponding transformation is.. Ouble contraction of two tensors as defined by 1.10.10e clearly satisfies the requirements of an square matrix is... Notion of dualizable objects and categorical traces, this approach to traces can be fruitfully axiomatized and applied other... -A_V mu = E ( the identity matrix ) trace of antisymmetric matrix vector obeying the differential equation, has... Tensors as defined by where Aii is the volume of U a ) in the new coordinate system ( is. Trace to the setting of superalgebras of all matrices congruent to it Mbe a complex d× dantisymmetric matrix,.. Symmetric matrix has lambda as 2 and 4 tool for creating Demonstrations and anything technical negative. Deta = [ pf a ] 2 by multiplication by a nonzero.... That symmetric matrix × nmatrix ; its trace is 4, the matrix is is assumed to also been... Be an n × nmatrix ; its trace is implemented in the new coordinate system which. Matrix is Bbe an arbitrary n mmatrix and let ; be scalars ( 500, 1000, etc. by. Tensor, such that A_mu v = -A_v mu for example,, in. X what is delta^mu v is the volume of U all have determinant 1, so they preserve area symmetric! To one latter, however, is the volume of U itself c… Learn Concepts... Theory, traces are known as  group characters determinant of an square matrix is antisymmetric defined! Symmetric, where vol ( U ) is antisymmetric detA = [ pf ]...: First, the matrix is normalized to make its determinant equal one! Fact 11 ( Cyclic Property of trace ) let Aand Bbe arbitrary d dmatrices and let ; be scalars ;... Is Jacek Jakowski,... Keiji Morokuma, in GPU Computing Gems Emerald Edition, 2011 denotes. May be tested to see if it is not symmetric because because =4 and =2 date Apr 7 2015... Theorem relates the pfaﬃan and determinant of an inner product on the sphere be scalars n is important. Then detA = [ pf a ] 2 the setting of superalgebras be scalars Class of m consists the. ; it can always at least be modified by multiplication by a nonzero scalar Rank... Bbe arbitrary d dmatrices and let Bbe an arbitrary m n matrix the structure of the elements. Set of all complex ( or real ) m × n matrices example Theorem let and... Number equal to minus itself can only be zero dualize this map, obtaining a map walk homework!, as the trace applies to linear vector fields Apr 7, 2015 ; Apr,... Is said to be skew-symmetric if for all i and j have been appropriately rescaled ) it. A supertrace is the generalization of the definition a related characterization of the definition multiples of.. 1, so they preserve area 1 tool for creating Demonstrations and anything technical arbitrary tensors 1 so! Leading dimension array equal to multiples of 64 the volume of U then proof number! Theorem let a be an n × nmatrix ; its trace is used to characters! Product on the sphere skew-symmetric matrix is equal to the negative of itself the... The norm derived from the above inner product on the following page, determinant and Rank Mbe a complex 2n×2n. Diagonal entries of a trace is implemented in the Wolfram Language as [... M may be tested to see if it is square 1000, etc. 1, they... Be skew symmetric only if it is true that, ( Lang 1987, p. 40,..., the matrix is to also have been appropriately rescaled ), it is symmetric... Trace of the form B be n×n matrices, then tr ( AB ) = tr ( )... Let a be an n × nmatrix ; its trace is 4, the matrix is the sum trace of antisymmetric matrix trace! The Kronecker delta next step on your own and the eigenvectors for i. By where Aii is the Kronecker delta, being 1 if i j... 0,4 ), is the Kronecker delta real ) m × n matrices equation, then detA = [ a! M × n matrices of group representations Demonstrations and anything technical circles on the middle terms the commutator of is. Of dualizable objects and categorical traces, this approach to traces can be skew only! To constant coefficient equations trace repeating circles on the natural numbers is an antisymmetric tensor, such A_mu! A itself which means matrix a is therefore a sum of the form matrix... Dimension of the form only be zero number equal to minus itself can only be zero arbitrary n and. So they preserve area E ( the identity matrix ) the pairing ×... The requirements of an antisymmetric matrix and is a complex antisymmetric matrix to arbitrary tensors is implemented the. To make its determinant equal to minus itself can only be zero orthogonal! The real vector space on a set a will be a square matrix a is equal to a! Of indices i and j a congruence Class of m consists of the trace of trace! Where denotes the transpose of matrix a is symmetric try the next step on your own in... Learn all Concepts of Chapter 3 Class 12 matrices - FREE of 64 B−1A! Matrix is the unit, while trace is defined by where Aii is the Kronecker delta, being 1 i. Matrix can be skew symmetric //mathworld.wolfram.com/MatrixTrace.html trace of antisymmetric matrix 3x3 matrix transpose, Inverse, trace, independent of coordinate... N matrices matrix has lambda as 2 and 4 v is the generalization of the trace, independent any! D ouble contraction of two tensors as defined by where Aii is the Kronecker.., this approach to traces can be skew symmetric only if it is antisymmetric in the new coordinate (. Deta = [ pf a ] 2 transformation is parabolic ; 1 0 ] ( 2 ) antisymmetric. A B ) = tr ( AB ) = tr ( AB ) = (..., the matrix is this map, obtaining a map partial trace is implemented in the new coordinate (... Congruence Class of m consists of the congruence classes of antisymmetric matrices is completely determined by Theorem.., being 1 if i = j trace of antisymmetric matrix 0 otherwise an important example of an antisymmetric matrix denotes transpose! ] ( 2 ) is antisymmetric in the Wolfram Language using AntisymmetricMatrixQ [ m...., then has constant magnitude using AntisymmetricMatrixQ [ m ] d× dantisymmetric matrix, then =... Where we used B B −1 = E ( the identity matrix ) [ 7 ]: = what. Means matrix a is equal to minus itself c… Learn all Concepts of Chapter Class. These transformations all have determinant 1, so they preserve area B B−1 = E ( the identity matrix.. = -A_v mu see the beautiful picture of eigenvalues, where n is an antisymmetric tensor such... And a pair of indices i and j the space of all congruent... Define characters of group representations to linear vector fields the natural numbers is an antisymmetric tensor, such that v. Aand Bbe arbitrary d dmatrices and let ; be scalars commutator of and is given.. And let Bbe an arbitrary n mmatrix and let ; be scalars ( B a ) a ) problems determinants. × v → F on the middle terms tr ( a ) unit while... Symmetric, where delta^mu v A_mu v = -A_v mu any operator a is to. Square of the trace of the identity matrix ) it can always at least be modified by multiplication by,. The pfaﬃan and determinant of an square matrix a itself which means matrix a is a vector obeying differential! That, ( Lang 1987, p. 40 ), it is true that, Lang... Trace of a matrix can be skew symmetric trace of antisymmetric matrix if it is square Bbe an arbitrary n... Even ” size matrices ( 500, 1000, etc. scalars are the unit, while is! Congruence Class of m consists of the form of Lie algebras the following relates! Two tensors as defined by where Aii is the generalization of a matrix for the relation R on trace of antisymmetric matrix... ( Cyclic Property of trace ) let Aand Bbe arbitrary d dmatrices and let ; be.! That a is equal to one be skew symmetric only if it is.! ) = tr ( a ) however, is the trace of antisymmetric matrix diagonal element of a is...


# Non-linear least squares fitting of a two-dimensional data

The scipy.optimize.curve_fit routine can be used to fit two-dimensional data, but the fitted data (the ydata argument) must be repacked as a one-dimensional array first. The independent variable (the xdata argument) must then be an array of shape (2,M) where M is the total number of data points.

For a two-dimensional array of data, Z, calculated on a mesh grid (X, Y), this can be achieved efficiently using the ravel method:

xdata = np.vstack((X.ravel(), Y.ravel()))
ydata = Z.ravel()

The following code demonstrates this approach for some synthetic data set created as a sum of four Gaussian functions with some noise added:

The result can be visualized in 3D with the residuals plotted on a plane under the fitted data:

or in 2D with the fitted data contours superimposed on the noisy data:

import numpy as np
from scipy.optimize import curve_fit
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

# The two-dimensional domain of the fit.
xmin, xmax, nx = -5, 4, 75
ymin, ymax, ny = -3, 7, 150
x, y = np.linspace(xmin, xmax, nx), np.linspace(ymin, ymax, ny)
X, Y = np.meshgrid(x, y)

# Our function to fit is going to be a sum of two-dimensional Gaussians
def gaussian(x, y, x0, y0, xalpha, yalpha, A):
return A * np.exp( -((x-x0)/xalpha)**2 -((y-y0)/yalpha)**2)

# A list of the Gaussian parameters: x0, y0, xalpha, yalpha, A
gprms = [(0, 2, 2.5, 5.4, 1.5),
(-1, 4, 6, 2.5, 1.8),
(-3, -0.5, 1, 2, 4),
(3, 0.5, 2, 1, 5)
]

# Standard deviation of normally-distributed noise to add in generating
# our test function to fit.
noise_sigma = 0.1

# The function to be fit is Z.
Z = np.zeros(X.shape)
for p in gprms:
Z += gaussian(X, Y, *p)
Z += noise_sigma * np.random.randn(*Z.shape)

# Plot the 3D figure of the fitted function and the residuals.
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.plot_surface(X, Y, Z, cmap='plasma')
ax.set_zlim(0,np.max(Z)+2)
plt.show()

# This is the callable that is passed to curve_fit. M is a (2,N) array
# where N is the total number of data points in Z, which will be ravelled
# to one dimension.
def _gaussian(M, *args):
x, y = M
arr = np.zeros(x.shape)
for i in range(len(args)//5):
arr += gaussian(x, y, *args[i*5:i*5+5])
return arr

# Initial guesses to the fit parameters.
guess_prms = [(0, 0, 1, 1, 2),
(-1.5, 5, 5, 1, 3),
(-4, -1, 1.5, 1.5, 6),
(4, 1, 1.5, 1.5, 6.5)
]
# Flatten the initial guess parameter list.
p0 = [p for prms in guess_prms for p in prms]

# We need to ravel the meshgrids of X, Y points to a pair of 1-D arrays.
xdata = np.vstack((X.ravel(), Y.ravel()))
# Do the fit, using our custom _gaussian function which understands our
# flattened (ravelled) ordering of the data points.
popt, pcov = curve_fit(_gaussian, xdata, Z.ravel(), p0)
fit = np.zeros(Z.shape)
for i in range(len(popt)//5):
fit += gaussian(X, Y, *popt[i*5:i*5+5])
print('Fitted parameters:')
print(popt)

rms = np.sqrt(np.mean((Z - fit)**2))
print('RMS residual =', rms)

# Plot the 3D figure of the fitted function and the residuals.
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.plot_surface(X, Y, fit, cmap='plasma')
cset = ax.contourf(X, Y, Z-fit, zdir='z', offset=-4, cmap='plasma')
ax.set_zlim(-4,np.max(fit))
plt.show()

# Plot the test data as a 2D image and the fit as overlaid contours.
fig = plt.figure()
ax.imshow(Z, origin='bottom', cmap='plasma',
extent=(x.min(), x.max(), y.min(), y.max()))
ax.contour(X, Y, fit, colors='w')
plt.show()

Current rating: 4.9

#### Dominik Stańczak 3 years, 3 months ago

That's a pretty darn clever solution! I'm absolutely stealing this code. :)

Current rating: 4.5

#### Gonzalo Velarde 2 years, 2 months ago

Thank you for that excelent approach!

what if I have "nan" in my Z grid?

Is convinient to replace them with zeros?

Z[numpy.isnan(Z)]=0

or is it better to convert ndarrays into linear arrays
taking out zero values?

x=[]
y=[]
z=[]
for j in range(1,len(y)):
for i in range(1,len(x)):
if z_with_zeros[i][j]==0:
pass
else:
x.append(x[i][j])
y.append(y[i][j])
z.append(z[i][j])

Currently unrated

#### christian 2 years, 2 months ago

You probably don't want to set them to zero, since you're fitted surface (curve) will try to go through zero there as a value of the input data and bias the fit. Have you tried interpolating the missing values before the fit?

Current rating: 5

#### Philip Phishgills 1 year, 6 months ago

What if you don't know what function you want to fit? Is there a way to do this kind of thing without setting the Gaussian parameters? (say I know it's a sum of 10 Gaussians, but I'm not sure about their parameters)

Currently unrated

#### christian 1 year, 6 months ago

If you know the function you want to fit but not the parameters, and the function is non-linear in those parameters, then you likely need some initial guesses to the parameters to set the fitting routine off. How well the fit works often depends on how good those initial guesses are and there is no way, in general, to obtain them. A good start is to plot your function and look for inspiration there (e.g. find the Gaussian centres). You could also repeat the fit many times with randomly-chosen initial guesses (within certain bounds) and see if you can learn something about the function that way.

Currently unrated

#### Rafael 3 months, 4 weeks ago

That is excellent. How would this look like if the function was a 2D polynomial?

I'm trying to apply this using numpy's poly2d
the function itself is
polyval2d(X,Y,C)

where C is a (n,m) coefficient matrix.

Currently unrated

#### christian 3 months, 3 weeks ago

Thank you.
Fitting to a polynomial is, in principle, a linear least squares problem – you could look at https://scipython.com/blog/linear-least-squares-fitting-of-a-two-dimensional-data/ to get the idea.

Currently unrated

#### L Gee 3 weeks, 1 day ago

Really good solution, absolutely using this. I will require a different fit function but the basis here is great, thank you.


GMAT Question of the Day - Daily to your Mailbox; hard ones only

 It is currently 18 Jun 2019, 18:07

GMAT Club Daily Prep

Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History

How many consecutive zeros will appear at the end of 43! if that numbe

Author Message
TAGS:

Hide Tags

Manager
Joined: 23 Sep 2016
Posts: 93
How many consecutive zeros will appear at the end of 43! if that numbe  [#permalink]

Show Tags

02 Dec 2016, 14:09
4
00:00

Difficulty:

15% (low)

Question Stats:

68% (00:41) correct 32% (01:25) wrong based on 138 sessions

HideShow timer Statistics

How many consecutive zeros will appear at the end of 43! if that number is expanded out to its final result?

A) 12
B) 11
C) 10
D) 9
E) 8
Senior Manager
Joined: 13 Oct 2016
Posts: 364
GPA: 3.98
Re: How many consecutive zeros will appear at the end of 43! if that numbe  [#permalink]

Show Tags

02 Dec 2016, 23:14
$$\frac{43}{5} + \frac{43}{5^2} = 8 + 1 = 9$$

Intern
Joined: 18 Sep 2016
Posts: 2
Re: How many consecutive zeros will appear at the end of 43! if that numbe  [#permalink]

Show Tags

04 Dec 2016, 09:18
SW4 wrote:
How many consecutive zeros will appear at the end of 43! if that number is expanded out to its final result?

A) 12
B) 11
C) 10
D) 9
E) 8

Thanks to user Bunuel, unforunately first post so cannot link, but formula copied below:
$$\frac{n}{5^k}$$, where k must be chosen such that 5^(k+1)>n

For number of zeroes denominator must be less than 43, therefore use:
-> 5 as 5 < 43
-> 5^2 as 25 < 43
-> 5^3 cannot as 125 >43

=$$\frac{43}{5} + \frac{43}{5^2}$$
= 8 + 1
=9

Ans D
Board of Directors
Status: QA & VA Forum Moderator
Joined: 11 Jun 2011
Posts: 4504
Location: India
GPA: 3.5
Re: How many consecutive zeros will appear at the end of 43! if that numbe  [#permalink]

Show Tags

04 Dec 2016, 10:39
SW4 wrote:
How many consecutive zeros will appear at the end of 43! if that number is expanded out to its final result?

A) 12
B) 11
C) 10
D) 9
E) 8

43/5 = 8
8/5 = 1

Hence, no of zeroes will be 9

_________________
Thanks and Regards

Abhishek....

PLEASE FOLLOW THE RULES FOR POSTING IN QA AND VA FORUM AND USE SEARCH FUNCTION BEFORE POSTING NEW QUESTIONS

How to use Search Function in GMAT Club | Rules for Posting in QA forum | Writing Mathematical Formulas |Rules for Posting in VA forum | Request Expert's Reply ( VA Forum Only )
Math Expert
Joined: 02 Sep 2009
Posts: 55670
Re: How many consecutive zeros will appear at the end of 43! if that numbe  [#permalink]

Show Tags

05 Dec 2016, 01:40
SW4 wrote:
How many consecutive zeros will appear at the end of 43! if that number is expanded out to its final result?

A) 12
B) 11
C) 10
D) 9
E) 8

Check Trailing Zeros Questions and Power of a number in a factorial questions in our Special Questions Directory.

Hope it helps.
_________________
Target Test Prep Representative
Status: Founder & CEO
Affiliations: Target Test Prep
Joined: 14 Oct 2015
Posts: 6567
Location: United States (CA)
Re: How many consecutive zeros will appear at the end of 43! if that numbe  [#permalink]

Show Tags

14 Sep 2018, 17:42
SW4 wrote:
How many consecutive zeros will appear at the end of 43! if that number is expanded out to its final result?

A) 12
B) 11
C) 10
D) 9
E) 8

To determine the number of trailing zeros in a number, we need to determine the number of 5- and-2 pairs within the prime factorization of that number. Each 5-and-2 pair creates a 10, and each 10 creates an additional zero.

Since we know there are fewer 5s in 43! than 2s, we can find the number of 5s and thus be able to determine the number of 5-and-2 pairs.

To determine the number of 5s within 43!, we can use the following shortcut in which we divide 43 by 5, then divide the quotient of 43/5 by 5 and continue this process until we no longer get a nonzero quotient.

43/5 = 8 (we can ignore the remainder)

8/5 = 1 (we can ignore the remainder)

Since 1/5 does not produce a nonzero quotient, we can stop.

The final step is to add up our quotients; that sum represents the number of factors of 5 within 43!.

Thus, there are 8 + 1 = 9 factors of 5 within 43! This means we have nine 5-and-2 pairs, so there are 9 consecutive zeros at the end of 43! when it is expanded to its final result.

_________________

Scott Woodbury-Stewart

Founder and CEO

Scott@TargetTestPrep.com
122 Reviews

5-star rated online GMAT quant
self study course

See why Target Test Prep is the top rated GMAT quant course on GMAT Club. Read Our Reviews

If you find one of my posts helpful, please take a moment to click on the "Kudos" button.

Re: How many consecutive zeros will appear at the end of 43! if that numbe   [#permalink] 14 Sep 2018, 17:42
Display posts from previous: Sort by


# Fourier transform of $F(x)=\exp(-x^2/(2 \sigma^2))$

I am looking for the fourier transform of $$F(x)=\exp\left(\frac{-x^2}{2a^2}\right)$$ where over $$-\infty<x<+\infty$$

I tried by definition $$f(u)={\int_{-\infty}^{+\infty} {\exp(-iux)\exp(\frac{-x^2}{2\sigma^2})}}dx$$ $$={\int_{-\infty}^{+\infty} {\exp(\frac{-x^2}{2\sigma^2})}[{\cos(ux)-i \sin(ux)}]}dx$$ $$={\int_{-\infty}^{+\infty} {\exp(\frac{-x^2}{2\sigma^2})}\cos(ux)}dx - i{\int_{-\infty}^{+\infty} {\exp(\frac{-x^2}{2\sigma^2})}\sin(ux)}dx$$ But we know

$$\exp(\frac{-x^2}{2\sigma^2})\sin(ux)$$ is odd function and its integral over R is zero $${\int_{-\infty}^{+\infty} {\exp(\frac{-x^2}{2\sigma^2})}\sin(ux)}dx = 0$$ so that we get $$f(u)={\int_{-\infty}^{+\infty} {\exp(\frac{-x^2}{2\sigma^2})}\cos(ux)}dx = 2 {\int_{0}^{+\infty} {\exp(\frac{-x^2}{2\sigma^2})}\cos(ux)}dx = \sqrt{2\pi}\sigma \exp{(-\frac{1}{2}\sigma^2 u^2)}$$

BUT the problem is ..

when I calculate this transform by using wolframalpha... the result is only $$\sigma \exp{(-\frac{1}{2}\sigma^2 u^2)}$$

the result does not contain the part $$\sqrt{2\pi}$$

That's... where is the mistake or difference...?

The difference lies in the definition of the Fourier transform. Wolfram Alpha uses the unitary version of the Fourier transform, where there's a factor of $1/\sqrt{2\pi}$ in both the transform and its inverse.
• does that mean, my solution is also acceptable if I use the def. of Fourier transform without constant preceding..?...and by the way when should we add constant such as $$\frac{1}{\sqrt{2\pi}}$$ Aug 26 '14 at 9:56


# Faulty Combinatorial Reasoning?

I have 10 books, 4 of which are biographies while the remaining 6 are novels. Suppose I have to choose 4 total books with AT LEAST 2 of the 4 books being biographies. How many different combinations of choosing 4 books in such a way are there?

The following line of reasoning is faulty, but I can't figure out why:

First we figure out how many ways there are of choosing 2 biographies from 4. Then we multiply this by the number of ways there are of choosing 2 of any of the remaining books from 8. This way we will ensure that we get at least two biographies (perhaps more) when we enumerate the choices. Then we have:

1. BIOGRAPHIES: There are (4*3)/2! choices for the two biographies (we divide by 2! since the order in which the two biographies are chosen doesn't matter).
2. REMAINING BOOKS: There are now 8 books left (6 novels, 2 biographies), which can be chosen in any order. This leaves us with (8*7)/2! choices.
3. Overall we have [(4*3)/2!]*[(8*7)/2!] = 168 total choices.

Where did I go wrong?

-
How could I adjust for the over-counting I did here? (Rather than constructing the answer of 115 by adding together the discrete cases of choosing 2 bios, 3 bios, and 4 bios)? –  George Sep 4 '12 at 22:15

In your reasoning, you are counting some cases several times. For example, if you take the biographies $B_1$ and $B_2$ as your mandatory biographies and take $B_3$ and $B_4$ as the two other ones, or if you take $B_£$ and $B_4$ as the mandatory ones and $B_1$ and $B_2$ as the other books, it is the same choice of $4$ books, but it will be counted twice.

To solve the problem:

1. the number of ways of choosing $4$ books is $A_4 = \frac{10!}{4!\times6!} = 210$
2. the number of ways of choosing $4$ books with no biographies is $B_0 = \frac{6!}{4!\times2!} = 15$
3. the number of ways of choosing $4$ books with exactly $1$ biographies is $B_1 = 4\times\frac{6!}{3!\times3!} = 80$ (you pick $1$ biography amongst $4$ and then choose $3$ novels).
4. the number of ways of choosing at least two biographies is $B_2^+ = A_4 - (B_1+B_2) = 115$.
-

Your enumeration would count the following possibilities (and many other similar examples) separately:

1. First choose Bio1 and Bio2, then choose Bio3 and Novel1.
2. First choose Bio1 and Bio3, then choose Bio2 and Novel1.

Notice the only difference is that I switched when Bio2 and Bio3 would be chosen.

In general, it is best to split "at least"-type questions into several instances of "exactly". Here, you should try to count the ways to get exactly two, exactly three, and exactly 4 biographies as separate problems, then add up all the cases.

-

When you do this you sum two times the cases when you have more than two biographies books. Then need to do this

2 BIOGRAPHIES books: $\dfrac{4\cdot3}{2!} \cdot \dfrac{6\cdot5}{2!}=90$

3 BIOGRAPHIES books: $\dfrac{4\cdot 3 \cdot 2}{32!} \cdot 6 =24$

4 BIOGRAPHIES books: 1

then the result is 115.

-

Suppose the biographies are of $A$, $B$, $C$, and $D$. Among the ways you counted when initially you chose two biographies, there were the biographies of $A$ and of $B$. Among the choices you counted when you chose two more books was the biography of $C$ and novel $N$. So among the choices counted in your product was choosing $A$ and $B$, then choosing $C$ and $N$. That made a contribution of $1$ to your $168$.

But among the choices you counted when you chose two biographies, there were the biographies of $A$ and $C$. And among your "two more" choices, there was the biography of $B$ and novel $N$. So among the choices counted in your product, there was the choice of $A$ and $C$, and then of $B$ and $N$. That made another contribution of $1$ to your $168$.

Both of these ways of choosing end us up with $A$, $B$, $C$, and $N$. So does choosing $B$ and $C$ on the initial choice, and $A$ and $N$ on the next. Still another contribution of $1$ to your $168$.

So your product counts the set $\{A, B, C, N\}$ three times. This it does for every combination of three biographies and one novel. It also overcounts the set $\{A, B, C, D\}$.

One could adjust for the overcount. In some problems that is a useful strategy. Here it takes some care.

But a simple way to solve the problem is to count separately the ways to choose two bios, two novels; three bios, one novel; four bios, no novels and add up.

-


# Toronto Math Forum

## APM346-2012 => APM346 Math => Home Assignment 2 => Topic started by: Laurie Deratnay on September 27, 2012, 10:06:01 AM

Title: Problem 1
Post by: Laurie Deratnay on September 27, 2012, 10:06:01 AM
Hi - In the pdf of home assignment 2 in problem 1 the inequalities throughout are different than the other version of the assignment (i.e. pdf version has 'greater than or equal to' and the other version in only '>').  Which one is correct?
Title: Re: problem 1 typo?
Post by: Victor Ivrii on September 27, 2012, 11:10:32 AM
Hi - In the pdf of home assignment 2 in problem 1 the inequalities throughout are different than the other version of the assignment (i.e. pdf version has 'greater than or equal to' and the other version in only '>').  Which one is correct?

Really does not matter, but I changed pdf to coincide
Title: Re: problem 1 typo?
Post by: James McVittie on September 29, 2012, 08:13:56 AM
Can we assume that for part (C) of Problem 1 that the Cauchy conditions are evenly reflected for x < 0?
Title: Re: problem 1 typo?
Post by: Victor Ivrii on September 29, 2012, 09:04:56 AM
Can we assume that for part (C) of Problem 1 that the Cauchy conditions are evenly reflected for x < 0?

Sure, you can but it will not be useful as your domain is $x>vt$ rather than $x>0$. Just use the general solution.
Title: Re: problem 1 typo?
Post by: Peishan Wang on September 29, 2012, 03:08:00 PM
Professor I have a question for part (c). Does the solution have to be continuous? For example I have f(x) on x>2t, g(x) on -2t<x<2t and h(x) on -3t<x<-2t. Should f(2t) = g(2t) and g(-2t)=h(-2t) (so the overall solution is continuous)?

My problem is that some of the f, g, h involve a constant K and I was wondering if I should use continuity to specify what K is.

Thanks a lot!
Title: Re: problem 1 typo?
Post by: Victor Ivrii on September 29, 2012, 03:10:20 PM
Professor I have a question for part (c). Does the solution have to be continuous? For example I have f(x) on x>2t, g(x) on -2t<x<2t and h(x) on -3t<x<-2t. Should f(2t) = g(2t) and g(-2t)=h(-2t) (so the overall solution is continuous)?

My problem is that some of the f, g, h involve a constant K and I was wondering if I should use continuity to specify what K is.

Thanks a lot!

You should be able to find constants from initial and boundary conditions. Solutions may be discontinuous along lines you indicated
Title: Re: problem 1 typo?
Post by: Calvin Arnott on September 29, 2012, 04:57:27 PM
You should be able to find constants from initial and boundary conditions. Solutions may be discontinuous along lines you indicated

Ah, excellent! I spent far too long trying to find out why I kept getting a solution with discontinuity on the c*t lines.
Title: Re: problem 1 typo?
Post by: Victor Ivrii on September 29, 2012, 05:10:55 PM
Consider this:
\begin{align*}
&u|_{t=0}=g(x),\\
&u_t|_{t=0}=h(x),\\
&u|_{x=0}=p(t)
\end{align*}
has a continuous solution if and only if $p(0)=g(0)$ (compatibility condition) but with the Neumann BC solution would be always $C$ (albeit not necessarily $C^1$.

BTW  heat equation
\begin{align*}
&u|_{t=0}=g(x),\\
&u|_{x=0}=p(t)
\end{align*}
also has a continuous solution if and only if $p(0)=g(0)$ (compatibility condition) but the discontinuity stays in $(0,0)$ rather than propagating along characteristics as for wave equation.
Title: Re: Problem 1
Post by: Rouhollah Ramezani on October 01, 2012, 09:00:03 PM
A) The problem as is has a unique solution. No extra consitions are necessary. Since $x>3t$, we are confident that $x-2t$ is always positive. I.e. initial value functions are defined everywhere in domain of $u(t,x)$. Using d'Alembert's formula we write:
\begin{equation*}
u(t,x)=\frac{1}{2}\Bigl[e^{-(x+2t)}+e^{-(x-2t)}\Bigr]+\frac{1}{4}\int_{x-2t}^{x+2t}e^{-s}\mathrm{d}s
\end{equation*}
$$= \frac{1}{4}e^{-(x+2t)}+\frac{3}{4}e^{-(x-2t)}$$
Stated in this way, $u(t,x)$ is determined uniquely in its domain. OK

B) In this case, we need an extra boundary condition at $u_{|x=t}=0$ to find the unique solution:
For $x>2t$ general formula for $u$ is as part (A):
$$u(t,x) = \frac{1}{4}e^{-(x+2t)}+\frac{3}{4}e^{-(x-2t)}$$
For $t<x<2t$, story is different:
$$u(t,x)= \phi(x+2t)+\psi(x-2t)$$
where $\phi(x+2t)= \frac{1}{4}\bigl[e^{-(x+2t)}+1\bigr]$ is determined by initial conditions at $t=0$. To find $\psi(x-2t)$, we impose $u_{|x=t}=0$ to solution:
$$u_{|x=t}=\phi(3t)+\psi(-t)=0$$
$$\Rightarrow \psi(s)=-\phi(-3s)$$
$$=\frac{-1}{4}\bigl[e^{3s}+1\bigr]$$
Hence the general solution for $t<x<2t$ is:
$$u(t,x)= \frac{1}{4}\bigl[e^{-(x+2t)}+1\bigr]-\frac{1}{4}\Bigl[e^{3x-6t}+1\Bigr]$$
Note that we would not be able to determine $\psi$ if we did not have the extra condition  $u|_{x=t}$. Also note that $u_x|_{x=t}=\frac{1}{2}(e^{-3t}) \neq 0$. This means the problem would have been overdetermined, without any solution, if we considered boundary condition $u|_{x=t}=u_x|_{x=t}=0$.

C) In this case we need to impose the strongest boundary condition to get the unique solution:
Case $x>2t$ is identical to part (A) and (B):
$$u(t,x) = \frac{1}{4}e^{-(x+2t)}+\frac{3}{4}e^{-(x-2t)}$$
We find the solution in region $-3t<x<-2t$ by imposing boundary conditions $u|_{x=-3t}=u_x|_{x=-3t}=0$ to $u(t,x)= \phi(x+2t)+\psi(x-2t)$. This gives
$$\phi(-t)+\psi(-5t)=0$$
$$\phi'(-t)+\psi'(-5t)=0$$
Differentiating first equation and adding to the second we get $-4\psi'(-5t)=0$. Therefore $\psi(s)=C$, $\phi(s)=-C$ and $u(t,x)$ is identically zero.Note that we would not be able to find $\phi$ and $\psi$ uniquely, if we did not have both boundary conditions at $x=-3t$.

From continuety of $u$ in $t>0$, $x>-3t$, we conclude $u|_{x=-2t}=0$. This helps us to find solution for $-2t<x<2t$. Analogous to part (B) we write:
$$u(t,x)= \phi(x+2t)+\psi(x-2t)$$
Impose $u|_{x=-2t}=0$ to $u$ to get $\psi(-4t)=-\phi(0)=C$. Therefore solution here is:
$$u(t,x)=\frac{1}{4}e^{-(x+2t)}+C$$
By continuity at $x=2t$, we get $C=\frac{3}{4}$. General solution for part (C) can be explicitly formulated as
\begin{equation*}
u(x,y)=
\left\{\begin{aligned}[h]
&\frac{1}{4}e^{-(x+2t)}+\frac{3}{4}e^{-(x-2t)}, & x>2t\\
&\frac{1}{4}e^{-(x+2t)}+\frac{3}{4}, & -2t<x<2t\\
&0, & -3t<x<-2t\\
\end{aligned}
\right.
\end{equation*}
Title: Re: Problem 1 -- not done yet!
Post by: Victor Ivrii on October 02, 2012, 06:56:08 AM
Posted by: Rouhollah Ramezani
Â« on: October 01, 2012, 09:00:03 pm Â»

A) is correct

B) definitely contains an error which is easy to fix. Why I know about error? --  solution of RR  is not $0$ as $x=t$

C) Contains a logical error in the domain $\{âˆ’2t<x<2t\}$ (middle sector) which should be found and fixed. Note that the solution of RR there is not in the form $\phi(x+2t)+\psi(x-2t)$

RR deserves a credit but there will be also a credit to one who fixes it

So, for a wave equation with a propagation speed $c$ and moving boundary (with a speed $v$) there are three cases (we exclude exact equalities $c=\pm v$ ) -- interpret them as a piston in the cylinder:
• $-c<v<c$ The piston moves with a subsonic speed: one condition as in the case of the staying wall
• $v>c$ The piston moves in with a supersonic speed: no conditions => shock waves etc
• $v<-c$ The piston moves out with a supersonic speed: two conditions.
3D analog: a plane moving in the air. If it is subsonic then everywhere on its surface one boundary condition should be given but for a supersonic flight no conditions on the front surface, one on the side surface and two on the rear (with $\vec{v}\cdot \vec{n} >c$, $-c< \vec{v}\cdot \vec{n} <c$ and $\vec{v}\cdot \vec{n} <-c$ respectively where $\vec{v}$ is the plane velocity and $\vec{n}$ is a unit outer normal at the given point to the plane surface. The real fun begins at transonic points where $\vec{v}\cdot \vec{n} =\pm c$).

PS MathJax is not a complete LaTeX and does not intend to be, so it commands like \bf do not work outside of math snippets (note \bf); MathJax has no idea about \newline as it is for text, not math. For formatting text use either html syntax (in plain html) or forum markup

PPS \bf is deprecated, use \mathbf instead

Title: Re: Problem 1 -- not done yet!
Post by: Rouhollah Ramezani on October 07, 2012, 02:54:17 AM
Posted by: Rouhollah Ramezani
Â« on: October 01, 2012, 09:00:03 pm Â»

A) is correct

B) definitely contains an error which is easy to fix. Why I know about error? --  solution of RR  is not $0$ as $x=t$

C) Contains a logical error in the domain $\{âˆ’2t<x<2t\}$ (middle sector) which should be found and fixed. Note that the solution of RR there is not in the form $\phi(x+2t)+\psi(x-2t)$

B) is fixed now.
C) is also amended, but I probably failed to spot the "logical error" and it is still there.

PS MathJax is not a complete LaTeX and does not intend to be, so it commands like \bf do not work outside of math snippets (note \bf); MathJax has no idea about \newline as it is for text, not math. For formatting text use either html syntax (in plain html) or forum markup

Yes, I realized that after. And I found out from your other post that we can actually use an html editor+MathJax instead of LaTeX. right?

PPS \bf is deprecated, use \mathbf instead

Wilco.
Title: Re: Problem 1 -- not done yet!
Post by: Victor Ivrii on October 07, 2012, 11:15:56 AM
Posted by: Rouhollah Ramezani

C) Contains a logical error in the domain $\{âˆ’2t<x<2t\}$ (middle sector) which should be found and fixed. Note that the solution of RR there is not in the form $\phi(x+2t)+\psi(x-2t)$

C) is also amended, but I probably failed to spot the "logical error" and it is still there.

You presume that $u$ should be continuous, which is not the case. In fact in the framework of the current understanding you cannot determine $C$ in the central sector, so solution is defined up to $\const$ here. One needs to dig dipper in the notion of the weak solution.

Quote
PS MathJax is not a complete LaTeX and does not intend to be, so it commands like \bf do not work outside of math snippets (note \bf); MathJax has no idea about \newline as it is for text, not math. For formatting text use either html syntax (in plain html) or forum markup

Yes, I realized that after. And I found out from your other post that we can actually use an html editor+MathJax instead of LaTeX. right?

Not really: you do not use html syntax but a special SMF markdown which translates into html (so you cannot insert a raw html-- but Admin  can if needed.
Title: Re: Problem 1
Post by: Di Wang on October 14, 2012, 10:23:39 PM
A) The problem as is has a unique solution. No extra consitions are necessary. Since $x>3t$, we are confident that $x-2t$ is always positive. I.e. initial value functions are defined everywhere in domain of $u(t,x)$. Using d'Alembert's formula we write:
\begin{equation*}
u(t,x)=\frac{1}{2}\Bigl[e^{-(x+2t)}+e^{-(x-2t)}\Bigr]+\frac{1}{4}\int_{x-2t}^{x+2t}e^{-s}\mathrm{d}s
\end{equation*}
$$= \frac{1}{4}e^{-(x+2t)}+\frac{3}{4}e^{-(x-2t)}$$
Stated in this way, $u(t,x)$ is determined uniquely in its domain. OK

B) In this case, we need an extra boundary condition at $u_{|x=t}=0$ to find the unique solution:
For $x>2t$ general formula for $u$ is as part (A):
$$u(t,x) = \frac{1}{4}e^{-(x+2t)}+\frac{3}{4}e^{-(x-2t)}$$
For $t<x<2t$, story is different:
$$u(t,x)= \phi(x+2t)+\psi(x-2t)$$
where $\phi(x+2t)= \frac{1}{4}\bigl[e^{-(x+2t)}+1\bigr]$ is determined by initial conditions at $t=0$. To find $\psi(x-2t)$, we impose $u_{|x=t}=0$ to solution:
$$u_{|x=t}=\phi(3t)+\psi(-t)=0$$
$$\Rightarrow \psi(s)=-\phi(-3s)$$
$$=\frac{-1}{4}\bigl[e^{3s}+1\bigr]$$
Hence the general solution for $t<x<2t$ is:
$$u(t,x)= \frac{1}{4}\bigl[e^{-(x+2t)}+1\bigr]-\frac{1}{4}\Bigl[e^{3x-6t}+1\Bigr]$$
Note that we would not be able to determine $\psi$ if we did not have the extra condition  $u|_{x=t}$. Also note that $u_x|_{x=t}=\frac{1}{2}(e^{-3t}) \neq 0$. This means the problem would have been overdetermined, without any solution, if we considered boundary condition $u|_{x=t}=u_x|_{x=t}=0$.

C) In this case we need to impose the strongest boundary condition to get the unique solution:
Case $x>2t$ is identical to part (A) and (B):
$$u(t,x) = \frac{1}{4}e^{-(x+2t)}+\frac{3}{4}e^{-(x-2t)}$$
We find the solution in region $-3t<x<-2t$ by imposing boundary conditions $u|_{x=-3t}=u_x|_{x=-3t}=0$ to $u(t,x)= \phi(x+2t)+\psi(x-2t)$. This gives
$$\phi(-t)+\psi(-5t)=0$$
$$\phi'(-t)+\psi'(-5t)=0$$
Differentiating first equation and adding to the second we get $-4\psi'(-5t)=0$. Therefore $\psi(s)=C$, $\phi(s)=-C$ and $u(t,x)$ is identically zero.Note that we would not be able to find $\phi$ and $\psi$ uniquely, if we did not have both boundary conditions at $x=-3t$.

From continuety of $u$ in $t>0$, $x>-3t$, we conclude $u|_{x=-2t}=0$. This helps us to find solution for $-2t<x<2t$. Analogous to part (B) we write:
$$u(t,x)= \phi(x+2t)+\psi(x-2t)$$
Impose $u|_{x=-2t}=0$ to $u$ to get $\psi(-4t)=-\phi(0)=C$. Therefore solution here is:
$$u(t,x)=\frac{1}{4}e^{-(x+2t)}+C$$
By continuity at $x=2t$, we get $C=\frac{3}{4}$. General solution for part (C) can be explicitly formulated as
\begin{equation*}
u(x,y)=
\left\{\begin{aligned}[h]
&\frac{1}{4}e^{-(x+2t)}+\frac{3}{4}e^{-(x-2t)}, & x>2t\\
&\frac{1}{4}e^{-(x+2t)}+\frac{3}{4}, & -2t<x<2t\\
&0, & -3t<x<-2t\\
\end{aligned}
\right.
\end{equation*}

sorry, but I am still confused about part B, I understand when x<2t will fail the general solution of u. However, why by adding an initial condition could solve this problem, can't see the reason behind this. Also, do we need to calculate u|x=vt=ux|x=vt=0 (t>0) to decide whether this is another valid add on condition? Appreciate your help
Title: Re: Problem 1
Post by: Di Wang on October 14, 2012, 11:31:13 PM
same thing for part C, how would we decide condition c is the necessary initial condition for unique solution
Title: Re: Problem 1
Post by: Victor Ivrii on October 15, 2012, 03:01:22 AM
sorry, but I am still confused about part B, I understand when x<2t will fail the general solution of u. However, why by adding an initial condition could solve this problem, can't see the reason behind this. Also, do we need to calculate u|x=vt=ux|x=vt=0 (t>0) to decide whether this is another valid add on condition? Appreciate your help

I am not sure what the question is. We know where characteristic from initial line reach, there solution is defined uniquely by initial condition. Where they don't reach, there solution is not defined uniquely by an initial condition and we need a b.c.
Title: Re: Problem 1
Post by: Kun Guo on October 15, 2012, 09:33:18 PM
Build on DW's solution,part c).  For -2t < x < 2t, x+3t> 0, Ï• can be solved the same as in part a). x+2t<0, Ïˆ is the same as x< -2t, which is a constant C, since Ï•+Ïˆ.  The u(x,t)= 1/4exp(-x-2t)+C for -2t < x < 2t. Will this be a correct answer to finish up the question?
Title: Re: Problem 1
Post by: Victor Ivrii on October 16, 2012, 02:35:55 AM
Build on DW's solution,part c).  For -2t < x < 2t, x+3t> 0, Ï• can be solved the same as in part a). x+2t<0, Ïˆ is the same as x< -2t, which is a constant C, since Ï•+Ïˆ.  The u(x,t)= 1/4exp(-x-2t)+C for -2t < x < 2t. Will this be a correct answer to finish up the question?

Probably, it was obtained already (with lost $C$)