# Is $\sum\limits_{n=1}^\infty \frac{|\sin n|^n}n$ convergent？

Is the series

$$\sum_{n=1}^\infty \frac{|\sin n|^n}n\tag{1}$$

convergent？

If one want to use Abel's test, is

$$\sum_{n=1}^\infty |\sin n|^n\tag{2}$$

convergent？

Thank you very much

The second series is divergent because the irrational number $\frac{\pi}{2}$ has an infinite number of convergents $\frac{p_n}{q_n}$ with an odd denominator, hence $\left|\frac{p_n}{q_n}-\frac{\pi}{2}\right|\leq\frac{1}{q_n^2}$ gives: $$\left|\sin(p_n)\right| = \left|\sin\left(\frac{\pi}{2}q_n+\frac{\theta}{q_n}\right)\right|=\left|\cos\frac{\theta}{q_n}\right|,\quad |\theta|\leq 1,$$ $$\left|\sin(p_n)\right|\geq 1-\frac{1}{q_n^2}$$ hence $\left|\sin n\right|^n$ is bigger that $\left(1-\frac{1}{n^2}\right)^n$ infinitely often and the partial sums of $\sum_{n\in\mathbb{N}}\left|\sin n\right|^n$ cannot be bounded. However, they cannot grow too fast: numerical experiments give

$$\sum_{n=1}^{N}\left|\sin n\right|^n=O\left(N^{1/2}\right)\tag{1}$$

(consistent with the Weyl bounds for the partial sums of $\sum_{n\in\mathbb{N}}e^{in^2}$) that is enough to state that $$\sum_{n=1}^{+\infty}\frac{\left|\sin n\right|^n}{n}$$ converges by partial summation. This is also consistent with the model for which $\left|\sin n\right|$ acts like $\sin X$ where $X$ is a random variable, uniformly distributed over $[0,\pi]$: $$E\left[\sum_{n=1}^{+\infty}\frac{(\sin X)^n}{n}\right]=\frac{1}{\pi}\int_{0}^{\pi}-\log(1-\sin\theta)\,d\theta=\frac{4K}{\pi}+\log 2<+\infty.$$ A possible strategy in order to prove $(1)$ is to prove first, through Weyl's equidistribution theorem, that, provided that $M$ is big enough:

$$\sum_{n=N+1}^{N+M}\left|\sin n\right|^r\approx \frac{M}{\pi}\int_{0}^{\pi}\sin^r\theta\,d\theta,\tag{2}$$

then exploit the fact that:

$$\int_{0}^{\pi}\sin^r \theta\,d\theta = O\left(\frac{1}{\sqrt{r}}\right).\tag{3}$$

By putting together $(2)$ and $(3)$ we get:

$$\sum_{i=1}^{M^2}\left|\sin n\right|^n\leq\sum_{j=0}^{M-1}\sum_{n=Mj+1}^{M(j+1)}\left|\sin n\right|^{Mj+1}\ll M\cdot\sum_{j=0}^{M-1}\frac{1}{\sqrt{Mj+1}}\ll M.\tag{4}$$

Moreover, since the supremum of the derivative of $\sin^r\theta$ over $[0,\pi]$ behaves like $\sqrt{\frac{r}{e}}$, keeping track of all the constants we get: $$\sum_{n=1}^{+\infty}\frac{\left|\sin n\right|^n}{n}\leq\frac{2}{\sqrt{\pi}}\left(1+\frac{1}{\sqrt{e}}\right)\zeta(3/2) = 4.73565\ldots$$ that is not too much far from the truth (given by partial summation and explicit numerical computations till $n=10^8$, with an error term $\frac{C}{10^4}$):

$$\sum_{n=1}^{+\infty}\frac{\left|\sin n\right|^n}{n}\leq \color{red}{2.151}.\tag{5}$$

Post-mortem addendum: it is interesting to study tailor-made numerical methods for the computation of such very slowly-converging series.

• Do you have an idea on how to prove the estimate with $O(N^{1/2+\epsilon})$? – Gabriel Romon Jun 16 '14 at 13:02
• @G.T.R: I extended my answer including my thoughts about proving the crucial estimate. – Jack D'Aurizio Jun 16 '14 at 16:50
• @Jack D'Aurizio: Writing in MMA Sum[Abs[Sin[n]]^n/n, {n, 1, 10^8}] I do not get an answer. How did you get to 2.151? Thank you! – TeM Jul 14 '17 at 20:10
• @TeM: just follow the last link. – Jack D'Aurizio Jul 14 '17 at 20:11
• It's not clear to me that this constitutes a rigorous proof; how is Weyl's equidistribution theorem sufficient here? – user41281 Nov 21 '17 at 1:36

Note: Another great answer to this problem is given by Terry Tao in this MO post.

Disclaimer:Not my solution. One elegant answer was posted by Robert Isreal on here . Apparently a holistic answer is not known.


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

 It is currently 13 Dec 2019, 16:04

### 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

# DIGITAL SUM of the number

Author Message
TAGS:

### Hide Tags

SVP
Status: Nothing comes easy: neither do I want.
Joined: 12 Oct 2009
Posts: 2477
Location: Malaysia
Concentration: Technology, Entrepreneurship
Schools: ISB '15 (M)
GMAT 1: 670 Q49 V31
GMAT 2: 710 Q50 V35
DIGITAL SUM of the number  [#permalink]

### Show Tags

06 Sep 2010, 18:32
1
9
DIGITAL SUM of the number

Given a number $$N_z$$ , all the digits of N are added to obtain a number $$N_y$$. All the digits of N are added to obtain a number $$N_x$$, and so on, till we obtain a single digit number $$N$$. This single digit number $$N$$ is called the digital sum of the original number $$N_z$$.

What is the digital sum of 84001 ?
Answer: 8+4+0+0+1 = 13 = 1+3 = 4 Hence, the digit sum of the number is 4.

Note: In finding the digital sum of a number we can ignore the digit 9 or the digits that add up to 9.
For example, in finding the digital sum of the number 246819, we can ignore the digits 2, 6, 1, and 9. Hence,
the digital sum of 246819 is = 4 + 8 = 12 = 1 + 2 = 3.

Digital Sum Rule of Multiplication: The digital sum of the product of two numbers is equal to the digital sum of the product of the digital sums of the two numbers.

Example: The product of 129 and 35 is 4515.
Digital sum of 129 = 3 and digital sum 35 = 8. Product of the digital sums = 3 × 8 = 24 Digital sum = 6.
Digital sum of 4515 is = 4 + 5 + 1 + 5 = 15 = 1 + 5 = 6. Digital sum of the product of the digital sums =
digital sum of 24 = 6 Digital sum of the product (4515) = Digital sum of the product of the digital sums
(24) = 6

Applications of Digital Sum :

1.Rapid checking of calculations while multiplying numbers :

Suppose a student is trying to find the product 316 × 234 × 356, and he obtains the number 26525064. A
quick check will show that the digital sum of the product is 3. The digital sums of the individual numbers
(316, 234 and 356) are 1, 9, and 5. The digital sum of the product of the digital sum is 1 × 9 × 5 = 45 = 4 + 5 = 9. ⇒ the digital sum of the product of the digital sums (9) ≠ digital sum of the 26525064 (3). Hence,
the answer obtained by multiplication is not correct.

Note: Although the answer of multiplication will not be correct if the digital sum of the product of the digital
sums is not equal to digital sum of the product, but the reverse is not true i.e. the answer of multiplication
may or may not be correct if the digital sum of the product of the digital sums is equal to digital sum of
the product.

Suppose you have a question : ( Very absurd eg by me but learn the concept )

What is value is A+B+C+D+E?

$$878373 * 7738838339 * 827287 = E6D35C50B5547A87623729$$

HINT: Find the digital sum on LHS and equate it with that of RHS.

2.Determining if a number is a perfect square or not :

The digital sum of the numbers which are perfect squares will
always be 1, 4, 7, or 9.

Note: A number will NOT be a perfect square if its digital sum is NOT 1, 4, 7, or 9, but it may or may not
be a perfect square if its digital sum is 1, 4, 7, or 9.
_________________
Fight for your dreams :For all those who fear from Verbal- lets give it a fight

Money Saved is the Money Earned

Jo Bole So Nihaal , Sat Shri Akaal

GMAT Club Premium Membership - big benefits and savings

Gmat test review :
http://gmatclub.com/forum/670-to-710-a-long-journey-without-destination-still-happy-141642.html
Manager
Joined: 20 Oct 2009
Posts: 85
Re: DIGITAL SUM of the number  [#permalink]

### Show Tags

08 Sep 2010, 22:18
dang.... what are some real life applications of this digital sum?
Manager
Joined: 17 Aug 2009
Posts: 186
Re: DIGITAL SUM of the number  [#permalink]

### Show Tags

09 Sep 2010, 01:18
Thats an interesting piece of information gurpreet !
Thanks
Intern
Joined: 06 Oct 2009
Posts: 47
Re: DIGITAL SUM of the number  [#permalink]

### Show Tags

17 Sep 2010, 02:41
Interesting piece of info Gurpreet.
Non-Human User
Joined: 09 Sep 2013
Posts: 13741
Re: DIGITAL SUM of the number  [#permalink]

### Show Tags

07 Apr 2019, 00:30
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: DIGITAL SUM of the number   [#permalink] 07 Apr 2019, 00:30
Display posts from previous: Sort by


# Lecture 27: Error of quadrature¶

Last lecture we observed the following:

1. The right-hand rule had error $O(n^{-1})$ for $n$ sample point
2. The trapezium rule had error $O(n^{-2})$ for $n$ sample point
3. The trapezium rule had error $O(n^{-\alpha})$ for all choices of $\alpha \geq 0$ for smooth, periodic functions

This lecture we set out to prove these results.

## Right-hand rule convergence¶

Recall that the right-hand rule is defined by, for $x_k \triangleq kh$ and $h \triangleq 1/n$

$$\int_0^1 f(x) dx \approx h \sum_{k=1}^n f(x_k) = \sum_{k=1}^n \int_{x_{k-1}}^{x_k} (f(x) - f(x_k) ) dx$$

About the only tool available to analyse integrals is integration by parts:

\begin{align*} \int_a^b u(x) v'(x) dx &= [u(x) v(x)]_a^b - \int_a^b u'(x) v(x) \cr & = u(b) v(b) - u(a)v(a) - \int_a^b u'(x) v(x) \end{align*}

Consider the error in the first panel. Taking $u(x) = f(x)$ and $v(x) = x$ in the integration by parts formula yields:

\begin{align*} \int_0^h (f(x) - f(h)) dx = [(f(x) - f(h)) x]_0^h - \int_0^h f'(x) x dx \cr = - \int_0^h f'(x) x dx \end{align*}

Assume that $f'(x)$ is bounded in $[0,1]$, and define

$$M= \sup_{x \in [0,1]} |f'(x)|$$

We then get a bound on the error:

\begin{align*} \left|\int_0^h (f(x) - f(h)) dx\right| &= \left|\int_0^h f'(x) x dx\right| \leq \int_0^h |f'(x)| x dx \leq M \int_0^h x dx \cr &\leq {M h^2 \over 2} \end{align*}

This formula caries over to every other panel (by the same argument):

$$\left|\int_{x_{k-1}}^{x_k} (f(x) - f(x_k)) dx \right| \leq {M h^2 \over 2}$$

Thus we have

\begin{align*} \left\|\int_0^1 f(x) dx - h \sum_{k=1}^n f(x_k)\right\| &= \left\|\sum_{k=1}^n \int_{x_{k-1}}^{x_k} (f(x) - f(x_k) ) dx\right\| \cr &\leq \sum_{k=1}^n \left\|\int_{x_{k-1}}^{x_k} (f(x) - f(x_k) ) \right\| dx &\leq \sum_{k=1}^n {M h^2 \over 2} = {M h^2 n \over 2} = {M \over 2 n} = O(n^{-1}) \end{align*}

Thus we have proven that the right-hand rule converges like $O(n^{-1})$.

## Trapezium rule observed convergence, revisited¶

Recall the trapezium rule, here implemented for general intervals $[a,b]$:

In [2]:
using PyPlot

function trap(f,a,b,n)
h=(b-a)/n
x=linspace(a,b,n+1)

v=f(x)
h/2*v[1]+sum(v[2:end-1]*h)+h/2*v[end]
end

trap(f,n)=trap(f,0.,1.,n);

Consider integration of the following simple function:

In [3]:
f=x->exp(x).*cos(x)

g=linspace(0.,1.,1000)
plot(g,f(g));

As in last lecture, we can compare the error of trap to the exact integral, approximated by quadgk.

In [5]:
ex=quadgk(f,0.,1.)[1]

ns=round(Int,logspace(1,5,100))   # integers spaced logarithmically apart
errT=zeros(length(ns))
errπ=zeros(length(ns))

for k=1:length(ns)
n=ns[k]
errT[k]=abs(trap(f,n-1)-ex    )   # error in non-periodic
errπ[k]=abs(trap(θ->cos(cos(θ-0.1)),0.,2π,n-1)-exπ    )  # error in periodic
end

We see that for non-periodic functions we observe $O(n^{-2})$ convergence but for periodic functions we converge much faster:

In [6]:
loglog(ns,errT)   # blue curve
loglog(ns,errπ)   # green curve
loglog(ns,(1.0ns).^(-2))   # red curve, with same slope as blue curve

Out[6]:
1-element Array{Any,1}:
PyObject <matplotlib.lines.Line2D object at 0x304c5ed90>

The defining property of smooth, periodic functions is that the function and all its derivatives match at 0 and 2π. Now consider a function where only some of he derivatives match:

In [8]:
h=x->10f(x).*x.^2.*(1-x).^2

plot(g,h(g));

We see here that the convergence rate has converged to $O(n^{-4})$:

In [11]:
exf=quadgk(f,0.,1.)[1]

ns=round(Int,logspace(1,4,100))
errf=zeros(length(ns))
errh=zeros(length(ns))

for k=1:length(ns)
n=ns[k]
errf[k]=abs(trap(f,n-1)-exf    )
errh[k]=abs(trap(h,n-1)-exh    )
end

loglog(ns,errf)     # blue curve
loglog(ns,1./ns.^2) # green curve
loglog(ns,errh)     # red curve
loglog(ns,1./ns.^4) # aqua curve;

The conclusion is that derivatives at the endpoints dictate the convergence rate of the Trapezium rule.

# Bernoulli Polynomial¶

To prove this, we need to be clever about our choice of functions when we integrate by parts. Define the first three Bernoulli Polynomials by

$$B_0(x) = 1, B_1(x) = x-{1 \over 2}, B_2(x) = x^2 -x + {1 \over 6}$$

as depticted here:

In [12]:
g=linspace(0.,1.,1000)
B0=x->ones(x)
B1=x->x-1/2
B2=x->x.^2-x+1/6
plot(g,B0(g))
plot(g,B1(g))
plot(g,B2(g));

These polynomials satisfy two important properties:

1. $B_k'(x) = k B_{k-1}(x)$, just like monomials $x^k$
2. $B_2(-1) = B_2(1) = {1 \over 6} We Thus consider integration by parts with the Trapezium rule. Recall the Trapezium rule: $$\int_0^1 f(x) dx \approx h\left({f(x_0) \over 2} + \sum_{k=1}^{n-1} f(x_k) + {f(x_n) \over 2} \right) = \sum_{k=1}^n \int_0^1 \left(f(x_{k-1}) + (x-x_{k-1}) {f(x_k) - f(x_{k-1}) \over h}\right) dx$$ As in the right-hand rule, we begin with the error in the first panel: $$\int_0^h \left[f(x) - \left(f(0) + x {f(h) - f(0) \over h}\right) \right] dx.$$ Taking $$u(x) = f(x) - \left(f(0) + x {f(h) - f(0) \over h}\right)$$ and$v(x) = h B_1(x/h)$(so that$v'(x) = 1$) in the integration by parts formula: $$\int_0^h \left[f(x) - \left(f(0) + x {f(h) - f(0) \over h}\right) \right] dx = [u(x) v(x)]_0^h - \int_0^h u(x) v(x) dx = - h \int_0^h \left[f'(x) - {f(h) - f(0) \over h}\right] B_1(x/h) dx.$$ Here we used that$u(0) = u(h) = 0$to kill of the first terms. Now take$u(x) = f'(x) - {f(h) - f(0) \over h}$and$v(x) = h {B_2(x/h) \over 2}$(so that$v'(x) = B_1(x/h)): \begin{align*} - h \int_0^h \left[f(x) - {f(h) - f(0) \over h}\right] B_1(x/h) dx &= -{h^2 \over 2}\left[\left(f'(h) - {f(h) - f(0) \over h}\right) B_1(1) - \left(f'(0) - {f(h) - f(0) \over h}\right) B_1(-1)\right] \cr & \qquad +{h^2 \over 2} \int_0^h f''(x) B_2(x/h) dx \cr & = - {f'(h) - f'(0) \over 12} h^2 +{h^2 \over 2} \int_0^h f''(x) B_2(x/h) dx \end{align*} By the same logic, we have in each panel $$\int_{x_{k-1}}^{x_k} \left[f(x) - \left(f(x_{k-1}) + x {f(x_k) - f(x_{k-1}) \over h}\right) \right] dx = - {f'(x_k) - f'(x_{k-1}) \over 12} h^2 +{h^2 \over 2} \int_{x_{k-1}}^{x_k} f''(x) B_2((x-x_{k-1})/h) dx$$ Summing over every panel, and using the telescoping sum, gives us \begin{align*} \int_0^1 f(x) dx - h\left({f(x_0) \over 2} + \sum_{k=1}^{n-1} f(x_k) + {f(x_n) \over 2} \right) = -{h^2 \over 12} \sum_{k=1}^n \left(f'(x_k) - f'(x_{k-1}) - \int_{x_{k-1}}^{x_k} f''(x) B_2((x-x_{k-1})/h) dx\right) \cr -{h^2 \over 12} (f'(1) - f'(0)) + {h^2 \over 12} \sum_{k=1}^n \int_{x_{k-1}}^{x_k} f''(x) B_2((x-x_{k-1})/h) dx \end{align*} But on each panel we have $$\left|\int_{x_{k-1}}^{x_k} f''(x) B_2((x-x_{k-1})/h) dx\right| \leq \int_{x_{k-1}}^{x_k} |f''(x)| |B_2((x-x_{k-1})/h)| dx \leq M_2 {h \over 6}$$ whereM_2 = \sup_{x \in [0,1]} |f''(x)|$and we used the fact that$|B_2(x)| \leq {1 \over 6}\$ (Exercise). Thus we have

$$\left|\sum_{k=1}^n \int_{x_{k-1}}^{x_k} f''(x) B_2((x-x_{k-1})/h) dx\right| \leq {M_2 \over 6}$$

and hence we have

$$\int_0^1 f(x) dx - h\left({f(x_0) \over 2} + \sum_{k=1}^{n-1} f(x_k) + {f(x_n) \over 2} \right) = -{1 \over 12 n^2} (f'(1) - f'(0)) + O(n^{-2}) = O(n^{-2})$$

which proves our second observation.


in

# How To Find Average Velocity Calculus

Given, s = 3t2 − 6t. Average velocity is a vector quantity.

Force and Motion Worksheet Motion graphs, Worksheets and

### Use this information to guess the instantaneous velocity of the rock at time 1.

How to find average velocity calculus. So,displacement in between 2s and 5s is s = 3[t2]5 2 − 6[t]5 2 = 3(25 −4) − 6(5 − 2) = 45m. Yes, you're supposed to find the average velocity over each interval. The velocity at t = 10 is 10 m/s and the velocity at t = 11 is 15 m/s.

To find the instantaneous velocity at any position, we let t1=t t 1 = t and t2=t+δt t 2 = t + δ t. [0,3] b.[0,2] c.[0,1] d.[0,h] where h>0 is a real number Nevertheless, this is exactly how a gps determines velocity from position!

Velocity calculations used in calculator: For example, if you drive a car for a distance of 70 miles in one hour, your average velocity equals 70 mph. Solving for the different variables we can use the.

The average velocity formula describes the relationship between the length of your route and the time it takes to travel. To avoid these tedious calculations, we would really like to have a formula. Average velocity is defined as total displacement/ total time taken for that.

It is determined that its height (in feet) above ground t seconds later (for is given by find the average velocity of the rock over each of the given time intervals. Her average velocity is 8m west / 4s = 2 m/s west. = 12 miles per hour.

For example, if an object is tossed into the air we might find the following data for the height in feet, y, of the object as a function of the time in seconds, t, where t = 0 is when the object is released upward. How to find the change in position over the change in time for various intervals, and finding the slope of the secant line to find average velocity. If you recall from earlier mathematics studies, average velocity is just net distance traveled divided by time.

However, this technically only gives the object's average velocity over its path. Average velocity is defined in terms of the relationship between the distance traveled and the time that it takes to travel that distance. Using calculus, it's possible to calculate an object's velocity.

Although speed and velocity are often words used interchangeably, in physics, they are distinct concepts. So,average velocity = 45 5 −2 = 15ms−1. In other words, velocity is equal to rate of change of position vector with respect to time.

The average acceleration would be: I was showed the correct answer but i really need to learn what the process is to achieve the answer. The sum of the initial and final velocity is divided by 2 to find the average.

For example, let’s calculate a using the example for constant a above. If you are in need of technical support, have a question about advertising opportunities, or have a general question, please contact us by phone or submit a message through the form below. Bart walks west at 5 m/s for 3 seconds, then turns around and walks east at 7 m/s for 1 second.

Average velocity = 8 m west / 4s = 2 m/s west. The average velocity calculator uses the formula that shows the average velocity (v) equals the sum of the final velocity (v) and the initial velocity (u), divided by 2. The average velocity of an object is its change in position divided by the total amount of time taken.

Purchase calculus etf 6e hide menu show menu. In many common situations, to find velocity, we use the equation v = s/t, where v equals velocity, s equals the total displacement from the object's starting position, and t equals the time elapsed. (i) 0.1 seconds ft/s (ii) 0.05 seconds ft/s (iii) 0.01 seconds ft/s (b) estimate the instantaneous velocity (in ft/s) of the pebble after 2 seconds.

Using calculus to find acceleration. The average velocity formula and velocity units. An automobile travels 540 kilometers in 4 hours and 30 minutes.

Let's take a look at average velocity. Computing average velocities for smaller, and smaller, values of as we did above is tedious. Find the average velocity of the object over the following intervals.

Jane · 3 · mar 17 2018. The formula for finding average velocity is: Math video on how to compute the average velocity of an object moving in one dimension and how to represent average velocity on a graph.

The instantaneous velocity at an instant t or simply ‘velocity’ at an instant t is defined as limiting value of the average velocity as δt → 0, evaluated at time t. The average velocity of a body in a certain time interval is given as the displacement of the body in that time interval divided by time. Find the average velocity (in ft/s) of the pebble for the time period beginning when t = 2 and lasting the following amount of time.

The formula for calculating average velocity is therefore: Acceleration is measured as the change in velocity over change in time (δv/δt), where δ is shorthand for “change in”. In the previous section, we have introduced the basic velocity equation, but as you probably have already realized.

When calculating the average velocity, only the times and positions at the starting and ending points are taken into account. Speed (or rate, r) is a scalar quantity that measures the distance traveled (d) over the change in time (δt), represented by. If a ball is thrown into the.

Average velocity is the result of dividing the distance an object travels by the time it takes to travel that far. Example 2 finding average velocity a rock is dropped from a height of 64 ft. The average velocity of an object is its total displacement divided by the total time taken.

In other words, it is the rate at which an object changes its position from one place to another. In this case, we have $$s(t)=\frac{13}{t+2}$$ (if you mean something else, please say so). Average velocity = change in speed / change in time.

This is a question from my calculus book. The average velocity is different from the instantaneous velocity, and the two are many times not the same number. So if a particle covers a certain displacement $$\overrightarrow{ab}$$ in a time $$t_1$$ to $$t_2$$, then the average velocity of the particle is:

Velocity (v) is a vector quantity that measures displacement (or change in position, δs) over the change in time (δt), represented by the equation v = δs/δt.

Our latest Sports Math graphic teaches you how to

Pin by Augi de Freitas on Ketogenic Diet Height to

misscalcul8 Trig Unit 3 Trig Basics Standard Position

Calculating AVERAGE SPEED from DISTANCE TIME GRAPHS

Graphing Average Speed with Superworms Force, motion

Calculating AVERAGE SPEED from DISTANCE TIME GRAPHS HSPS2

Average Speed is the absolute value of the slop of a

Calculating Average Speed WS Middle school science

Analyzing Motion Graphs & Calculating Speed WS Physical

Symbols used in Calculus What scares me is that I'm in

Longer Sailboats are Faster. Why? It has to do with

Calculating AVERAGE SPEED from DISTANCE TIME GRAPHS

Interpreting DISTANCETIME, SPEEDTIME GRAPHS, AVERAGE

Calculating AVERAGE SPEED from DISTANCE TIME GRAPHS

Duct Sizing Charts & Tables Duct

Calculate Average Velocity Calculator, Positivity, Science

How to Calculate and Solve for Force Nickzom

Pace Chart running and stuff Pinterest Runners

Calculating Average Speed WS Elementary school science


# Non-isomorphic connected, unicyclic graphs

The question is: Find the number of non-isomorphic connected, unicyclic graphs(graphs with exactly one cycle) on 6 vertices.

According to this question does it mean that there is a general formula that enable us to find the number of non-isomorphic connected, unicyclic graphs on n vertices so that for vertices 6 may be particular?

This task doesn't suggest the existence of such a formula.

However, you can find a general formula for the number of non-isomorphic connected unicyclic graphs on $$n$$ vertices and specify it for $$n=6$$ to get the result.

But you can as well just count such graphs for $$n=6$$ directly.

• As I think hexagon is the only non-isomorphic connected unicyclic graphs on 6 vertices. Is that not? – 2468 Nov 10 '18 at 13:58
• No, you can have a smaller cycle as well. – Jakob B. Nov 10 '18 at 14:14

Using the notation from Analytic Combinatorics we have for the combinatorial class $$\mathcal{U}$$ of unicyclic non-isomorphic graphs the equation (we are attaching trees to the nodes of the single cycle where the root of the tree is merged into the cycle)

$$\def\textsc#1{\dosc#1\csod} \def\dosc#1#2\csod{{\rm #1{\small #2}}} \mathcal{U} = \textsc{DHD}_{\ge 3}(\mathcal{T})$$

where $$\mathcal{T}$$ is the class of unlabeled rooted trees:

$$\mathcal{T} = \mathcal{Z} \times \textsc{MSET}(\mathcal{T})$$

Here we have used the dihedral operator for the single cycle (which is a bracelet i.e. a necklace that can be turned over) and the unlabeled multiset operator. The class equation for trees immediately yields a functional equation via the exponential formula, and which is

$$T(z) = z \exp\left(\sum_{\ell\ge 1} \frac{T(z^\ell)}{\ell}\right).$$

It was proved at the following MSE link using this functional equation that these have recurrence

$$t_{n+1} = \frac{1}{n} \sum_{q=1}^{n} t_{n+1-q} \left(\sum_{\ell|q} \ell t_{\ell}\right).$$

Using the cycle index $$Z(D_q)$$ of the dihedral group we have

$$U(z) = \sum_{q\ge 3} Z(D_q; T(z)).$$

Therefore the number of non-isomorphic connected unicyclic graphs is

$$U_n = [z^n] \sum_{q=3}^n Z\left(D_q; \sum_{p=1}^n t_p z^p\right).$$

This yields the sequence

$$0, 0, 1, 2, 5, 13, 33, 89, 240, 657, 1806, 5026, 13999, \\ 39260, 110381, 311465, 880840, 2497405, 7093751, 20187313, \ldots$$

with two leading zeros because the smallest cycle is on three nodes. The data point to OEIS A001429 where the procedure is confirmed. In particular we get for six nodes

$$\bbox[5px,border:2px solid #00A000]{ U_6 = 13.}$$

Remark. The cycle index of the cyclic group is given by

$$Z(C_q) = \frac{1}{q} \sum_{k|q} \phi(k) a_k^{q/k}$$

and of the dihedral group

$$Z(D_q) = \frac{1}{2} Z(C_q) + \begin{cases} \frac{1}{2} a_1 a_2^{(q-1)/2} & q \quad \text{odd} \\ \frac{1}{4} \left( a_1^2 a_2^{(q-2)/2} + a_2^{q/2} \right) & q \quad\text{even.} \end{cases}.$$

This computation was done with the following Maple code.

with(numtheory);

pet_varinto_cind :=
proc(poly, ind)
local subs1, subs2, polyvars, indvars, v, pot, res;

res := ind;

polyvars := indets(poly);
indvars := indets(ind);

for v in indvars do
pot := op(1, v);

subs1 :=
[seq(polyvars[k]=polyvars[k]^pot,
k=1..nops(polyvars))];

subs2 := [v=subs(subs1, poly)];

res := subs(subs2, res);
od;

res;
end;

pet_cycleind_cyclic :=
proc(n)
local s, d;

s := 0;
for d in divisors(n) do
s := s + phi(d)*a[d]^(n/d);
od;

s/n;
end;

pet_cycleind_dihedral :=
proc(n)
local s;

s := 1/2*pet_cycleind_cyclic(n);

if type(n, odd) then
s := s + 1/2*a[1]*a[2]^((n-1)/2);
else
s := s + 1/4*(a[1]^2*a[2]^((n-2)/2) + a[2]^(n/2));
fi;

s;
end;

t :=
proc(n)
option remember;

if n=1 then return 1 fi;

q=1..n-1);
end;

U :=
proc(n)
option remember;
local res, m, tgf, dhdgf;

res := 0;

for m from 3 to n do
dhdgf :=
pet_varinto_cind(tgf, pet_cycleind_dihedral(m));
res := res +
coeff(expand(dhdgf), z, n);
od;

res;
end;

Addendum. We can also answer the question for the labeled case. The combinatorial classes are the same, only now we get the classic tree function $$T(z)$$ using

$$\mathcal{T} = \mathcal{Z} \times \textsc{SET}(\mathcal{T})$$

and functional equation

$$T(z) = z \times \exp T(z)$$

and the dihedral operator becomes

$$\sum_{\ell\ge 3} \frac{z^\ell}{|D_\ell|} = \sum_{\ell\ge 3} \frac{z^{\ell}}{2\ell} = -\frac{1}{2} z - \frac{1}{4} z^2 + \frac{1}{2} \log \frac{1}{1-z}.$$

We are thus interested in extracting the coefficient as follows,

$$n! [z^n] \left(-\frac{1}{2} T(z) - \frac{1}{4} T(z)^2 + \frac{1}{2} \log \frac{1}{1-T(z)}\right).$$

This has three components, the first is by Cayley

$$- n! [z^n] \frac{1}{2} T(z) = -\frac{1}{2} n^{n-1}.$$

The second is

$$- n! [z^n] \frac{1}{4} T(z)^2 = - (n-1)! [z^{n-1}] \frac{1}{2} T(z) T'(z) \\ = -\frac{(n-1)!}{2\pi i} \int_{|z|=\epsilon} \frac{1}{z^n} \frac{1}{2} T(z) T'(z) \; dz.$$

Letting $$w=T(z)$$ so that $$z= w \exp(-w)$$ and $$dw = T'(z) \; dz$$ this becomes for $$n\ge 2$$

$$-\frac{(n-1)!}{2\pi i} \int_{|w|=\gamma} \frac{\exp(nw)}{w^n} \frac{1}{2} w \; dw = - \frac{(n-1)!}{2} \frac{n^{n-2}}{(n-2)!} \\ = - \frac{1}{2} (n-1) n^{n-2}.$$

Finally for the third one we get

$$n! [z^n] \frac{1}{2} \log\frac{1}{1-T(z)} = (n-1)! [z^{n-1}] \frac{1}{2} \frac{1}{1-T(z)} T'(z) \\ = \frac{(n-1)!}{2\pi i} \int_{|z|=\epsilon} \frac{1}{z^n} \frac{1}{2} \frac{1}{1-T(z)} T'(z) \; dz.$$

With the same substitution as before we find

$$\frac{(n-1)!}{2\pi i} \int_{|w|=\gamma} \frac{\exp(nw)}{w^n} \frac{1}{2} \frac{1}{1-w} \; dw \\ = \frac{1}{2} (n-1)! \sum_{q=0}^{n-1} \frac{n^q}{q!}.$$

Collecting everything we obtain

$$\frac{1}{2} (n-1)! \sum_{q=0}^{n-1} \frac{n^q}{q!} - n^{n-1} + \frac{1}{2} n^{n-2}$$

or alternatively

$$\bbox[5px,border:2px solid #00A000]{ \frac{1}{2} (n-1)! \sum_{q=0}^{n-3} \frac{n^q}{q!}.}$$

This sequence is OEIS A057500:

$$0, 0, 1, 15, 222, 3660, 68295, 1436568, 33779340, 880107840, \\ 25201854045, 787368574080, 26667815195274, 973672928417280, \ldots$$


# Generating Basic Signals – Gaussian Pulse and Power Spectral Density using FFT

(5 votes, average: 4.80 out of 5)

For more such examples check this ebook :  Digital Modulations using Matlab: build simulation models from scratch – by Mathuranathan Viswanathan

## Introduction

Numerous texts are available to explain the basics of Discrete Fourier Transform and its very efficient implementation – Fast Fourier Transform (FFT).  Often we are confronted with the need to generate simple, standard signals (sine, cosine, Gaussian pulse, squarewave, isolated rectangular pulse, exponential decay, chirp signal) for simulation purpose. I intend to show (in a series of articles) how these basic signals can be generated in Matlab and how to represent them in frequency domain using FFT.

## Gaussian Pulse : Mathematical description:

In digital communications, Gaussian Filters are employed in Gaussian Minimum Shift Keying – GMSK (used in GSM technology) and Gaussian Frequency Shift Keying (GFSK). Two dimensional Gaussian Filters are used in Image processing to produce Gaussian blurs. The impulse response of a Gaussian Filter is Gaussian. Gaussian Filters give no overshoot with minimal rise and fall time when excited with a step function. Gaussian Filter has minimum group delay. The impulse response of a Gaussian Filter is written as a Gaussian Function as follows

$$g(t) = \frac{1}{\sqrt{2 \pi } \sigma} e^{- \frac{t^2}{2 \sigma^2}}$$

The Fourier Transform of a Gaussian pulse preserves its shape.

\begin{align} G(f) & =F[g(t)]\ & = \int_{-\infty }^{\infty } g(t)e^{-j2\pi ft}\, dt\ & = \frac{1}{\sigma \sqrt{2 \pi } } \int_{-\infty }^{\infty } e^{- \frac{t^2}{2 \sigma^2}}e^{-j2\pi ft}\, dt\ &=\frac{1}{\sigma \sqrt{2 \pi } } \int_{-\infty }^{\infty } e^{- \frac{1}{2 \sigma^2}\left[t^2+j4 \pi \sigma^2 ft \right]}\, dt\ &=\frac{1}{\sigma \sqrt{2 \pi } } \int_{-\infty }^{\infty } e^{- \frac{1}{2 \sigma^2}\left[t^2+j4 \pi \sigma^2 ft + (j 2 \pi \sigma^2 f)^2 – (j 2 \pi \sigma^2 f)^2\right]}\, dt\ &=e^{ \frac{1}{2 \sigma^2}(j 2 \pi \sigma^2 f)^2}\frac{1}{\sigma \sqrt{2 \pi } } \int_{-\infty }^{\infty } e^{- \frac{1}{2 \sigma^2}\left[t+j 2 \pi \sigma^2 f \right]^2}\, dt\ &=e^{ \frac{1}{2 \sigma^2}(j 2 \pi \sigma^2 f)^2}=e^{ – \frac{1}{2}( 2 \pi \sigma f)^2} \end{align }

The above derivation makes use of the following result from complex analysis theory and the property of Gaussian function – total area under Gaussian function integrates to 1. By change of variable, let (u=t+j 2 \pi \sigma^2 f ). Then,
$$\frac{1}{\sigma \sqrt{2 \pi } }\int_{-\infty }^{\infty }e^{- \frac{1}{2 \sigma^2}\left[t+j 2 \pi \sigma^2 f \right]^2}\, dt =\frac{1}{\sigma \sqrt{2 \pi } }\int_{-\infty }^{\infty }e^{- \frac{1}{2 \sigma^2} u^2}\, du =1$$

Thus, the Fourier Transform of a Gaussian pulse is a Gaussian Pulse.
$$\frac{1}{\sqrt{2 \pi } \sigma} e^{- \frac{t^2}{2 \sigma^2}} \rightleftharpoons e^{ – \frac{1}{2}( 2 \pi \sigma f)^2}$$

## Gaussian Pulse and its Fourier Transform using FFT:

The following code generates a Gaussian Pulse with ( \sigma=0.1s ). The Discrete Fourier Transform of this digitized version of Gaussian Pulse is plotted with the help of (FFT) function in Matlab.

## Double Sided and Single Power Spectral Density using FFT:

Next, the Power Spectral Density (PSD) of the Gaussian pulse is constructed using the FFT. PSD describes the power contained at each frequency component of the given signal. Double Sided power spectral density is plotted first, followed by single sided power spectral density plot (retaining only the positive frequency side of the spectrum).

For more such examples check this ebook :  Digital Modulations using Matlab: build simulation models from scratch – by Mathuranathan Viswanathan

## Recommended Signal Processing Books

• Vittorio Todisco

Hi, thanks again for your works here.
I have a problem, I’m plotting a 3D Gaussian pulse.
I have been able to create it and to make the fft of it, but the phase it’s not null and quite incomprehensible.
This is a quick example of what I get:

close all;
clear;
clc;
N = 64; % Size of a sunction
D = N/2; % to indicate origin at the center of the function
a = 8; % radius for cylindrical function
w = 0.4; % decay rate for exponential function
y = repmat(1:N,N,1);
x = y’;
r = sqrt((D-x).^2+(D-y).^2); % definition of radius
sig = 5; % Variance for gaussian function
g = (2*pi*sig^2)*exp(-((r.^2))./(2*sig^2));
figure;mesh(g); title(‘2D Gaussian Function’);
G = fft2(g);
G = fftshift(G);
figure; mesh(abs(G)); title(‘Fourier Transform of Gaussian function’);
fzf=atan2(imag(G),real(G));
figure;
mesh(fzf);
title(‘Fourier Phase of Gaussian function’);

• pankaj

Dear sir, this code is great for generating the gaussian pulse without using matlab toolboxes.
I want to ask that from the same code, if i want to generate the train of gaussian pulses, how can i generate (without using the matlab function pulstran)? kindly provide the baisc code for it. I have searched over the internet but not found. suppose I want to generate 12 gaussian pulses wtith sum time duration between them. plzz.

Hello this is Lingaraj, doing m-tech in belgaum. I have a problem in finding power spectral density using time domain approach,i have a written code found somewhere but i am not getting it. Please leave a reply as soon as possible…

• KP

Hi Viswanathan,
This really awesome article on Gaussian wave generation and analysis. I am trying to generate a Gaussian pulse of 20ns and plot the frequency response of it. When I try to simulate it in matlab, it gives me error saying out of memory. I think I am doing something wrong with the code:

function [ output_args ] = freqencySpectrum( ~ )
fs=0.00000001; // sampling at twice the highest frequency (20ns =50MHz, so sampling at 100MHz)
t=-30:1/fs:30;
sigma = 20E-9;
A=1;
p1 = A/(sqrt(2*pi*sigma^2));
x=p1*(exp(-(t.^2)/(2*sigma^2)));
figure(1);
subplot(4,1,1)
plot(t,x,’b’);
title([‘Gaussian Pulse sigma=’, num2str(sigma),’s’]);
xlabel(‘Time(s)’);
ylabel(‘Amplitude’);

L=length(x);
NFFT = 1024;
X = fftshift(fft(x,NFFT));
Pxx=X.*conj(X)/(NFFT*NFFT); %computing power with proper scaling
f = fs*(-NFFT/2:NFFT/2-1)/NFFT; %Frequency Vector

subplot(4,1,2)
plot(f,abs(X)/(L),’r’);
title(‘Magnitude of FFT’);
xlabel(‘Frequency (Hz)’)
ylabel(‘Magnitude |X(f)|’);
xlim([-10 10])

Pxx=X.*conj(X)/(L*L); %computing power with proper scaling
subplot(4,1,3)
plot(f,10*log10(Pxx),’r’);
title(‘Double Sided – Power Spectral Density’);
xlabel(‘Frequency (Hz)’)
ylabel(‘Power Spectral Density- P_{xx} dB/Hz’);

X = fft(x,NFFT);
X = X(1:NFFT/2+1);%Throw the samples after NFFT/2 for single sided plot
Pxx=X.*conj(X)/(L*L);
f = fs*(0:NFFT/2)/NFFT; %Frequency Vector
subplot(4,1,4)
plot(f,10*log10(Pxx),’r’);
title(‘Single Sided – Power Spectral Density’);
xlabel(‘Frequency (Hz)’)
ylabel(‘Power Spectral Density- P_{xx} dB/Hz’);

end

Can you help me with this code?
Thanks,
KP

• KP,

Sigma time is not equal to pulse width. Pulse width should be more than the sigma variation… In the following code, the sigma variation is assumed to be 20ns. The pulse width is 10*20ns. I have fixed the code for you.. Here it is

sigma = 20e-9%sigma variation of the pulse 20ns
pulseWidth = 10*sigma %double sided pulse width
fs = 40*1/pulseWidth %Very very high oversampling factor for smooth curve (40 points), FFT with 1024 points is sufficient to cover this
t=-(pulseWidth/2):1/fs:(pulseWidth/2)

A=1;
p1 = A/(sqrt(2*pi*sigma^2));
x=p1*(exp(-(t.^2)/(2*sigma^2)));
figure(1);
subplot(4,1,1)
plot(t,x,’b’);
title([‘Gaussian Pulse sigma=’, num2str(sigma),’s’]);
xlabel(‘Time(s)’);
ylabel(‘Amplitude’);

L=length(x);
NFFT = 1024;
X = fftshift(fft(x,NFFT));
Pxx=X.*conj(X)/(NFFT*NFFT); %computing power with proper scaling
f = fs*(-NFFT/2:NFFT/2-1)/NFFT; %Frequency Vector
subplot(4,1,2)
plot(f,abs(X)/(L),’r’);
title(‘Magnitude of FFT’);
xlabel(‘Frequency (Hz)’)
ylabel(‘Magnitude |X(f)|’);

Pxx=X.*conj(X)/(L*L); %computing power with proper scaling
subplot(4,1,3)
plot(f,10*log10(Pxx),’r’);
title(‘Double Sided – Power Spectral Density’);
xlabel(‘Frequency (Hz)’)
ylabel(‘Power Spectral Density- P_{xx} dB/Hz’);

X = fft(x,NFFT);
X = X(1:NFFT/2+1);%Throw the samples after NFFT/2 for single sided plot
Pxx=X.*conj(X)/(L*L);
f = fs*(0:NFFT/2)/NFFT; %Frequency Vector
subplot(4,1,4)

plot(f,10*log10(Pxx),’r’);
title(‘Single Sided – Power Spectral Density’);
xlabel(‘Frequency (Hz)’)
ylabel(‘Power Spectral Density- P_{xx} dB/Hz’);

• KP

Hi Mathuranathan,
Thank you very much for the reply. I am little confused about something in the code.

1. Why did you set the pulse width as “pulseWidth = 10*sigma %double sided pulse width”?
Why 10?

2. I have attached the output of the simulation. I see that the pulse width is like 60ns, how can I make it 20ns? Should I even lower the sigma value as the pulse width should be greater than the sigma value?

And in that case, should I change the sampling frequency (fs = 40*1/pulseWidth %) value as well? or 40 will be fine?

3. Finally, how should I interpret the output of single sided PSD, in the attached figure, I believe that pulse width is 60ns, so the frequency should like 16.66MHz, but in the plot how can I relate it to 16MHz?
Thanks
KP

• 1) Subtle difference exists between the terms sigma and pulse width.

Sigma is the standard deviation of the pulse. The term pulse width depends on where the measurement is taken. Usually, the width of the pulse at half-the maximum value is called Full-Width at Half maximum pulse duration (FWHM).

What I was intending is not the FWHM width. It is the full duration of the pulse considered for simulation. Note that the Gaussian pulse gradually tapers nears zero on either ends. As an approximation, we must stop at some point. I chose 10 times the value of sigma for this.

2) To have a full pulse width of 20ns, the sigma has to be lower.

3) What we plot is the frequency response of a single pulse. It breaks down the pulse in frequency domain and shows the different frequency components that make-up the pulse in time domain.

The connotation of frequency (that measures periodicity 60MHz => 16.66ns) is applicable only when the pulse is repeated periodically. You might need to repeat the pulse at a desired regular interval and then plot the frequency response to check for any spike in the frequency domain that is indicative of the frequency of the repeated pattern.

• KP

Thank you very much Mathuranathan, this will help.

• Golam Kibria Chowdhury

Hello,

Your example is absolutely fabulous. This is the first time I have seen theory and practical coding to understand.

1.) I would like to generate a pulse train of Gaussian pulse in time domain with a certain width (let’s say 20 ns in the above example) with a repetition interval of (let’s say 100 ns). In paper, I have to convolve with a Dirac comb. Again let’s say we limit this Dirac comb to a certain number of cycles (let us say 50 cycles).

How do I do it in Matlab?

2.) A further addition to this problem, (I cannot get the first one though) is: let us say we make another pulse offset with the pulse from above. Let us say we keep the pulsewidth the same (20 ns), limit the number of cyles to 50 (like above), but change the repetition interval from every other pulse. For the sake of clearly enquiring it, let me draw a diagram here

*****——————–*****——————–*****——————–**** (P1)
*****————————-*****—————*****————————-**** (P2)

Here P1 = pulse one
P2 pulse 2

both pulses are in phase at one time (let us say t = t1), then it shifted in time (let us say 4 ns) with the next pulse, then again it is in phase.

How could I do it matlab?

Thank you so much for clear explanation. I deeply appreciate it.

Kind regards
Chowdhury


# Finding the sum $f(x)=\sum_{n=2}^{\infty} \frac{x^n}{n(n-1)}$

I'm trying to find $$f(x)=\sum_{n=2}^{\infty} \frac{x^n}{n(n-1)}$$

I found the radius of convergence of the above series which is $R=1$. Checking $x=\pm 1$ also yields a convergent series. Therefore the above series converges for all $x\in [-1, 1]$.

Using differentiation of the series term by term we get: $$f'(x)=\sum_{n=2}^{\infty} \frac{x^{n-1}}{n-1}=\sum_{n=1}^{\infty} \frac{x^{n}}{n}=-\log(1-x)$$ which also has $R=1$, and then, by integrating term by term we get: $$f(x)=\int_{0}^{x} f'(t)dt=-\int_{0}^{x} \log(1-t)dt=x-(x-1)\ln(1-x)$$

if I understand the theorems in my textbook correctly, the above formulas are true only for $x \in (-1, 1)$. It seems the above is correct since this is also what WolframAlpha says.

I'm abit confused though. At first, it seemed the above series converges for all $x\in [-1, 1]$ but in the end I only got $f(x)$ for all $|x|\lt 1$, something seems to be missing. What can I say about $f(-1)$ and $f(1)$?

-

Try using Abel's theorem.

-
I thought of Abel's theorem but I'm not sure on its usage, can I say that: $$f(1)=\lim_{x\to 1^{-}}f(x)=\lim_{x\to 1^{-}}(x-(x-1)\ln(1-x))=1$$ and $$f(-1)=\lim_{x\to -1^{+}}f(x)=\lim_{x\to 1^{+}}(x-(x-1)\ln(1-x))=\ln4-1$$ –  dawson Jan 22 '11 at 17:55
If so, why do I need Tauber's theorem (it's not in my textbook)? –  dawson Jan 22 '11 at 17:56
@dawson: No you don't need it. I am just having a braindead moment. –  Aryabhata Jan 22 '11 at 18:00
@dawson: Since you noted the series is convergent, Abel's theorem tells you that the lim of f is same as the limit of the series. So you seem to have it right :-) –  Aryabhata Jan 22 '11 at 18:07
On second thought, $\frac{|x|^n}{n(n-1)}\leq\frac{1}{n(n-1)}$ and $\sum \frac{1}{n(n-1)}$ converges, then by Weierstrass test the above series converges uniformly in $[-1, 1]$, does that make sense? –  dawson Jan 22 '11 at 18:22
show 3 more comments

If you rewrite $\frac{1}{n(n-1)}$ in the form $\frac{1}{n-1}-\frac{1}{n}$, then you can rewrite the series in both cases $x = \pm 1$ and compute their values directly. You can then confirm that in both cases the value you compute coincides with the value $f(\pm 1)$. (In other words, rather than appealing to Abel's theorem, as Moron suggests, in this particular case you can verify it.)

[Caveat: In the case $x = -1$, you will need to use the familiar series for $\log 2$, and maybe the easiest way to prove this is by appealing to Abel's theorem (applied to the series for $\log (1 + x)$). So my approach probably doesn't really avoid Abel's theorem, at least for $x = -1$.]

-


# A simple system of equations

I'm trying to refresh my school math knowlegde and have trouble solving a simple system of equations:

$\begin{cases} x + xy + y = -3,\\ x - xy + y = 1. \end{cases}$

I derive $y$ from the second:

$y - xy = 1 - x$

$y(1-x)=(1-x)$

Hence,

$y = \frac {(1-x)}{(1-x)} = 1$, provided that x ≠ 1

Next, I substitute $y=1$ in the first equasion,

$x + x + 1 = -3$; $2x = -4$, $x=-2$.

The answer seems to be $(-2; 1)$.

The problem book, however, also lists a second answer, $(1; -2)$.

I feel that I've done something wrong. Give me a hint, please.

• You excluded the case $x=1$ in your workings. So you have to go back and check that too. – Mark Bennet Sep 29 '14 at 11:58
• Thank you, @MarkBennet! So, when I get an $x≠a$ condition, where $a$ is some number, in one of the equasions of the system, I should plug it into all other equasions, calculate the second variable, then check on all the equations if this $(x, y)$ combination solves them all? – CopperKettle Sep 29 '14 at 12:47

By saying "provided that $x \neq 1$", after getting a solution you have to go back to try out $x=1$.
Note that $$y(1-x)=(1-x)\iff (1-x)(y-1)=0\iff x=1\ \text{or}\ y=1.$$ Since you've already considered the case when $y=1$, you need to consider the case when $x=1$.
Add the two together to get $~2x+2y=-2\iff x+y=-1$. Now replace this value in either one of the initial two equations to get $xy$. And when you know both the Sum and the Product of two numbers, you can determine their values by solving the quadratic $~u^2-su+p=0$, where $s=x+y$ and $p=xy$, since this is what you get when expanding $~(u-x)(u-y)=0.~$ So all that's left to do now is applying the well-known quadratic formula. :-)
• Great, I see you're using Vieta's formulas in an imaginative way! (0: I will try to follow this route. As I understand, $u_1, u_2$ in this quadratic equation will equal $x, y$. I'm too dense to understand the line "since this is what you get when expanding $(u-x)(u-y)=0.$" though. (0: – CopperKettle Sep 29 '14 at 14:02
• I solved the quadratic, getting the result $(1; -2)$. How will I get (or logically derive) the second result, $(-2; 1)$, I wonder. – CopperKettle Sep 29 '14 at 14:43
• @CopperKettle: Your two equations are both symmetrical in x and y, so if $(a,b)$ is a solution, then so is $(b,a)$. As for your other remark, just open up the parentheses, and see what you get. – Lucian Sep 29 '14 at 15:20


Linear transformation

Kaspelek

New member
Where T(p(x)) = (x+1)p'(x) - p(x) and p'(x) is derivative of p(x).

a) Find the matrix of T with respect to the standard basis B={1,x,x^2} for P2.

T(1) = (x+1) * 0 - 1 = -1 = -1 + 0x + 0x^2
T(x) = (x+1) * 1 - x = 1 = 1 + 0x + 0x^2
T(x^2) = (x+1) * 2x - x^2 = 2x + x^2 = 0 + 2x + x^2

So, the matrix for T with respect to B equals
[-1 1 0]
[0 0 2]
[0 0 1].

b) Find a basis for kerT and hence write down dim(kerT).

c) Find a basis for ImT and hence write down dim(ImT).

d) Does the transformation have an inverse?

I've done part a, so any guidance on the rest would be greatly appreciated.

Active member
Where T(p(x)) = (x+1)p'(x) - p(x) and p'(x) is derivative of p(x).

a) Find the matrix of T with respect to the standard basis B={1,x,x^2} for P2.

T(1) = (x+1) * 0 - 1 = -1 = -1 + 0x + 0x^2
T(x) = (x+1) * 1 - x = 1 = 1 + 0x + 0x^2
T(x^2) = (x+1) * 2x - x^2 = 2x + x^2 = 0 + 2x + x^2

So, the matrix for T with respect to B equals
[-1 1 0]
[0 0 2]
[0 0 1].

b) Find a basis for kerT and hence write down dim(kerT).
As you've correctly stated, we may express the transformation in the form
$$\displaystyle A_T=\left[ \begin{array}{ccc} -1 & 1 & 0 \\ 0 & 0 & 2 \\ 0 & 0 & 1 \end{array} \right]$$

Now as for $$\displaystyle ker(T)$$, we proceed to find the kernel of this transformation in the same way as we would for any other transformation. That is, we would like to solve $$\displaystyle A_T x=\left[ \begin{array}{ccc}0 & 0 & 0\end{array} \right]^T$$, which requires we put the augmented matrix
$$\displaystyle \left( A_T|0 \right) = \left[ \begin{array}{ccc} -1 & 1 & 0 & | & 0 \\ 0 & 0 & 2 & | & 0 \\ 0 & 0 & 1 & | & 0 \end{array} \right]$$
in its reduced row echelon form (of course, this problem could be solved with a little intuition instead of row reduction, but the upshot of this method is that it works where your intuition might fail). You should end up with
$$\displaystyle \left[ \begin{array}{ccc} 1 & -1 & 0 & | & 0 \\ 0 & 0 & 1 & | & 0 \\ 0 & 0 & 0 & | & 0 \end{array} \right]$$
Which tells you that the kernel of the transformation is the set of all polynomials $$\displaystyle a+bx+cx^2$$ such that $$\displaystyle a-b=0$$ and $$\displaystyle c=0$$. Thus, we may state that the kernel of $$\displaystyle T$$ is spanned by the vector
$$\displaystyle \left[ \begin{array}{ccc}1 & 1 & 0\end{array} \right]^T$$, which is thus the basis of the kernel of T. Since there is one vector in the basis, the dimension of the kernel is 1.

Any questions about the process so far?

Last edited:

Active member
c) Find a basis for ImT and hence write down dim(ImT).

d) Does the transformation have an inverse?
For c), what we need to do is find the largest possible set of linearly independent column-vectors. If you wanted to use the rref (reduced row echelon form) that we computed previously, you simply choose the column vectors corresponding to the 1's (i.e. the "pivots") of the reduced matrix. That is, choosing the first and third columns, we find that $$\displaystyle \left[ \begin{array}{ccc}-1 & 0 & 0\end{array} \right]^T$$ and $$\displaystyle \left[ \begin{array}{ccc}0 & 2 & 1\end{array} \right]^T$$ form a basis of the image. It follows that $$\displaystyle dim(Im(T))=2$$.

For d), we simply note that the kernel of this transformation is not of dimension 0. This is enough to state that the transformation does not have an inverse.

Last edited:

Fernando Revilla

Well-known member
MHB Math Helper
Something better to express the solutions as vectors of $P_2$ instead of coordinates. That is, $B_{\ker T}=\{1+x\}$ and $B_{\mbox{Im }T}=\{-1,2x+x^2\}$.

Kaspelek

New member
That helped a lot guys, thanks a lot.


# Thread: [SOLVED] Finding the sum of two unknown variables

1. ## [SOLVED] Finding the sum of two unknown variables

Hello everyone,
Given that $43p + 23q = 4323$, find $p + q$?
The question is to find the sum of the unknown variables. Now, the variables have to be integers, and as you can see from the easy example I made, the sum could be $43(100) + 23(1)=4323$ $\Rightarrow p+q = 101$

Of course, this is not the only solution. Try the following:

$43(54) + 23(87) = 4323$
$\Longrightarrow p + q = 141$

I suspect that there are even more integer solutions to this equation. My method for finding the values is the old simple bruteforce "technique", where I divide 4323 by highest coefficient and that's where I get a headstart. You can of course find out the pattern, but these "cooked" equations are no good for learning.

My question is: is there a logical process of solving for $p + q$? Other than bruteforce, of course. I asked my teacher today, and he just said "that's number theory." I looked up number theory, but I was kind of lost.

These type of questions are pretty common on the SAT I tests, and I love them. My brother and I used to exchange multivariable equations like that and try to find the sum all the time.

2. Hello,

What comes in my mind is that we have to solve for p and q before finding p+q... maybe there is another method...
This comes with the Euclidian algorithm, which will yield to Bézout's theorem (google for them).

43 & 23 are coprime, that is to say they have no common divider.
The theorem states that if 43 and 23 are coprime, then we can write it :
$43u+23v=1$, where u & v are integers (positive or negative).

-------------------------
Now, the thing is that you have to find a particular solution to the equation $43u+23v=1$, thanks to the Euclidian algorithm.

$43=23*1+20 \implies 20=43-23$

$23=20*1+3 \implies 3=23-20=23-(43-23)=-43+2*23$

$20=3*6+2 \implies 2=20-3*6=(43-23)-6*(-43+2*23)=7*43-13*23$

$3=2+1 \implies 1=3-2=(-43+2*23)-(7*43-13*23)=-8*43+15*23$

Thus $\boxed{u=-8 \text{ and } v=15}$

--------------------------
What's good with it is that we can multiply the equation $43u+23v=1$ by 4323 in order to get a particular solution for p and q in $43p+23q=4323$

--> $\boxed{p_1=-8*4323=-34584 \text{ and } q_1=15*4323=64845}$

---------------------------
MOO

So we have :

\begin{aligned} 4323&={\color{red}43}*p_1+{\color{red}23}*q_1 \\
&={\color{red}43}*p+{\color{red}23}*q \end{aligned}

$43p_1+23q_1=43p+23q$

$43(p-p_1)=23(q_1-q)$

Because 43 and 23 are coprime, we know by the Gauss theorem, that $q_1-q=43k$ and $p-p_1=23k$, $\forall \text{ integer (positive or negative) } k.$

Therefore the general solution is :

$p=p_1+23k$
$q=q_1-43k$

$\boxed{p+q=p_1+q_1-20k}$

Remember, $p_1=-34584$ and $q_1=64845$

------------------------------

$p_1$ and $q_1$ are ugly because 4323 is a large number, and I showed a general method.

If you have got a particular solution (100 and 1), set up $p_1=100$ and $q_1=1$ and take it from the red MOO.

I hope this is clear enough... If you have any question...

3. Hello, Chop Suey!

Here's a rather primitive solution . . .

Given that: . $43p + 23q =\: \:4323$, find $p + q.$

We have: . $43p + 23q \:=\:43(100) + 23 \quad\Rightarrow\quad 23q - 23 \:=\:43(100) - 43p$

Factor: . $23(q-1) \:=\:43(100-p) \quad\Rightarrow\quad q \;=\;\frac{43(100-p)}{23} + 1$

Since $q$ is an integer, $(100-p)$ must be divisible by 23.

This happens for: . $p \;=\;100,\:77,\:54,\:31\:\hdots \:100-23t$
. . .and we have: . $q \;=\;1,\:44,\:87,\:130,\:\hdots\:1 + 43t$

Therefore: . $p+q \;=\;(100-23t) + (1 + 43t) \;=\;101 + 20t\:\text{ for any integer }t$

4. I want to thank both of you, Moo and Soroban, for the astoundingly fast reply.

Moo: I'm going to look up those theorems you mentioned and discuss this further should I have any questions.

Soroban: It may be primitive, but you made me wish if I only approached this method before.

Thanks again

5. Here are the wikipedia links (so that you won't be mistaken ) :

Bézout's identity/lemma (not really theorem actually) : Bézout's identity - Wikipedia, the free encyclopedia

The way I used the Euclidian algorithm : Extended Euclidean algorithm - Wikipedia, the free encyclopedia

Ok...Gauss theorem = Euclid's lemma (they're the same, but I don't know the circumstances that made 2 different names lol)

If a positive integer divides the product of two other positive integers, and the first and second integers are coprime, then the first integer divides the third integer.
This can be written in notation:
If n|ab and gcd(n,a) = 1 then n|b.
Euclid's lemma - Wikipedia, the free encyclopedia


# Is there a name for the function $\max(x, 0)$?

Is there a name for the function $\max(x, 0)$?

For comparison, the function $\max(x, -x)$ is known as the absolute value (or modulus) of x, and has its own notation $|x|$

• should there be a name for this function? is it important enough to get its own name? is it used often enough to warrant an abbreviation? does it capture something so profound to be worth naming? If you answer any of these question positively, then you can improve your question. – Ittay Weiss Aug 15 '14 at 10:20
• In finance max(x-s,0) is the payoff of a call option where s is the strike price and x is the price of the underlying stock on the expiry date. – Colonel Panic Aug 15 '14 at 11:06
• Another note, I have seen the notation $[f]^+$ and $[f]^-$ for positive part and negative part respectively. – Brad Aug 15 '14 at 14:14
• math.stackexchange.com/q/25349 – Jonas Meyer Aug 15 '14 at 18:39
• The question asks for the name of the operation, not an example of something that is computed using it. The operation $\max(x,0)$ isn't called "payoff of a call option", just as the operation of multiplication isn't called "force", despite Newton's second law. – David Richerby Aug 16 '14 at 20:37

This is called the positive part of the real number $x$, and often denoted by $x^+$.

Likewise, the negative part of $x$ is $x^-=\max\{-x,0\}$ and the pair of nonnegative real numbers $(x^+,x^-)$ is fully characterized by the pair of identities $$x=x^+-x^-,\qquad\lvert x\rvert=x^++x^-.$$

• It should be noted that the negative part is, in fact, a positive number. For example the negative part of -3 is 3. – Michael Lugo Aug 15 '14 at 13:19
• Indeed the positive part and the negative part are both nonnegative numbers. – Did Aug 15 '14 at 15:51
• Similarly, the imaginary part of a complex number is a real number. – user133281 Aug 15 '14 at 22:40
• I would rather call this the "positive part of the identity function", because the "positive part" definition as you cite it refers to functions and not numbers. – example Aug 16 '14 at 13:34
• @example Thanks for your input. It just happens that this (i.e., the positive part of the real number $x$) is what mathematicians call it (i.e., $\max(x,0)$). – Did Aug 16 '14 at 13:42

Wikipedia calls this the ramp function and notes that it can be written using Macaulay brackets.

$\{x\} = \begin{cases} 0, & x < 0 \\ x, & x \ge 0. \end{cases}$

Since this is a math site, not a programming site, my answer may or may not be regarded as trivia. Anyway...

In computer graphics this function is called clamping. The general form is $\mathrm{clamp(x, lowerBound, upperBound)}$ and is defined as

function clamp(x, lowerBound, upperBound):
if(x < lowerBound)
return lowerBound
else if(x > upperBound)
return upperBound
else
return x

or $\mathrm{min( max(x, lowerBound), upperBound)}$.

$\max(x,0)$ is the special case $\mathrm{clamp}(x, 0, +\infty)$.

The clamping function is ubiquitous in computer graphics: You often need to confine a calculated value (e.g. a color intensity) into a range of valid values (e.g. $[0,1]$ or $[0,255]$).

• It looks like Java, only function is not Java. Replacing function with something like public static int makes it Java, a method to be inserted in some class. – MickG Aug 16 '14 at 9:40
• It's pseudocode. – Sebastian Negraszus Aug 16 '14 at 10:14
• It's pseudocode and can trivially easily be translated into Python, JS or anything else. @OutlawLemur It's not literal Python because of a few minor differences: a) function clamp(...) instead of def clamp(...): b) No colons at the end of the if/elif/else lines c) Conditional expressions enclosed by parentheses if(x < lowerBound) instead of if x < lowerBound: – smci Aug 17 '14 at 0:31
• @MickG Even if you replaced function with public static int, it would still be a long way away from being Java. – JLRishe Aug 17 '14 at 11:53
• @MickG: It is much closer to Python than Java. – Reid Aug 17 '14 at 19:55

You can check that:

$$\color{blue}{\max(x,0) = x \, H(x)}$$

where $H(x)$ is the Heaviside or unit step function. A name for this? Not a clue, but hope it helps.

• This is actually a pretty nice implementation. For example, here's a quick and dirty computation of the derivative for $x \neq 0$: $$\frac{d}{dx} \max(x,0) = \frac{d}{dx} H(x)\cdot x = H(x) \frac{d}{dx} x = H(x) \cdot 1 = H(x).$$ It works because $H(x)$ is basically a constant. More precisely, the function $$\begin{cases} 1 & x>0 \\ 0 & x < 0\end{cases}$$ is a locally constant openly-supported partial functions $\mathbb{R} \rightarrow \mathbb{R}$, which is exactly what you need in order to treat it as a constant insofar as differentiation is concerned. – goblin GONE Aug 5 '17 at 4:12

I have heard this function called the rectifier. This is a pretty exclusive field name though, and I wouldn't expect to see it anywhere outside of neural networks.

• I think the use in neural networks derives from the use of the term in electrical engineering: en.wikipedia.org/wiki/Rectifier – A. Donda Aug 16 '14 at 2:27
• @A.Donda Thanks for the information. – Did Aug 16 '14 at 13:05

You can use:

$$f(x) = \frac{x + |x|}{2}$$

• I suppose that's interesting, but it's not at all what the question is asking. – Ray Aug 15 '14 at 18:38
• The point is that the function doesn't need a name, it can be expressed in terms of $|x|$ and $x$. – Darth Geek Aug 15 '14 at 18:42
• So squaring doesn't need a name because it can be expressed in terms of $x$ and $2$? And factorial doesn't need a name because it can be expressed in terms of product? And... – David Richerby Aug 16 '14 at 20:40
• @DavidRicherby It's not about that. We call $x^2$ squaring but we don't have a name for $x^2+3$. We have a name for $n!$ but not one for $(-1)^nn!$. So perhaps a name for the function described is not really needed. It turns out it does have a name, but if it didn't and you needed to use it in a paper, for instance you can just give it a special letter and define it at the beggining of the paper and it would be ok. – Darth Geek Aug 17 '14 at 8:19
• How is (x+|x|)/2 better then max(x, 0) anyway? – Cthulhu Aug 17 '14 at 9:26


# Lowest surface to volume ratio for an uncovered vessel

1. Jul 2, 2012

### eee000

Hi,

It is well known that a sphere has the lowest surface to volume ratio. However, a related question is: What is the shape that gives the lowest surface to volume ratio if you do not include the "top" in the surface. That is, what is the maximal volume of an uncovered vessel of a fixed surface area?

For example, a cylinder whose height is equal to its radius, has a volume Pi R^2 h = Pi R^3 and a surface (without cover) of Pi R^2 + 2*Pi *R*h = 3 Pi R^2. If we fix the volume to unity, the surface in this case is 3.Pi^(1/3).

In comparison, a half sphere of unity volume has a smaller surface -- (18 Pi)^(1/3).

However, it's clear this is not the best shape - a sphere cut a bit above half its volume beats the half sphere.

So, what is the shape that gives the lowest surface to volume ratio if you do not include the "top" in the surface ?

Thanks!

2. Jul 2, 2012

### chiro

Hey eee000 and welcome to the forums.

I'm a little confused about what you mean by "top".

With a sphere, there is no discontinuous boundary like you have with say a cube so in these kinds of situations (where the surface is completely smooth), it's really hard to define a "top".

Based on this, do we need the shape to have something corresponding to a "top" where the top is an area that is "smooth" respect to the rest of the body?

3. Jul 2, 2012

### HallsofIvy

That depends strongly on how you define "top" for a general surface.

4. Jul 2, 2012

### eee000

Thank you,
The top I have in mind is defined by gravity. I want to have a vessel full of water that do not spill out. That is, if we define the z axis to be the direction of gravity, I think of a surface that may have holes in it, but the volume that we count is only integrated up to lowest z coordinate in the holes.

5. Jul 2, 2012

### Curious3141

There are well-known formulae for the volume and surface of a spherical cap: http://en.wikipedia.org/wiki/Spherical_cap

(removed wrong stuff).

Last edited: Jul 2, 2012
6. Jul 2, 2012

### eee000

Thank you for the spherical cap formulae, but I think your algebra is wrong. Fixing the sphere radius R, and parameterizing the cap by h, I find the volume to be V=Pi h^2 (R - h/3) and the surface S=2 Pi R h. The lowest ratio is obtained when h=3R/2, and then V=9Pi/8 R^3, and S=3Pi R^2. Setting the volume to unity (R=(8/9Pi)^(1/3)), I find S=(64 Pi/3)^(1/3), better than the half sphere with (18 Pi)^(1/3) and better than the full sphere with (36 Pi)^(1/3).

7. Jul 2, 2012

### Curious3141

You're right, I made a silly mistake.

What I should've done is simply expressed V/A as a function of h, and that's $\frac{V}{A} = \frac{1}{6}(3h - \frac{h^2}{r})$. Taking the derivative and setting it to zero yields your result of $h = \frac{3r}{2}$.

Intuitively, shouldn't this (partial sphere to a height of 1.5r) be the open vessel with the lowest A/V ratio?

8. Jul 2, 2012

### eee000

I'm sorry,I made a mistake too...
Since the surface to volume ratio scales as 1/V^(1/3) we need to do the optimization for fixed volume. This yields that the optimal shape is exactly the half sphere.

Obviously, my statement "(64 Pi/3)^(1/3), better than the half sphere with (18 Pi)^(1/3)" is wrong, as 64/3 > 18 ...

9. Jul 2, 2012

### Curious3141

I didn't see that, but I wasn't following that anyway, because I think your method of visualising the problem is unnecessarily confusing. Why not just let r = 1 and figure out the value of h that minimises the A/V ratio (or maximises the V/A ratio, as I did) for the open partial sphere? Now I'm sure that h = 1.5 (for r = 1) is the right answer.

10. Jul 2, 2012

### eee000

sure it is, but I think the correct formulation of the problem is that of a fixed volume, especially if one is interested in he general question - what is the best shape of all. Since the A/V ratio generally scales with 1/V^(1/3), comparison must be made for equal volumes.

11. Jul 2, 2012

### Curious3141

OK, I see where you're coming from. To state the problem rigorously, "For an open partial sphere of unit volume, what value of h/r will yield minimal surface area?"

Can we agree on that statement?

The way to go about it then is to put h = kr (where 0 < k <= 2), set V(h,r) = 1, then work out r in terms of k alone.

Then plug that expression for r into A(h,r) to get A in terms of k alone.

Finally, minimise A(k) over the domain (0,2].

I have to turn in now - I'm already up too late with a bad cold and I have to work tomorrow. So please go ahead (and if you've done it, please post the basic steps, if you can). If the problem remains unsolved tomorrow, and I'm free, I'll work on it.

12. Jul 2, 2012

### eee000

For the partial sphere, the solution is easy - the half sphere is optimal.
The open problem (to the extent of my minimal knowledge) is:

"For an open manifold of unit volume(*) , what shape will yield minimal surface(*) area?"

where Volume is the volume contained up to the first hole, and surface includes the whole manifold but the holes

13. Jul 2, 2012

### Curious3141

But have you proved it? Just asking.

EDIT: Proved it myself.

$A(k) = (2){(9\pi)}^{\frac{1}{3}}.k^{-\frac{1}{3}}.{(3-k)}^{-\frac{2}{3}}$

and this has a minimum at k = 1 (when h = r), and the minimum is ${(18\pi)}^{\frac{1}{3}}$, yielding a half-sphere of unit volume.

I cannot provide any insight on the more general problem.

Last edited: Jul 2, 2012
14. Jul 3, 2012

### haruspex

Suppose you have an optimal vessel and it holds more than a half-sphere of the same surface area of vessel. Necessarily the upper rim will lie in one horizontal plane. Create a cap for it by reflection in that plane. You now have a closed vessel of twice the volume and twice the area, and it would seem that it holds more fluid than a closed sphere of the same surface area.

15. Jul 3, 2012

### eee000

Thank you haruspex! That's what I was looking for.
I was thinking in more local terms, along the lines of Steiner's arguments, but your one-liner is much better.


# An urn contains 100 marbles: 20 white, 30 red, 50 green. Calculate the probability of selecting White, Red and Green marbles respectively. What is the probability of pulling a white, green, white and red marbles consecutively?

Apr 18, 2016

$\frac{950}{156849}$ or approximately 0.6%

#### Explanation:

Assuming the marbles are not replaced in the urn:

• The probability of the first marble being white is $\frac{20}{100}$

• The probability of the next marble being green is then $\frac{50}{99}$

• The probability of the next marble being white is $\frac{19}{98}$

• The probability of the next marble being red is $\frac{30}{97}$

So the probability of the sequence white, green, white, red is:

$\frac{20}{100} \cdot \frac{50}{99} \cdot \frac{19}{98} \cdot \frac{30}{97}$

$= \frac{10}{\textcolor{red}{\cancel{\textcolor{b l a c k}{50}}}} \cdot \frac{\textcolor{red}{\cancel{\textcolor{b l a c k}{50}}}}{99} \cdot \frac{19}{98} \cdot \frac{30}{97}$

$= \frac{10 \cdot 19 \cdot 30}{99 \cdot 98 \cdot 97}$

$= \frac{\textcolor{red}{\cancel{\textcolor{b l a c k}{3}}} \cdot 1900}{\textcolor{red}{\cancel{\textcolor{b l a c k}{3}}} \cdot 33 \cdot 98 \cdot 97}$

$= \frac{1900}{33 \cdot 98 \cdot 97}$

$= \frac{\textcolor{red}{\cancel{\textcolor{b l a c k}{2}}} \cdot 950}{33 \cdot \textcolor{red}{\cancel{\textcolor{b l a c k}{2}}} \cdot 49 \cdot 97}$

$= \frac{950}{33 \cdot 49 \cdot 97}$

$= \frac{950}{156849} \approx 0.006$

That is approximately 0.6%

Aug 24, 2016

In support of Georg's solution

#### Explanation:

For probability questions of this type, if you are ever in doubt, draw a probability tree

$\textcolor{red}{\text{Assumption: this is selection without replacement}}$

From the diagram observe that the initial selection of
White ->20/100->20%

Red" "-> 30/100->30%

Green->50/100->50%

From the probability tree the overall sequenced sampling probability of white: green: white: red is:

$\frac{20}{100} \times \frac{50}{99} \times \frac{19}{98} \times \frac{30}{97}$

For what follows refer to George's solution


# Why is finding factors until half of the number enough?

If I want to find factors of a number except itself, at first I think that I divide it the number in turn $1, 2, 3, ... , n - 1$. However, after a while, noticed that division to get the factors is sufficient up to $n/2$(inclusive). The rest part is not needed. What is its reason? Why is it enough to find them? How can it be explained?

@Edit, to find prime number until $\sqrt n$ is sufficient, but what about perfect numbers? I think $n/2$ is good way to go perfect numbers?

For 6,
1   2   3   4   5
^
^
^|
Up to here, it's ok.

• By "perfect number", do you mean a number which is the sum of all its proper divisors, $n = \sum_{d|n,d\lt n} d$? Of course six is one such number, $6=1+2+3$. – hardmath May 29 '18 at 14:29
• @hardmath < Yes, exactly. – itsnotmyrealname May 29 '18 at 14:30
• Note that for finding perfect numbers, no one has ever found an odd perfect number. The question if one exists is "open". The exact form of even perfect numbers is known, and they have many factors of two. In that sense it is a good idea to test for an even perfect number by dividing out as many factors of two as possible. See this previous Question How to check for perfect numbers? and its answers for more details, involving Mersenne primes. – hardmath May 29 '18 at 14:46
• Note: to find all of the prime factors, it is sufficient to go up to SQRT(n). To find all factors, it is faster to first find all of the prime factors and then use them to generate all of the factors. – RBarryYoung May 29 '18 at 20:54

There can't possibly be any factors between $\frac n2$ and $n$. Suppose $\frac n2 < a < n$ and $a \cdot b = n$. What could $b$ be? If $b=1$, then $a \cdot b = a < n$. If $b \geq 2$, then $a \cdot b > \frac n2 \cdot 2 = n$. So $b$ can't be any positive integer; thus $a$ isn't a factor of $n$.

In fact, as long as you list both factors when you do the division, you can stop testing at $\sqrt n$. That's because it's impossible for both factors to be greater than $\sqrt n$: if $a,b > \sqrt n$, then $a \cdot b > \sqrt n \cdot \sqrt n = n$. So factors always come in pairs $a \cdot b = n$ with $a < \sqrt n$ and $b > \sqrt n$ (with the exception of $\sqrt n$ itself, if it's an integer). Here's how this method works to find the factors of $10$:

• $3 < \sqrt 10 < 4$, so we can stop testing at $3$
• Test $1$: $\frac{10}1 = 10$, so $10 = 1 \cdot 10$, giving us the two factors $1$ and $10$
• Test $2$: $\frac{10}2 = 5$, so $10 = 2 \cdot 5$, giving us the two factors $2$ and $5$
• Test $3$: $\frac{10}3$ is not an integer so we don't get any factors

Thus the full list of factors is $1,10,2,5$ (or, reordered, $1,2,5,10$)

This method works to find all the factors, not just the prime factors, so it's a perfect method for testing whether a number is perfect (in our example, $1+2+5=8\neq10$, so $10$ is not perfect).

• Thank you. But, what about $6$? $\sqrt 6 = 2.44$ Should we ceil the number to get half border which is $3$? – itsnotmyrealname May 29 '18 at 14:38
• @itsnotmyrealname The argument I gave shows that you never have to check anything greater than $\sqrt n$ (since one of the factors must be less or equal to than $\sqrt n$), so we don't have to check $3$ in this case: just $1$ and $2$. Checking $1$ gives us $1$ and $6$; checking $2$ gives us $2$ and $3$. – BallBoy May 29 '18 at 14:40
• @itsnotmyrealname Another comment: the savings are much larger for larger $n$. The next known perfect number is $n=28$. By the $\sqrt n$ method, we have to check only up to (and including) $5$, which is much less than the $14$ we'd need to check by the $\frac n2$ method! Try it and see if you can show that $28$ is perfect. – BallBoy May 29 '18 at 14:41
• Gotcha what you mean. You can glance at it, ideone.com/VYKxup – itsnotmyrealname May 29 '18 at 15:00

Actually to find the (prime) factors of a whole number $n$, it is enough to check for divisors up to $\sqrt n$. Going up to $n/2$ would be overkill.

One way to think about this is to ask, if $n$ is not a prime but instead composite, how big can the smallest divisor of $n$ be? If we have the factorization $n = a\cdot b$, we cannot have both $a$ and $b$ larger than $\sqrt n$.

To make a complete list of the factors of a whole number $n\gt 1$, you can do it by checking all $1\lt a \lt \sqrt n$ and putting both $a$ and $b$ in your list when the division $n/a = b$ is exact. If $\sqrt n$ happens to be an integer (i.e. $n$ turns out to be a perfect square when we extract $\sqrt n$), then put one copy of that integer in the list of divisors. The list (of proper divisors of $n$) will be complete when you finish by including $1$, which is always a divisor you want in your list.

• Yes, I realized it early. Thank you for your algorithm. There are a host of code snippets etc. but I wanted to get what there exist in underneath. – itsnotmyrealname May 29 '18 at 15:10

Suppose we can write $n = a*b$, so both $a$ and $b$ are factors. Notice that it must be the case that one of them is less than or equal to $n/2$. To see this, suppose both $a,b > n/2$. Then $a*b > n$, which is absurd. This means for any pair of factors, one of them must be less than $n/2$, hence you need only check up to and including $n/2$ to find them all.

$\frac{n}{x}<2$ if $x>\frac{n}{2}$. $2$ is the smallest prime. If $x$ was a factor then $x\times \text{something}=n$ where $\text{something}\ge 2$.


# Program for Approximating nth root of a Number

#### Yuuki

##### Member
I have a question for a programming exercise I'm working on for C.

The problem is to "Write a program that uses Newton's method to approximate the nth root of a number to six decimal places." The problem also said to terminate after 100 trials if it failed to converge.

Q1. What does "converge" mean?
Does it mean the difference between two approximation can be made as small as I like?

Q2. On what condition should the program terminate?
There are two such conditions: 1) if the loop has been executed 100 times, 2) the difference between the "true" answer and the approximation is less than 0.000001.
I know how to set 1), but how should I express 2)?
Right now, I am setting the condition as
|approximation - root| < 0.00001,
but I feel it's kind of cheating, because I'm not supposed to know the real answer if I'm making approximations.
Are there any other any ways to express the condition, especially one involving the function f(x) = x^n - c (x is the nth root of c)?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Re: question on program for approximating nth root of a number

Hi Yuuki!

I have a question for a programming exercise I'm working on for C.

The problem is to "Write a program that uses Newton's method to approximate the nth root of a number to six decimal places." The problem also said to terminate after 100 trials if it failed to converge.

Q1. What does "converge" mean?
Does it mean the difference between two approximation can be made as small as I like
Yes. Basically.
More specifically, that you can get as close to the nth root as you want by just taking enough trials.

Q2. On what condition should the program terminate?
There are two such conditions: 1) if the loop has been executed 100 times, 2) the difference between the "true" answer and the approximation is less than 0.000001.
I know how to set 1), but how should I express 2)?
Right now, I am setting the condition as
|approximation - root| < 0.00001,
but I feel it's kind of cheating, because I'm not supposed to know the real answer if I'm making approximations.
Are there any other any ways to express the condition, especially one involving the function f(x) = x^n - c (x is the nth root of c)?
Exactly. You're not supposed to use the real root.
But what you can do is setting the condition as for instance
$$|\text{approximation} - \text{previous approximation}| < 0.0000001$$
If you achieve that, it is unlikely that the first 6 decimal digits will change in more iterations.

#### Yuuki

##### Member
Re: question on program for approximating nth root of a number

Thanks.

I set a new variable root0 to store the previous approximation, and set the condition as you said.
It worked beautifully.

#### zzephod

##### Well-known member
It is possible to estimate the error in an iterate directly (assuming it small anyway).

Let $$\displaystyle x$$ be the 6-th root of $$\displaystyle k$$ and $$\displaystyle x_n$$ an estimate of $$\displaystyle x$$ with error $$\displaystyle \varepsilon_n$$ such that:

$$\displaystyle x=x_n+\varepsilon_n$$

Then raising this to the 6-th power gives:

$$\displaystyle x^6=x_n^6 + 6 \varepsilon_n x_n^5 + O(\varepsilon_n^2)$$

Now ignoring second and higher order terms in $$\displaystyle \varepsilon$$ and rearranging we get:

$$\displaystyle \varepsilon_n=\frac{x_n^6-x^6}{6x_n^5}=\frac{x_n^6-k}{6x_n^5}$$

OK lets look at an example: Take $$\displaystyle k=66$$, and $$\displaystyle x_n=2$$, so $$\displaystyle x_n^6=64$$, then

$$\displaystyle \varepsilon_n=\frac{66-64}{6\times32}\approx 0.01042$$

which compares nicely with $$\displaystyle 66^{1/6}=2.01028...$$

The above is very similar (for similar read identical) to computing the next iterate and taking the difference of the iterates as an estimate of the error in the first.

Last edited:

#### Klaas van Aarsen

##### MHB Seeker
Staff member
It is possible to estimate the error in an iterate directly (assuming it small anyway).
It is also possible to specify an upper boundary for the remaining error in a specific iteration (in this specific case).

First off, after the first (positive) iteration, all iterations are guaranteed to be above the root.
The remaining error in those iterations is guaranteed to be less than the change in the approximation.


# Homework Help: Diagonals of a Quadrilateral

Tags:
1. Dec 31, 2014

### Born

1. The problem statement, all variables and given/known data

Problem 55 from Kiselevś Geometry - Book I. Planimetry: "Prove that each diagonal of a quadrilateral either lies entirely in its interior, or entirely in its exterior. Give an example of a pentagon for which this is false."

2. Relevant equations

3. The attempt at a solution

The pentagon part is pretty easy. I'm having trouble with the proof. A proof by contradiction seems to be the easiest way to solve this problem but I'd prefer a proof that also explains why this should be true.

I've tried using straight line properties (i.e. a straight line can be formed though any two points and it is unique) but I haven't gottten anywhere.

Thanks in advanced for any help!

Last edited: Dec 31, 2014
2. Dec 31, 2014

### Simon Bridge

Can you see why the pentagon can break the rule?
If a diagonal breaks the rule, then it must cross one of the sides - that help?
You can also look at the classes of quadrilateral and see how diagonals are formed in each case.

3. Dec 31, 2014

### MidgetDwarf

Maybe supplementary angles of a transversal are....

4. Jan 1, 2015

### lurflurf

the diagonal divides the plane in two and contains exactly two of the four points there are two cases both points lie on the same side or each lies on one side

5. Jan 2, 2015

### Born

Simon, MidgetDwarf, and lurflurf, I think you'll like what I've come up with. I'm sorry to not be able to show some pictures but I believe the written proof will suffice. Hope it's clear enough. Thank you for your help.

The three properties of straight lines in the proof are the following: (1) A straight line can be created from any two points, (2) this line is unique, and (3) if two straight lines coincide at least at two points, all their points coincide (making them the same line).

$\mathrm{Proof:}$

A quadrilateral has four vertices, each vertex point must connect to two others in order to form the sides of the quadrilateral. Labeling these four points A, B, C, and D and forming the following sides AB, BC, CD, and DA we create the quadrilateral ABCD. The diagonals of said quadrilateral will consequently be AC and BD.

If a diagonal were to not lie completely inside or outside the quadrilateral then it (the diagonal) must cross one of the sides of the quadrilateral (either to enter or to exit the figure).

The diagonal AC cannot cross the side AB, DA, BC, or CD because this would imply that the diagonal AD equals the respective side it crosses by property (3) (since AC would coincide with the point of the side it crosses and the point A or C). The same applies to BD and the side AB, DA, BC, or CD.

This implies that the diagonals of a quadrilateral cannot cross its sides.

Therefore the diagonals of a quadrilateral must either lie entirely inside or entirely outside. $\mathrm{QED}$

Last edited: Jan 2, 2015
6. Jan 2, 2015

### Born

$\mathrm{Follow\ up:}$

Concerning the pentagon: labeling the five vertex points A, B, C, D, E; and forming the sides AB, BC, CD, DE, and EA. A diagonal is made from point A to point D crossing the side BC. This is possible since the diagonal would only share one point with the side BC- (This is unlike the quadrilateral in which every diagonal would share two points of a side if said diagonal crossed said side)

Therefore a diagonal which lies partially outside and partially inside the figure is possible. $\mathrm{QED}$

Last edited: Jan 2, 2015


# Probability of a team winning a tournament

Problem

In the World Series of baseball, two teams (call them A and B) play a sequence of games against each other, and the first team to win four games wins the series. Let p be the probability that A wins an individual game, and assume that the games are independent. What is the probability that team A wins the series?

There will be at maximum seven games played to decide a clear winner.

This is a practice problem from a course on Probability. Its solution provided in the course gives two approaches.

First approach:

The Game will stop as any one of team wins.

$$P(A) = P(\text{A winning in 4 games}) + P(\text{A winning in 5 games}) + P(\text{A winning in 6 games}) + P(\text{A winning in 7 games})$$

For A to win, the last game must be won by team A.

$$\Rightarrow P(A) = p^4 + { 4 \choose 3}p^4q + { 5 \choose 3}p^4q^2 + { 6 \choose 3}p^4q^3$$

Second approach

Imagine telling the players to continue playing the games even after the match has been decided, then the outcome of the match won’t be affected by this, and this also means that the probability that A wins the match won’t be affected by assuming that the teams always play 7 games.

$$P(A) = P(\text{A winning 4 times in 7 games}) + P(\text{A winning 5 times in 7 games}) + P(\text{A winning 6 times in 7 games}) + P(\text{A winning 7 times in 7 games})$$

I am not able to follow the second approach. Why is second approach correct?

Update:

I am looking for an intuitive explanation for the second approach because in the second approach it appears that probabilities for winning 5, 6 and 7 matches are used which were not required for team A to win.

• Why is the second approach correct? In the same way that if I flip a coin one time the probability it is heads is the same as the probability the first coin flipped is heads when flipping a coin seven times in succession. If I ask what is the probability I win the very next game against my friend where I play only one game, the probability is the same as if i ask what is the probability I win the very next game against my friend when I play fifty games after the first only important game. – JMoravitz Mar 15 '17 at 22:40
• Because a team winning in the second version will also win in the first, and vice versa – Henry Mar 15 '17 at 22:40
• @JMoravitz Thanks. The second approach uses winning 5, 6, as well as 7 games. If I am correct then in the coin example, only the probability of getting heads the first time is considered even if we flipped it 7 times. – ovais Mar 15 '17 at 22:50
• Both ways to compute $P(A)$ produce a polynomial in $p$. Since they are both correct, the the two methods should produce the same polynomial; and they do: $-20p^7 + 70p^6 -84p^5 + 35p^4$. – Fabio Somenzi Mar 16 '17 at 0:51

Team $A$ wins the game if they win four matches times before $B$ wins four matches.   Thus the first approach measures the probability of team A doing so when team $B$ wins zero, one, two, or three matches before $A$'s fourth victory.

$$P(A) = \left(\binom 30 p^3q^0+\binom 41 p^3q^1+\binom 52 p^3q^2+\binom 63 p^3q^3\right)p$$

Now imagine the teams kept playing for a full seven matches even after one of them wins the game.   Team $A$ wins the game if they win at least four matches among those seven, since if they do so then team $B$ can win at most three matches before $A$ wins their fourth.

\begin{align}P(A) & = \binom 77 p^7q^0+\binom 76 p^6q^1+\binom 75 p^5q^2+\binom 74p^4q^3\end{align}

We can see these are equal by taking the terms of the first equation, and including the imagined games after victory.   Then if you use the binomial theorem to expand...

\begin{align}P(A) &= \binom 30 p^4q^0(p+q)^3+\binom 41 p^4q^1(p+q)^2+\binom 52 p^4q^2(p+q)+\binom 63 p^4q^3 \\[1ex] &= \binom 30 p^4q^0(p+q)^3+\binom 41 p^4q^1(p+q)^2+\binom 52 p^5q^2+\left(\binom 52+\binom 63\right) p^4q^3\\[1ex] &\vdots \\[1ex] &= \binom 77 p^7q^0+\binom 76 p^6q^1+\binom 75 p^5q^2+\left(\binom 30+\binom 41+\binom 52+\binom 63\right) p^4q^3 \\[1ex]& = \binom 77 p^7q^0+\binom 76 p^6q^1+\binom 75 p^5q^2+\binom 74p^4q^3\end{align}

• Thanks, Graham, I am looking for an intuition that why the second approach is using the probability of winning 5,6 or 7 matches in computing the result. It appears that it may increase $P(A)$ but it does not as both answers are same. – ovais Mar 16 '17 at 10:59

As an addendum to Graham's answer, after suitable massaging of the formulae, we get, for a best-of-$n$ tournament with odd $n$:

$$\sum_{0 \leq k \leq \frac{n-1}{2}} \binom{n}{\frac{n+1}{2}+k} \sum_{0 \leq j \leq k} (-1)^j \binom{\frac{n+1}{2}+k}{j} p^{\frac{n+1}{2}+k} \enspace.$$

We can then generate plots like this for $P(A)$:

Our intuition that a larger $n$ favors the stronger team is confirmed.

My question was to understand the intuition behind why the second approach is correct, especially why the second approach is apparently using probability for winning in 5, 6 or 7 matches while computing $P(A)$.

To figure out I tried to understand the cases which first event - P(A wins 4 times in 7 games) - of the second approach missed because that can give some clue over why we were adding the probabilities for winning 5,6 or 7 matches.

In this approach, we imagined the game is continued for 7 matches. For simplicity let's assume that $p = q = \frac 1 2$.

In the first approach, we added probabilities of four disjoint events - P(A winning in 4 games), P(A winning in 5), .. , P(A winning in 7 games). The denominators of each of these cases - representing the total number of possible cases - are different - $2^4, 2^5, 2^6, 2^7$.

In the second approach, denominators in the four disjoint events - P(A winning 4 times in 7 games), P(A winning 5 times in 7 games), ... P(A winning 7 times in 7 games) - are same and equal to $2^7$ representing the total number of possible outcomes.

Since the winner is decided as soon as one of the team wins 4 games, in the second approach, we have over counted the number of possible outcomes.

To reach the correct answer, either we decrease or adjust the number of possible outcomes from over counted outcomes or adjust it by increasing the number of favourable outcomes.

Adjusting the denominator will transform the second approach into the first approach. Thus let's try adjusting the favourable outcomes.

To put it accurately, we are not adjusting the favourable outcomes but after adding total number of ways A can win 4 matches, all the other outcomes of the games irrespective of success or failure of A will be considered as favourable.

This is equivalent to: P(A wins 4 matches and loses 3) + P(A wins 5 matches and loses 2) + P(A wins 6 matches and loses 1) + P(A wins 7 matches and loses 0).

Thus we are adding probabilities of winning 5, 6, and 7 matches because now the numerator contains all possible outcomes for losing 0, 1,2 or 3 matches once team A has won and the denominator already counts all the possible outcomes in the 7 games.


Structure of $Gal(\mathbb{Q}(\zeta_{15})/\mathbb{Q})$?

$\zeta_{15}$ is $15$th primitive $n$th root of unity.

Question: Find the structure of the group $Gal(\mathbb{Q}(\zeta_{15})/\mathbb{Q})$

I know that if $p$ is prime then $G=Gal(\mathbb{Q}(\zeta_{p})/\mathbb{Q})=\mathbb{Z_{p}}^*$ but when $p$ is not prime, I am not show how to solve this if not prime.

Does my required group have any relation to some cyclic group $\mathbb{Z_n}$, i.e. abelian

Would really appreciate your guidance as I have not got my head around these concepts of cyclotomic fields and Galois structure. Thanks

• It's the same thing as for primes. The Galois group is $\Bbb{Z}_{15}^*$ – Crostul Apr 3 '16 at 11:11
• Why is this the case? I would like to be able to construct some kind of proof – thinker Apr 3 '16 at 11:11
• en.wikipedia.org/wiki/Cyclotomic_field – Crostul Apr 3 '16 at 11:12
• I have seen it, and it does not give an explanation in sufficient detail – thinker Apr 3 '16 at 11:13
• Google "cyclotomic fields". You will find a lot of proofs for this fact, and other things – Crostul Apr 3 '16 at 11:15

Let $G$ be the Galois group of $\Bbb Q(\zeta_n)$ over $\Bbb Q$. An element $f \in G$ is entirely determined by its image on $\zeta_n$.

Since $f(\zeta_n)^k=f(\zeta_n^k)=1 \iff \zeta_n^k=1$ (recall that $f$ is a field automorphism), you know that $f(\zeta_n)$ is a primitive $n$-th root of unity: $$f(\zeta_n)=\zeta_n^{k_f}$$ for some integer $1≤k_f≤n$ coprime with $n$.

Therefore, you have a well-defined map $$\alpha : G \to (\Bbb Z/n\Bbb Z)^* \qquad \alpha(f)=[k_f]_n$$ You can check that this is a group isomorphism. It is clearly injective. Since $|G|=[\Bbb Q(\zeta_n):\Bbb Q]=\text{deg}(\Phi_n)=\phi(n) = |(\Bbb Z/n\Bbb Z)^*|$, $\alpha$ is bijective.

Finally, $(f \circ g)(\zeta_n)=f(g(\zeta_n)) = f(\zeta_n^{k_g})=\zeta_n^{k_g \, k_f}$ shows that $$\alpha(f \circ g) = [k_{f \circ g}]_n = [k_f]_n[k_g]_n=\alpha(f)\alpha(g).$$

More generally, let $K$ be a field of characteristic coprime with $n$ (e.g. if $\text{car}(K)=0$), and suppose that $R_n = \{x \in \overline K \mid x^n=1\}$ denotes the set of $n$-th roots of unity in an algebraic closure $\overline K$ of $K$ (notice that $R_n$ is always a cyclic group for the multiplication, since it is a finite subgroup of $(K^*,\cdot)$).

Then the extension $K(R_n)$ over $K$ is Galois (it is separable because $n$ is coprime with the characteristic of $K$) and you can show similarly that the Galois group of $K(R_n)$ over $K$ embeds in $(\Bbb Z/n\Bbb Z)^*$.

• so in this case $\zeta_{n}$ acts as a cyclic generator? – thinker Apr 3 '16 at 14:10
• Yes, absolutely: the $n$-th roots of $1$ (i.e. $x$ such that $x^n=1$) are of the form $x=\zeta_n^j$, i.e. the set $R_n$ of the $n$-th roots of $1$ is actually the subgroup generated by $\zeta_n$. Indeed, $R_n$ is a finite subgroup (for the multiplication) of $\overline{ \Bbb Q}^*$ (where $\overline{\Bbb Q}$ is an algebraic closure of $\Bbb Q$. You may know that every finite subgroup of $(K^*,\cdot)$ (where $K$ is any field) is actually cyclic. – Watson Apr 3 '16 at 14:13
• Then, $\Bbb Q(\zeta_n)$ over $\Bbb Q$ is Galois because it is separable (any extension of a field of characteristic $0$, as $\Bbb Q$, is separable) and normal (it is the splitting field of $X^n-1$ : any root of $X^n-1$ belongs to $R_n = \langle \zeta_n \rangle$, and therefore to $\Bbb Q(\zeta_n)$). – Watson Apr 3 '16 at 14:16


Math Help - Sum of 2 squares

1. Sum of 2 squares

Sorry before I tell you the question here was the question that led to this question.

Show that (m^2+1)(n^2+1)=(m+n)^2+(mn-1)^2

Done that successfully.

Using this results, write 500050 as the sum of 2 square numbers.

I have no idea how to make a knowledgeable guess at the two squares so I've tried using random (well, not exactly, generic random numbers) to get an answer but to no avail

2. Originally Posted by Mukilab
Sorry before I tell you the question here was the question that led to this question.

Show that (m^2+1)(n^2+1)=(m+n)^2+(mn-1)^2

Done that successfully.

Using this results, write 500050 as the sum of 2 square numbers.

I have no idea how to make a knowledgeable guess at the two squares so I've tried using random (well, not exactly, generic random numbers) to get an answer but to no avail
Try m=7.

50 is very close to 49 and stands out that way..

3. Hello, Mukilab!

Show that: . $(m^2+1)(n^2+1)\:=\m+n)^2+(mn-1)^2" alt=" (m^2+1)(n^2+1)\:=\m+n)^2+(mn-1)^2" />

Done that successfully. . Good!
Using this results, write 500,050 as the sum of 2 square numbers.

Note that: . $500,050 \;=\;(50)(10,\!001) \;=\;(7^2+1)(100^2+1)$

$\text{Let }m = 7,\;n = 100 \text{ in the formula:}$

. . $(7^2 + 1)(100^2 + 1) \;=\;(7 + 100)^2 + (7\cdot100 - 1)^2 \;=\;107^2 + 699^2$

4. m=7 is a really nice guess
OK. $500050=10001*50$
and $10001=10000+1$
and $50=49+1$
Apply in your equation: $(m^2+1)(n^2+1)=(m+n)^2+(mn-1)^2$
Then....

5. That would make n a decial (10sqrt10)

6. Originally Posted by Soroban
Hello, Mukilab!

Note that: . $500,050 \;=\;(50)(10,\!001) \;=\;(7^2+1)(100^2+1)$

$\text{Let }m = 7,\;n = 100 \text{ in the formula:}$

. . $(7^2 + 1)(100^2 + 1) \;=\;(7 + 100)^2 + (7\cdot100 - 1)^2 \;=\;107^2 + 699^2$

Thanks Soroban!

Sorry, only saw the first post at the start

Any tips for future questions such as this?? Take away the integers so I'm left with the algebraic numbers (as you did with 49 and 100)?

Thanks again

7. Originally Posted by Mukilab
That would make n a decial (10sqrt10)
Maybe you entered 50050 / 50 instead of 500050 / 50? m=7 gives n=100 as shown above.

8. Originally Posted by Mukilab
Thanks Soroban!

Sorry, only saw the first post at the start

Any tips for future questions such as this?? Take away the integers so I'm left with the algebraic numbers (as you did with 49 and 100)?

Thanks again
Another way to go about expressing integers as sums of two squares is knowing that: the set of integers expressible as the sum of two squares is closed under multiplication, and an odd prime is expressible as the sum of two squares if and only if it is congruent to 1 (mod 4). See here and here.