text:
## Theorem 17: Dirichlet’s theorem

The fact that there are infinitely many prime numbers was a previous theorem of the week.  This week, I’d like to pursue the idea a bit further.

Let’s think about the primes when we divide them by 2.  What do we get?  Well, the first prime (2) is even, but then all the others are odd.  Why is that?  An even number has a factor of 2, so the only way in which an even number can be prime is if it is itself 2.

Now let’s think about the primes when we divide them by 4.  What do we get?  Here are the first few primes:

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97.

And here are the remainders when we divide those by 4:

2, 3, 1, 3, 3, 1, 1, 3, 3, 1, 3, 1, 1, 3, 3, 1, 3, 1, 3, 3, 1, 3, 3, 1, 1.

What can we notice about those remainders?  Perhaps the most obvious thing is that apart from the initial 2, all the remainders are 1 and 3.  The 1s and 3s don’t seem to have a clear pattern that I can see (they don’t alternate, for example), but the numbers of them are pretty similar (11 1s and 13 3s).  Can we make any guesses about what happens after the first 25 primes?  Is the remainder ever anything other than 1 or 3 (except for that initial 2)?  Are there infinitely many 1s and 3s, or will the sequence eventually settle on one?   If it doesn’t settle on one, are there the same numbers of 1s and 3s?

It’s reasonably easy to see that the remainder when we divide a prime by 4 must be 1 or 3 (unless the prime is 2).  Perhaps you’ve already worked that out.  Apart from 2, every prime number is odd (as we saw above).  And numbers that leave remainder 0 or 2 when divided by 4 are even.  So prime numbers (apart from 2) leave remainder 1 or 3 when divided by 4.  That’s that settled.

So, to the next questions.  Are there infinitely many primes that leave remainder 1 when divided by 4?  Are there infinitely many primes that leave remainder 3 when divided by 4?  These are not as easy as the last question, but are not too hard.  It turns out that the answer is “Yes” to both questions.  I think I’ll let you find a proof for yourself, as it’s a nice exercise, but I’ll give you a couple of hints.  I described Euclid’s proof that there are infinitely many primes.  Suitable variants of that will give proofs that there are infinitely many primes leaving remainder 1 when divided by 4  and infinitely many primes leaving remainder 3 when divided by 4.

Are there the same numbers of primes leaving remainder 1 and remainder 3 when divided by 4?  It turns out that the answer is yes (when the question is interpreted carefully), but that’s harder to prove, so I’ll leave it for now.

What would happen if we replaced 4 by 6, for example?  Here are the remainders when the first few primes are divided by 6:

2, 3, 5, 1, 5, 1, 5, 1, 5, 5, 1, 1, 5, 1, 5, 5, 5, 1, 1, 5, 1, 1, 5, 5, 1.

Hopefully you will be able to convince yourself that apart from 2 and 3, every prime leaves remainder 1 or 5 when divided by 6.  But are there infinitely many of each sort?  Notice that this time there are 11 primes leaving remainder 1 when divided by 6 and 12 leaving remainder 5 — again, the numbers are very close.

It starts getting a bit harder to prove that there are infinitely many primes leaving remainder 1 when divided by 6, and infinitely many leaving remainder 5 when divided by 6.  And anyway, we’re mathematicians, so we’d like a more general strategy.

What would a more general strategy mean?  Suppose I fix some number q, and we think about the remainders when we divide the primes by q.  If a and q have a common factor greater than 1, then we’re not going to get many primes with remainder a when divided by q (either no primes at all, or just one).  Remember that there was only one prime with remainder 2 when divided by 6, and none at all with remainder 4 when divided by 6.  So those are the boring cases that we can eliminate immediately.  But what if a and q have no common factor greater than 1: what if a and q are coprime?  Then we have no obvious reason why there shouldn’t be infinitely many primes leaving remainder a when divided by q, and our earlier examples suggest that perhaps there are indeed infinitely many such primes.  But that’s just a guess — perhaps there’s some more subtle problem for some q.  It turns out to be correct, though, and that’s this week’s theorem, due to Dirichlet.

Theorem (Dirichlet’s theorem) Let a and q be coprime natural numbers (positive whole numbers with highest common factor 1).  Then there are infinitely many primes that leave remainder a when divided by q.

Putting it another way, there are infinitely many primes in the arithmetic progression a, a+q, a+2q, a+3q, ….

Informally, if there isn’t an obvious reason why there can’t be infinitely primes leaving remainder a when divided by q, then there are infinitely many such primes.

Now, how does one go about proving something like this?  I’m not going to go into details, because it gets a bit technical and fiddly.  But the first key idea is that instead of trying to mimic Euclid’s proof that there are infinitely many primes, one should instead try to mimic Euler’s proof, which I also mentioned previously.  So we should think about the sum

$\sum_{p: p\equiv a\mod{q}} \frac{1}{p}$.

That is, we take the sum of 1/p as p ranges over all primes that leave remainder a when divided by q.  If we can show that this sum diverges, then, just as before, we’ll see that there are infinitely many primes of this kind.  Now I stopped describing the proof at this point last time, and I’m going to do the same here!  Suggestions for further reading below.

It turns out that the primes are (approximately) evenly divided amongst the various possible remainders, just as they were when we divided by 4.  There’s a result called the Siegel-Walfisz theorem, closely related to the prime number theorem for arithmetic progressions.  But this is harder, and in fact there are conjectures in the area that mathematicians haven’t yet been able to prove (such as the Elliott-Halberstam conjecture).

This sort of material comes up in books on analytic number theory, such as Davenport’s Multiplicative Number Theory, and Analytic Number Theory by Iwaniec and Kowalski, and many more.

### 4 Responses to “Theorem 17: Dirichlet’s theorem”

1. Boris Says:

It turns out that there is a good reason to side with Euler rather than Euclid. Decades after Dirichlet proved his theorem, Ram Murty showed that Euclid’s proof generalizes only to congruence classes of a very special form.

2. Number Theory: Lecture 14 « Theorem of the week Says:

[…] Theorem 43 (Dirichlet): Let be an integer greater than 1, and let be coprime to .  Then there are infinitely many primes congruent to modulo .  We did not prove this!  But we saw a small hint of how one can prove it. […]

3. Mathematical Monday: Happy Bithday Peter Dirichlet! Says:

[…] It’s a bit more complex than what I put here, and if you want to see some crazy math behind it, I would love to direct you to the blog Theorem of the Week. […]

4. Number Theory: Lecture 14 | Theorem of the week Says:

[…] Theorem 42 (Dirichlet‘s theorem on primes in arithmetic progression): Let be an integer greater than , and let be a natural number coprime to .  Then there are infinitely many primes congruent to modulo .  That is, there are infinitely many primes in the arithmetic progression , , , , …. We are not going to see a proof of this result in this course (but see below in the Further reading section for places to look). […]


text:
# Riemann-Lebesgue application

By the Riemann-Lebesgue lemma, I have shown that for any finite interval measurable set $I$ of finite measure, any $h \in \mathbb{R}$, $$\lim_{n \to\infty}\int_I \cos (n(x+h)) \mathop{dx} = 0.$$

I also have an arbitrary real sequence $\{a_n\}$, and I would like to show $$\lim _{n \to \infty} \int_I \cos\left(n\left(x+\frac{a_n}{n}\right)\right)\mathop{dx} = 0$$

How can we see this? I tried by noting that for fixed $k$, we have $$\lim _{n \to \infty} \int_I \cos\left(n\left(x+\frac{a_k}{k}\right)\right)\mathop{dx} = 0$$ by the first equation above. I tried to do take this and do a "diagonalization argument," but I convinced myself that it would not work (if a countable number of sequences converge to a common limit, its "diagonal" sequence does not necessarily converge to that limit, if at all). I guess I haven't exploited the periodicity of cosine yet... any suggestions? Thanks!

Notice that your function can be easily integrated, so we don't need the Riemann-Lebesgue lemma.

Say, your interval is $I=[a,b]$. Then

$$\int_a^b \cos(nx+a_n) dx=\left.\frac{1}{n}\sin(nx+a_n)\right|_a^b$$

which converges to $0$ as $n\rightarrow\infty$.

More generally:

Claim: Let $f\in L^1(I)$ and $(a_n)_n$ any sequence of real numbers. Then $$\lim_{n\rightarrow\infty}\int_I \cos(nx+a_n) f(x) dx=0$$

The proof is the same as for the Riemann-Lebesgue lemma:

• Assume without loss of generality that $f$ is smooth (smooth functions are dense in $L^1(I)$).
• Do an integration by parts, integrating the $\cos$-term and giving a factor $1/n$.
• Notice that this converges to $0$.
• What happens if we generalize to measurable sets $I$ of finite measure? Feb 28 '14 at 16:53
• The same, we also don't need finite measure. In fact this holds also on all of $\mathbb{R}$.
– J.R.
Feb 28 '14 at 16:56
• The point of Riemann-Lebesgue and the oscillatory integrals in general is to integrate by parts. That really is the whole story.
– J.R.
Feb 28 '14 at 16:59

format: plain


text:
# Math Help - circles help please

1. ## circles help please

x^2-12x+y^2+4y+15=0

a) specifies a circle. find its centre and radius.

b) Find the coordinates of any points at which the circle in part (a) intersects line y=x-9

2. Originally Posted by toplad
x^2-12x+y^2+4y+15=0

a) specifies a circle. find its centre and radius.

b) Find the coordinates of any points at which the circle in part (a) intersects line y=x-9
a)
$
x^2-12x+36 + y^2 +4y+4 -25=0
$

$
(x-6)^2+(y+2)^2=5^2
$

hence the coordinates of centre are (6,-2)
and radius is 5
b)
-put the value of y from line's equation into that of circle

-solve the quadratic equation that follows

-for the values of x you get find y and the corresponding pairs
are point of intersection

Now try this yourself now


text:
# Lesson 8. Use lapply in R Instead of For Loops to Process .csv files - Efficient Coding in R

## Learning Objectives

After completing this tutorial, you will be able to:

• Use the lapply() function in R to automate your code.

## What You Need

You will need a computer with internet access to complete this lesson.

In the previous lessons, you learned how to use for loops to perform tasks that you want to implement over and over - for example on a set of files. For loops are a good start to automating your code. However if you want to scale this automation to process more and / or larger files, the R apply family of functions are useful to know about.

apply functions perform a task over and over - on a list, vector, etc. So, for example you can use the lapply function (list apply) on the list of file names that you generate when using list.files().

## Why Use Apply vs For Loops

There are several good reasons to use the apply family of functions.

1. They make your code more expressive and in turn easier to read:

Here’s what the master, Hadley Wikham has to say about expressive code and the apply family:

The point of the apply (and plyr) family of functions is not speed, but expressiveness. They also tend to prevent bugs because they eliminate the book keeping code needed with loops.

Lately, answers on stackoverflow have over-emphasised speed. Your code will get faster on its own as computers get faster and R-core optimises the internals of R. Your code will never get more elegant or easier to understand on its own.

In this case you can have the best of both worlds: an elegant answer using vectorisation that is also very fast, (million > 0) * 2 - 1. Source: Hadley Wikham, stackoverflow comment

And another quote:

A common reflex is to use a function in the apply family. This is not vectorization, it is loop-hiding. The apply function has a for loop in its definition – Source: Patrick Burns - the Inferno.

2. They make it easier to parallelize your code: Most computers these days have more than one core that can be used to process your data. However, by default, most functions in R only take advantage of one core on your machine. This means your computer course process things faster. Parallelized code refers to code that is optimized to use the cores available to it on a machine. While this topic is out of the scope of this class - it’s important to know about if you ever need to process large amounts of data - particularly in a cloud or high performance computing environment.

3. They make your code just a bit faster At the bottom of this lesson you’ll see a quick benchmark test where you see whether the apply version of a for loop is faster or not. The apply functions do run a for loop in the background. However they often do it in the C programming language (which is used to build R). This does make the apply functions a few milliseconds faster than regular for loops. However, this is not the main reason to use apply functions!

# view code for the lapply function
lapply
## function (X, FUN, ...)
## {
##     FUN <- match.fun(FUN)
##     if (!is.vector(X) || is.object(X))
##         X <- as.list(X)
##     .Internal(lapply(X, FUN))
## }
## <bytecode: 0x55612e339e20>
## <environment: namespace:base>

library(parallel)
# how many cores are on this machine
detectCores()
## [1] 36

## Use lapply to Process Lists of Files

Next, let’s look at an example of using lapply to perform the same task that you performed in the previous lesson. To do this you will need to:

1. Write a function that performs all of the tasks that you executed in your for loop.
2. Call the apply function and tell it to use the function that you created in step 1.

To get started, call the lubridate and dplyr libraries like you did in the previous lessons.

library(lubridate)
library(dplyr)

### How lapply Works

lapply takes a vector (or list) as its first argument (in this case a vector of the continent names), then a function as its second argument. This function is then executed on every element in the first argument. This is very similar to a for loop: first, cc stores the first continent name, “Asia”, then runs the code in the function body, then cc stores the second continent name, and runs the function body, and so on. The code in the function body can be thought of in exactly the same way as the body of the for loop. The result of the last line is then returned to lapply, which combines the results into a list. –Software Carpentry

check_create_dir <- function(the_dir) {
if (!dir.exists(the_dir)) {
dir.create(the_dir, recursive = TRUE) }
}

in_to_mm <- function(data_in_inches) {
value_inches <- data_in_inches * 25.4
return(value_inches)
}

In the previous lessons, you created a list of files in a directory.

all_precip_files <- list.files("data/week_06", pattern = "*.csv",
full.names = TRUE)

# create an object with the directory name
the_dir <- "data/week-06/outputs/precip_mm"
# check to see if the directory exists - make it if it doesn't
check_create_dir(the_dir)

# print the name of each file
for (file in all_precip_files) {
mutate(DATE = as.POSIXct(DATE, tz = "America/Denver", format = "%Y-%m-%d %H:%M:%S"),
# add a column with precip in mm
precip_mm = in_to_mm(HPCP))

# write the csv to a new file
write.csv(the_data, file = paste0(the_dir, "/", basename(file)),
na = "999.99")

}

Create a function that performs all of the tasks performed in the for loop above.

# create a function that performs all of the tasks performed in the for loop above
summarize_data <- function(a_csv, the_dir) {
# open the data, fix the date and add a new column
mutate(DATE = as.POSIXct(DATE, tz = "America/Denver", format = "%Y-%m-%d %H:%M:%S"),
# add a column with precip in mm - you did this using a function previously
precip_mm = (HPCP * 25.4))

# write the csv to a new file
write.csv(the_data, file = paste0(the_dir, "/", basename(a_csv)),
na = "999.99")
}

As you did above, make sure your output directory is created. Then use list.files() to get a list of all of the files that you’d like to process.

the_dir_ex <- "data/week-06/outputs/example"
check_create_dir(the_dir_ex)
# get a list of all files that you want to process
# you can use a list with the lapply function
all_precip_files <- list.files("data/week_06", pattern = "*.csv",
full.names = TRUE)

Now you can perform the same task that you performed above in a loop with one line of code (ok two if you break them up for readability).

lapply(all_precip_files,
FUN = summarize_data,
the_dir = the_dir_ex)
## list()

# turn off the output empty list
invisible(lapply(all_precip_files, (FUN = summarize_data),
the_dir = the_dir_ex))

## Are Apply Function Faster Than For Loops?

As promised let’s test your code to see whether the lapply() function is in fact faster than the for loop.

# let's see what approach is faster
library(microbenchmark)
microbenchmark(invisible(lapply(all_precip_files, (FUN = summarize_data),
the_dir = the_dir_ex)))
## Unit: microseconds
##                                                                               expr
##  invisible(lapply(all_precip_files, (FUN = summarize_data), the_dir = the_dir_ex))
##   min    lq    mean median     uq   max neval
##  1.17 1.207 1.70154 1.3335 1.4865 29.29   100

# print the name of each file
microbenchmark(for (file in all_precip_files) {
mutate(DATE = as.POSIXct(DATE, tz = "America/Denver", format = "%Y-%m-%d %H:%M:%S"),
# add a column with precip in mm
precip_mm = in_to_mm(HPCP))

# write the csv to a new file
write.csv(the_data, file = paste0(the_dir, "/", basename(file)),
na = "999.99")

})
## Unit: nanoseconds
##                                                                                expr
##  for (file in all_precip_files) {     the_data <- read.csv(file, header = TRUE, na.strings = 999.99) %>%          mutate(DATE = as.POSIXct(DATE, tz = "America/Denver",              format = "%Y-%m-%d %H:%M:%S"), precip_mm = in_to_mm(HPCP))     write.csv(the_data, file = paste0(the_dir, "/", basename(file)),          na = "999.99") }
##  min  lq   mean median    uq   max neval
##  248 290 497.76    313 453.5 10812   100

Is it faster on average? Perhaps just by a few milliseconds?


text:
# Windows, Google Drive, Rclone Mount, and Bazarr (for Sonarr)

What is the problem you are having with rclone?
When I mount my Google Drive with rclone to drive H:, my Bazarr install can not see it. Typically for Bazarr to see things you have to use the UNC link \server\share. i do not know a unc link for the rclone mount.

What is your rclone version (output from rclone version)
1.54.1
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Windows 10 pro

Which cloud storage system are you using? (eg Google Drive)

The command you were trying to run (eg rclone copy /tmp remote:tmp)
Rclone Mount

So upon reading some more I also have a question wether I need a cache drive.

---edit----

If I can not figure this out, is there a way to sync my files using rclone sync but not delete different files. For example right now if I use rsync c:\data to Gdrive:\data it will delete any files on Gdrive/Data that are not on c:\data. I just want it to sync and add not delete.

that should be documented here
for example,
rclone mount remote:path/to/files X: --volname \\server\share

if you re-edit an old post, it gets confusing, better to start a new post.

a sync without the ability to delete is not a sync.
can you explain what you are trying to accomplish?

So

I looked at that and tried to implement it, but it just assigns drive X and still does not work for unc.

What i am looking to do is I could move bazarr to my NAS drive. What this would accomplish, is to make all subtitles to install onto the NAS. However, my media files autoinstall onto my gdrive. So if I sync NAs to Gdrive it will delete new mkv files. If i sync Gdrive to NAS it will delete srt files.

Can i simply use rclone copy *.srt? or rclone sync *.srt?

works for me.

i would update rclone to latest stable v1.55.1 and update winfsp to latest stable v1.9
then run the mount command again with debug output and post it.

rclone sync c:\path\to\files --include=*.srt --dry-run

i ranthe command

rclone mount Gdrive_encrypt\ X: --volname \\Gdrive\ --log-level DEBUG --log-file "c:\media\Logs\Mount.txt"

I was unable to update rclone at this time due to a process is already running
but i attached the log file

Mount.txt (9.2 KB)

volname seems to only set the name of the vlume and does not create a unc path

I did skim through @Animosity022 page here recommended-google-drive-and-plex-mount-settings but it looks as if this is for linux.

--volname \\Gdrive\ seems to be missing a share name

it should be something like \\server\share. both a server name and a file share name.
not sure rclone did not error out.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.


text:
Skip to main content
$$\require{cancel}$$

# 7.5: Friction (Part 2)

## Friction and the Inclined Plane

One situation where friction plays an obvious role is that of an object on a slope. It might be a crate being pushed up a ramp to a loading dock or a skateboarder coasting down a mountain, but the basic physics is the same. We usually generalize the sloping surface and call it an inclined plane but then pretend that the surface is flat. Let’s look at an example of analyzing motion on an inclined plane with friction.

Example $$\PageIndex{1}$$: Downhill Skier

A skier with a mass of 62 kg is sliding down a snowy slope at a constant velocity. Find the coefficient of kinetic friction for the skier if friction is known to be 45.0 N.

Strategy

The magnitude of kinetic friction is given as 45.0 N. Kinetic friction is related to the normal force N by fk = $$\mu_{k}$$N; thus, we can find the coefficient of kinetic friction if we can find the normal force on the skier. The normal force is always perpendicular to the surface, and since there is no motion perpendicular to the surface, the normal force should equal the component of the skier’s weight perpendicular to the slope. (See Figure $$\PageIndex{1}$$, which repeats a figure from the chapter on Newton’s laws of motion.)

We have

$N = w_{y} = w \cos 25^{o} = mg \cos 25^{o} \ldotp$

Substituting this into our expression for kinetic friction, we obtain

$f_{k} = \mu_{k} mg \cos 25^{o},$

which can now be solved for the coefficient of kinetic friction $$\mu_{k}$$.

Solution

Solving for $$\mu_{k}$$ gives

$\mu_{k} = \frac{f_{k}}{N} = \frac{f_{k}}{w \cos 25^{o}} = \frac{f_{k}}{mg \cos 25^{o}} \ldotp$

Substituting known values on the right-hand side of the equation,

$\mu_{k} = \frac{45.0\; N}{(62\; kg)(9.80\; m/s^{2})(0.906)} = 0.082 \ldotp$

Significance

This result is a little smaller than the coefficient listed in Table 6.1 for waxed wood on snow, but it is still reasonable since values of the coefficients of friction can vary greatly. In situations like this, where an object of mass m slides down a slope that makes an angle $$\theta$$ with the horizontal, friction is given by fk = $$\mu_{k}$$ mg cos $$\theta$$. All objects slide down a slope with constant acceleration under these circumstances.

We have discussed that when an object rests on a horizontal surface, the normal force supporting it is equal in magnitude to its weight. Furthermore, simple friction is always proportional to the normal force. When an object is not on a horizontal surface, as with the inclined plane, we must find the force acting on the object that is directed perpendicular to the surface; it is a component of the weight.

We now derive a useful relationship for calculating coefficient of friction on an inclined plane. Notice that the result applies only for situations in which the object slides at constant speed down the ramp.

An object slides down an inclined plane at a constant velocity if the net force on the object is zero. We can use this fact to measure the coefficient of kinetic friction between two objects. As shown in Example $$\PageIndex{1}$$, the kinetic friction on a slope is fk = $$\mu_{k}$$ mg cos $$\theta$$. The component of the weight down the slope is equal to mg sin $$\theta$$ (see the free-body diagram in Figure $$\PageIndex{1}$$). These forces act in opposite directions, so when they have equal magnitude, the acceleration is zero. Writing these out,

$\mu_{k} mg \cos \theta = mg \sin \theta \ldotp$

Solving for $$\mu_{k}$$, we find that

$\mu_{k} = \frac{mg \sin \theta}{mg \cos \theta} = \tan \theta \ldotp$

Put a coin on a book and tilt it until the coin slides at a constant velocity down the book. You might need to tap the book lightly to get the coin to move. Measure the angle of tilt relative to the horizontal and find $$\mu_{k}$$. Note that the coin does not start to slide at all until an angle greater than $$\theta$$ is attained, since the coefficient of static friction is larger than the coefficient of kinetic friction. Think about how this may affect the value for $$\mu_{k}$$ and its uncertainty.

## Atomic-Scale Explanations of Friction

The simpler aspects of friction dealt with so far are its macroscopic (large-scale) characteristics. Great strides have been made in the atomic-scale explanation of friction during the past several decades. Researchers are finding that the atomic nature of friction seems to have several fundamental characteristics. These characteristics not only explain some of the simpler aspects of friction—they also hold the potential for the development of nearly friction-free environments that could save hundreds of billions of dollars in energy which is currently being converted (unnecessarily) into heat.

Figure $$\PageIndex{2}$$ illustrates one macroscopic characteristic of friction that is explained by microscopic (small-scale) research. We have noted that friction is proportional to the normal force, but not to the amount of area in contact, a somewhat counterintuitive notion. When two rough surfaces are in contact, the actual contact area is a tiny fraction of the total area because only high spots touch. When a greater normal force is exerted, the actual contact area increases, and we find that the friction is proportional to this area.

However, the atomic-scale view promises to explain far more than the simpler features of friction. The mechanism for how heat is generated is now being determined. In other words, why do surfaces get warmer when rubbed? Essentially, atoms are linked with one another to form lattices. When surfaces rub, the surface atoms adhere and cause atomic lattices to vibrate—essentially creating sound waves that penetrate the material. The sound waves diminish with distance, and their energy is converted into heat. Chemical reactions that are related to frictional wear can also occur between atoms and molecules on the surfaces. Figure $$\PageIndex{3}$$ shows how the tip of a probe drawn across another material is deformed by atomic-scale friction. The force needed to drag the tip can be measured and is found to be related to shear stress, which is discussed in Static Equilibrium and Elasticity. The variation in shear stress is remarkable (more than a factor of 1012 ) and difficult to predict theoretically, but shear stress is yielding a fundamental understanding of a large-scale phenomenon known since ancient times—friction.

Simulation

Describe a model for friction on a molecular level. Describe matter in terms of molecular motion. The description should include diagrams to support the description; how the temperature affects the image; what are the differences and similarities between solid, liquid, and gas particle motion; and how the size and speed of gas molecules relate to everyday objects.

Example $$\PageIndex{2}$$: Sliding Blocks

The two blocks of Figure $$\PageIndex{4}$$ are attached to each other by a massless string that is wrapped around a frictionless pulley. When the bottom 4.00-kg block is pulled to the left by the constant force $$\vec{P}$$, the top 2.00-kg block slides across it to the right. Find the magnitude of the force necessary to move the blocks at constant speed. Assume that the coefficient of kinetic friction between all surfaces is 0.400.

Strategy

We analyze the motions of the two blocks separately. The top block is subjected to a contact force exerted by the bottom block. The components of this force are the normal force N1 and the frictional force −0.400 N1. Other forces on the top block are the tension T in the string and the weight of the top block itself, 19.6 N. The bottom block is subjected to contact forces due to the top block and due to the floor. The first contact force has components −N1 and 0.400 N1, which are simply reaction forces to the contact forces that the bottom block exerts on the top block. The components of the contact force of the floor are N2 and 0.400 N2. Other forces on this block are −P, the tension T, and the weight –39.2 N. Solution Since the top block is moving horizontally to the right at constant velocity, its acceleration is zero in both the horizontal and the vertical directions. From Newton’s second law,

 $\sum F_{x} = m_{2} a_{x}$ $T - 0.400\; N_{1} = 0$ $\sum F_{y} = m_{1} a_{y}$ $N_{1} - 19.6\; N = 0 \ldotp$

Solving for the two unknowns, we obtain N1 = 19.6 N and T = 0.40 N1 = 7.84 N. The bottom block is also not accelerating, so the application of Newton’s second law to this block gives

 $\sum F_{x} = m_{2} a_{x}$ $T - P + 0.400\; N_{1} + 0.400\; N_{2} = 0$ $\sum F_{y} = m_{1} a_{y}$ $N_{2} - 39.2\; N - N_{1} = 0 \ldotp$

The values of N1 and T were found with the first set of equations. When these values are substituted into the second set of equations, we can determine N2 and P. They are

$N_{2} = 58.8\; N\; and\; P = 39.2\; N \ldotp$

Significance

Understanding what direction in which to draw the friction force is often troublesome. Notice that each friction force labeled in Figure $$\PageIndex{4}$$ acts in the direction opposite the motion of its corresponding block.

Example $$\PageIndex{3}$$: A Crate on an Accelerating Truck

A 50.0-kg crate rests on the bed of a truck as shown in Figure $$\PageIndex{5}$$. The coefficients of friction between the surfaces are $$\mu_{k}$$ = 0.300 and $$\mu_{s}$$ = 0.400. Find the frictional force on the crate when the truck is accelerating forward relative to the ground at (a) 2.00 m/s2, and (b) 5.00 m/s2.

Strategy

The forces on the crate are its weight and the normal and frictional forces due to contact with the truck bed. We start by assuming that the crate is not slipping. In this case, the static frictional force fs acts on the crate. Furthermore, the accelerations of the crate and the truck are equal.

Solution

1. Application of Newton’s second law to the crate, using the reference frame attached to the ground, yields
 $\begin{split} \sum F_{x} & = ma_{x} \\ f_{s} & = (50.0\; kg)(2.00\; m/s^{2}) \\ & = 1.00 \times 10^{2}\; N \end{split}$ $\begin{split} \sum F_{y} & = ma_{y} \\ N - 4.90 \times 10^{2}\; N & = (50.0\; kg)(0) \\ N & = 4.90 \times 10^{2}\; N \ldotp \end{split}$

We can now check the validity of our no-slip assumption. The maximum value of the force of static friction is $$\mu_{s} N = (0.400)(4.90 \times 10^{2}\; N) = 196\; N,$$whereas the actual force of static friction that acts when the truck accelerates forward at 2.00 m/s2 is only 1.00 x 102 N. Thus, the assumption of no slipping is valid.

2. If the crate is to move with the truck when it accelerates at 5.0 m/s2, the force of static friction must be $$f_{s} = ma_{x} = (50.0\; kg)(5.00\; m/s^{2}) = 250\; N \ldotp$$Since this exceeds the maximum of 196 N, the crate must slip. The frictional force is therefore kinetic and is $$f_{k} = \mu_{k} N = (0.300)(4.90 \times 10^{2}\; N) = 147\; N \ldotp$$The horizontal acceleration of the crate relative to the ground is now found from \begin{split} \sum F_{x} & = ma_{x} \\ 147\; N & = (50.0\; kg)a_{x}, \\ so\; a_{x} & = 2.94\; m/s^{2} \ldotp \end{split}\]

Significance

Relative to the ground, the truck is accelerating forward at 5.0 m/s2 and the crate is accelerating forward at 2.94 m/s2. Hence the crate is sliding backward relative to the bed of the truck with an acceleration 2.94 m/s2 − 5.00 m/s2 = −2.06 m/s2.

Example $$\PageIndex{4}$$: Snowboarding

Earlier, we analyzed the situation of a downhill skier moving at constant velocity to determine the coefficient of kinetic friction. Now let’s do a similar analysis to determine acceleration. The snowboarder of Figure $$\PageIndex{6}$$ glides down a slope that is inclined at $$\theta$$ = 13° to the horizontal. The coefficient of kinetic friction between the board and the snow is $$\mu_{k}$$ = 0.20. What is the acceleration of the snowboarder?

Strategy

The forces acting on the snowboarder are her weight and the contact force of the slope, which has a component normal to the incline and a component along the incline (force of kinetic friction). Because she moves along the slope, the most convenient reference frame for analyzing her motion is one with the x-axis along and the y-axis perpendicular to the incline. In this frame, both the normal and the frictional forces lie along coordinate axes, the components of the weight are mg sin θ along the slope and mg cos $$\theta$$ at right angles into the slope , and the only acceleration is along the x-axis (ay = 0).

Solution

We can now apply Newton’s second law to the snowboarder:

 $\begin{split} \sum F_{x} & = ma_{x} \\ mg \sin \theta - \mu_{k} N & = ma_{x} \end{split}$ $\begin{split} \sum F_{y} & = ma_{y} \\ N - mg \cos \theta &= m(0) \ldotp \end{split}$

From the second equation, N = mg cos $$\theta$$. Upon substituting this into the first equation, we find

$\begin{split} a_{x} & = g(\sin \theta - \mu_{k} \cos \theta) \\ & = g(\sin 13^{o} - 0.520 \cos 13^{o}) = 0.29\; m/s^{2} \ldotp \end{split}$

Significance

Notice from this equation that if $$\theta$$ is small enough or $$\mu_{k}$$ is large enough, ax is negative, that is, the snowboarder slows down.

Exercise $$\PageIndex{4}$$

The snowboarder is now moving down a hill with incline 10.0°. What is the skier’s acceleration?

## Contributors and Attributions

• Samuel J. Ling (Truman State University), Jeff Sanny (Loyola Marymount University), and Bill Moebs with many contributing authors. This work is licensed by OpenStax University Physics under a Creative Commons Attribution License (by 4.0).


text:
## Friday, October 9, 2015

### Evaluation of Optimizers for Logistic Regression in Apache Spark

Target audience: Intermediate

Overview
Simple comparison of the stochastic gradient descent with the quasi-Newton Limited memory BFGS optimizer for the binomial classification using the logistic regression in Apache Spark MLlib
Apache Spark 1.5.x MLlib library provides developers and data scientists alike, two well known optimizers for the binomial classification using the logistic regression.
• Limited memory version of the Broyden-Fletcher-Goldfarb-Shanno (L-BFGS)
I thought it would be instructive to compare the two optimization methods on the accuracy of the logistic regression as a binomial classification.
Note:
MLlib in Apache Spark 1.5.1 does not support multinomial classification. It may be added in the future versions.

Logistic regression
The logistic regression is one of the most commonly used discriminative supervised learning model mainly because it is intuitive and simple. It relies on the logistic function (refer to An Introduction to Logistic and Probit Regression Models
In the case of the classification problem, the probability that on observation x belong to a class C is computed as $p(C|x)=\frac{1}{1+e^{-w_{0}-w^{T}x}}$ where w are the weights or model coefficients.
Apache Spark MLlib has two implementations of the logistic regression as a binary classifier

• org.apache.spark.mllib.classification.LogisticRegressionWithLBFGS using the L-BFGS optimizer
• org.apache.spark.mllib.classification.LogisticRegressionWithSGD using the SGD optimizer
Background information on the stochastic gradient descent can be found at Comparing Stochastic Gradient Descent And Batch Gradient Descent
For those interested in inner workings of the limited memory Broyden-Fletcher-Goldfarb-Shanno algorithm, Limited Memory BFGS

Data generation
The scaladocs for Apache Spark API are available at Apache Spark API
Let's create a synthetic training set to evaluate and compare the two implementation of the logistic regression. The training set for the binomial classification consist of

• Two data sets of observations with 3 features, each following a data distribution with same standard deviation and two different means.
• Two labels (or expected values) {0, 1}, one for each Gaussian distribution
The following diagram illustrates the training set for a single feature.

The margin of separation between the two groups of observations of 3 dimension is computed as mean(first group) - mean (second group). As the margin increases the accuracy of the binomial classification is expected to increase.

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 final val SIGMA = 2.0 class DataGenerator(numTasks: Int)(implicit sc: SparkContext) { private def f(mean: Double): Double = mean + SIGMA*(Random.nextDouble - 0.5) def apply(half: Int, mu: Double): Array[LabeledPoint] = { val trainObs = ArrayBuffer.fill(half)(Array[Double](f(1.0),f(1.0),f(1.0))) ++ ArrayBuffer.fill(half)(Array[Double](f(mu),f(mu),f(mu))) val labels = ArrayBuffer.fill(half)(0.0) ++ ArrayBuffer.fill(half)(1.0) labels.zip(trainObs).map{ case (y, ar) => LabeledPoint(y, new DenseVector(ar)) }.toArray } }

The method apply generates the two groups of half observations following normal distribution of mean 1.0 and 1.0 + mu. (line 9 and 11).
Next we create two sets of labels 0 and 1 (line 13) that are used to generated the Apache Spark labeled points (line 15).
Apache Spark LogisticRegression classes process LabeledPoint instances which are generated in this particular case from DenseVector wrappers of the observations.

Use case
The first step consists of initializing the Apache spark environment, using SparkConf and SparkContext classes (line 2 & 4).

 1 2 3 4 5 6 7 8 val numTasks: Int = 64 val conf = new SparkConf().setAppName("LogisticRegr") .setMaster(s"local[$numTasks]") val sc = new SparkContext(conf) sc.setLogLevel("ERROR") // Execution of Spark driver code here... sc.stop  The next step is to generate the training and validation set. The validation set is used at a later stage for comparing the accuracy of the respective model (line 5).  1 2 3 4 5 val halfTrainSet = 32000 val dataGenerator = new DataGenerator(numTasks)(sc) val trainSet = dataGenerator(halfTrainSet, mean) val validationSet = dataGenerator(halfTrainSet, mean)  It is now time to instantiate the two logistic regression classifiers and generate two distinct models. You need to make sure that the parameters (tolerance, number of iterations) are identical for both models. This implementation uses the Logistic regression from MLlib that uses a pre-canned stochastic gradient descent (line 1). A customized gradient descent can be defined by using the standalone SGD class from MLlib. For this example, the optimization parameters (line 2 & 3) are purely arbitrary. MLlib uses RDD as input for training and validation set (line 4) while the logistic regression in ML uses instances of DataFrame.  1 2 3 4 5 6 val logRegrSGD = new LogisticRegressionWithSGD logRegrSGD.optimizer.setNumIterations(1000) logRegrSGD.optimizer.setConvergenceTol(0.02) val inputRDD = sc.makeRDD(trainingSet, numTasks) logisticRegression.setIntercept(true) val model = logisticRegression.run(inputRDD)  Validation Now it is time to use the validation set to compute the mean sum of square error and the accuracy of each predictor for different values of margin. We need to define and implement a validation framework or class, simple but relevant enough for our evaluation. The first step is to specify the quality metrics as follows • metrics produced by the Spark logistic regression • mSSE Mean sum of square errors • accuracy accuracy of the classification The quality metrics are defined in the Quality class as described in the following code snippet.  1 2 3 4 5 6 7 8 9 case class Quality( metrics: Array[(Double, Double)], msse: Double, accuracy: Double) { override def toString: String = s"Metrics:${metrics.mkString(",")}\n |msse = ${Math.sqrt(msse)} accuracy =$accuracy" }

Let's implement our validation class, BinomialValidation for the binomial classification. The validation is created using the spark context sc, the logistic regression model generated through training and the number of partitions or tasks used in the data nodes.

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 final class BinomialValidation( sc: SparkContext, model: LogisticRegressionModel, numTasks: Int) { def metrics(validationSet: Array[LabeledPoint]): Quality = { val featuresLabels = validationSet.map( lbPt => (lbPt.label, lbPt.features)).unzip val predicted_rdd = model.predict( sc.makeRDD(featuresLabels._2, numTasks) ) val scoreAndLabels = sc.makeRDD(featuresLabels._1, numTasks).zip(predicted_rdd) val successes = scoreAndLabels.map{ case(e,p) => Math.abs(e-p) }.filter( _ < 0.1) val msse = scoreAndLabels.map{ case (e,p) => (e-p)*(e-p)}.sum val metrics = new BinaryClassificationMetrics(scoreAndLabels) Quality(metrics.fMeasureByThreshold().collect, msse, successes.count.toDouble/validationSet.length) } }

The method metrics (line 6) converts the validation set, validationSet into a RDD (line 7, 8) after segregating the expected values from the observations (unzip). The results of the prediction, prediction_rdd (line 9) is then zipped with the labeled values into the evaluation set, scoreAndLabels (line 13-14) from which the different quality metrics such as successes (line 16) and muse (line 18) are extracted.
The computation of metrics is actually performed by the BinaryClassificationMetrics MLlib class. Finally, the validation is applied on the logistic model with a convergence tolerance 0.1

 1 2 3 model.setThreshold(0.1) val validator = new BinomialValidation(sc, model, numTasks) val quality = validator.metrics(validationSet)

Results
The fact that the L-BFGS optimizer provides a significant more accurate result (or lower mean sum of square errors) that the stochastic gradient descent is not a surprise. However, the lack of convergence of the SGD version merit further investigation.
Note: This post is a brief comparison of the two optimizer in terms of accuracy on a simple synthetic data set. It is important to keep in mind that the stochastic gradient descent has better performance overall than L-BFGS or any quasi-Newton method for that matter, because it does not require the estimation of the hessian metric (second order derivative).

References


text:
# Math Help - Integrability

1. ## Integrability

Suppose $f$ is continuous and $F(x)=\int_a^x f(t)dt$ bounded on $[a,b)$. Given $g>0, g'\geq 0$ and $g'$ locally integrable on $[a,b)$ and $lim_{ x\rightarrow b^-} g(x) =$ infinity. prove
for p>1
$\displaystyle{lim_{ x\rightarrow b^-} \frac{1}{[g(x)]^p} \int^x_a f(t)g(t)dt = 0}$

I think I should use integration by parts... but I am not sure. Any help would be greatly appreciated.

2. In addition to this, I want to show that if $\int_a^b f(t)dt$ converges, then we have

$lim_{x\rightarrow b^-} \frac{1}{g(x)} \int^x_a f(t)g(t)dt = 0$

3. Originally Posted by AidenMatthew
Suppose $f$ is continuous and $F(x)=\int_a^x f(t)dt$ bounded on $[a,b)$. Given $g>0, g'\geq 0$ and $g'$ locally integrable on $[a,b)$ and $lim_{ x\rightarrow b^-} g(x) =$ infinity. prove
for p>1
$\displaystyle{lim_{ x\rightarrow b^-} \frac{1}{[g(x)]^p} \int^x_a f(t)g(t)dt = 0}$

I think I should use integration by parts... but I am not sure. Any help would be greatly appreciated.

If you know $lim_{ x\rightarrow b^-} g(x) =\infty$, don't you also know $lim_{ x\rightarrow b^-} \frac{1}{[g(x)]} = 0$ and therefore $lim_{ x\rightarrow b^-} \frac{1}{[g(x)]^p}=0$... I might be jumping the gun here

4. Originally Posted by AidenMatthew
Suppose $f$ is continuous and $F(x)=\int_a^x f(t)dt$ bounded on $[a,b)$. Given $g>0, g'\geq 0$ and $g'$ locally integrable on $[a,b)$ and $lim_{ x\rightarrow b^-} g(x) =$ infinity. prove
for p>1
$\displaystyle{lim_{ x\rightarrow b^-} \frac{1}{[g(x)]^p} \int^x_a f(t)g(t)dt = 0}$

I think I should use integration by parts.
I agree, integration by parts is definitely the right way to go about this. In fact, $\int_a^x\!\!\!f(t)g(t)\,dt = \Bigl[F(t)g(t)\Bigr]_a^x - \int_a^xF(t)g'(t)\,dt$. When you divide by $\bigl(g(x)\bigr)^p$, the term in square brackets will go to 0 as $x\nearrow b$. So you just need to estimate the size of the integral on the right.

You know that F(t) is bounded, say $|F(t)|\leqslant M$ for some constant M. Then $\Bigl|\int_a^xF(t)g'(t)\,dt\Bigr| \leqslant \int_a^xMg'(t)\,dt = M\bigl(g(x)-g(a)\bigr)$. Again, when you divide by $\bigl(g(x)\bigr)^p$, that expression will go to 0 as $x\nearrow b$.

5. Originally Posted by AidenMatthew
In addition to this, I want to show that if $\int_a^b f(t)dt$ converges, then we have

$lim_{x\rightarrow b^-} \frac{1}{g(x)} \int^x_a f(t)g(t)dt = 0$

I agree with the above argument, do you see it AidenMattew? In my assumptions, I was not looking at the integral for boundedness.

How would you go about proving this second part now though (above), Opalg? Use instead that $F(x) = \int_x^b f(t)dt$ and do parts integration again?

6. Thats what I was thinking, and then use the fact that $\int^b_b f(t)dt = 0$... I'm still a little uneasy about how to set it up with this difference though... but I think the arguments are similar... doesnt convergence imply boundedness so the same argument goes?

7. using the same integration by parts, at the very end of moving things around with what you said above you have

$lim_{x\rightarrow b^-}\frac{1}{g(x)} \int^x_a F(t)g'(t)dt$

right? you know what $lim_{x\rightarrow b^-}\frac{1}{g(x)}$ is and you know $\int^x_a F(t)g'(t)dt$ is bounded, so you're done unless i'm missing something

8. Originally Posted by AidenMatthew
In addition to this, I want to show that if $\int_a^b f(t)dt$ converges, then we have

$lim_{x\rightarrow b^-} \frac{1}{g(x)} \int^x_a f(t)g(t)dt = 0$
This is a bit more subtle than the case where p>1. But you have the additional information that $F(b) = \int_a^b\!\!\! f(t)dt$ exists as the limit $\textstyle\lim_{x\nearrow b}F(x)$. So F is continuous on the left at b, and given $\varepsilon>0$ there exists a point $x_0 such that $|F(x)-F(t)|<\varepsilon$ whenever x and t lie in the interval $[x_0,b)$.

To estimate $\int^x_a\!\!\! f(t)g(t)\,dt$, split it up as $\int^{x_0}_a\!\!\! f(t)g(t)\,dt + \int_{x_0}^x\!\!\! f(t)g(t)\,dt$. The first of those two integrals is independent of x, so when we divide by g(x) and let $x\nearrow b$, it will go to 0. Thus we need only look at the second of the two integrals, $\int_{x_0}^x\!\!\! f(t)g(t)\,dt$.

Integrating by parts as previously, we get $\int_{x_0}^x\!\!\! f(t)g(t)\,dt = F(x)g(x) - F(x_0)g(x_0) - \int_{x_0}^x\!\!\! F(t)g'(t)\,dt$. Use the fact that $g(x) = g(x_0) + \int_{x_0}^x\!\!\! g'(t)\,dt$ to write this as $\int_{x_0}^x \!\!\! f(t)g(t)\,dt = F(x)g(x_0) - F(x_0)g(x_0) + \int_{x_0}^x \bigl(F(x)-F(t)\bigr)g'(t)\,dt$. The first two terms on the right side of that equation are bounded, so when we divide by g(x) and let $x\nearrow b$ they will go to 0. Thus we need only estimate the size of the integral term.

For that, using the inequality $|F(x)-F(t)|<\varepsilon$, we get $\Bigl|\int_{x_0}^x \bigl(F(x)-F(t)\bigr)g'(t)\,dt\Bigr|\leqslant \varepsilon|g(x)-g(x_0)|$. When we divide by g(x), that gives a result that is essentially less than $\varepsilon$.

Putting everything together, that should show that $\lim_{x\nearrow b}\frac{1}{g(x)} \int^x_a f(t)g(t)\,dt = 0$.

Originally Posted by casanova
using the same integration by parts, at the very end of moving things around with what you said above you have

$lim_{x\rightarrow b^-}\frac{1}{g(x)} \int^x_a F(t)g'(t)dt$

right? you know what $lim_{x\rightarrow b^-}\frac{1}{g(x)}$ is and you know $\int^x_a F(t)g'(t)dt$ is bounded, so you're done unless i'm missing something
I don't think it's as simple as that, because you don't know that $\int^x_a\!\!\! F(t)g'(t)dt$ is bounded. In fact, $g'(x)\to \infty$ as $x\nearrow b$, so that integral might well be unbounded.

9. Originally Posted by Opalg
Integrating by parts as previously, we get $\int_{x_0}^x\!\!\! f(t)g(t)\,dt = F(x)g(x) - F(x_0)g(x_0) - \int_{x_0}^x\!\!\! F(t)g'(t)\,dt$. Use the fact that $g(x) = g(x_0) + \int_{x_0}^x\!\!\! g'(t)\,dt$ to write this as $\int_{x_0}^x \!\!\! f(t)g(t)\,dt = F(x)g(x_0) - F(x_0)g(x_0) + \int_{x_0}^x \bigl(F(x)-F(t)\bigr)g'(t)\,dt$. The first two terms on the right side of that equation are bounded, so when we divide by g(x) and let $x\nearrow b$ they will go to 0. Thus we need only estimate the size of the integral term.
Why can we bring F(x) into the integral equation? It's not a constant? And I know continuity implies integrability--is this an iff statement? I didnt know I could say for sure F was continuous...

Thanks so much! You really made the rest clear for me

10. Originally Posted by AidenMatthew
Why can we bring F(x) into the integral equation? It's not a constant?
It's a constant as far as t is concerned, and the integral is with respect to t. After all, x is the upper limit of integration in the integral $\int_{x_0}\kern-5pt\mathop{\phantom{\big|}}^{\color{red}x}\!\!\!\l dots dt
$
, so x has to be regarded as a constant for the purposes of that integral.

Originally Posted by AidenMatthew
And I know continuity implies integrability--is this an iff statement? I didnt know I could say for sure F was continuous...
The reason that F is continuous at b comes from the definition of an improper integral. To say that the integral $F(b) = \int_a^b\!\!\!f(t)\,dt$ converges means that $F(b) = \textstyle\lim_{x\nearrow b}F(x)$, which is the same as saying that F is continuous at b.


text:
A man drops a ball downside from the roof of a tower of height 400 meters. At the same time another ball is thrown upside with a velocity 50 meter/sec. from the surface of the tower, then they will meet at which height from the surface of the tower

(1) 100 meters

(2) 320 meters

(3) 80 meters

(4) 240 meters

Concept Questions :-

Relative motion in 1-D
High Yielding Test Series + Question Bank - NEET 2020

Difficulty Level:

Two balls are dropped from heights h and 2h respectively from the earth surface. The ratio of time of these balls to reach the earth is

(1) $1:\sqrt{2}$

(2) $\sqrt{2}$ : 1

(3) 2 : 1

(4) 1 : 4

Concept Questions :-

Uniformly accelerated motion
High Yielding Test Series + Question Bank - NEET 2020

Difficulty Level:

The acceleration due to gravity on the planet A is 9 times the acceleration due to gravity on planet B. A man jumps to a height of 2m on the surface of A. What is the height of jump by the same person on the planet B

(1) 18m

(2) 6m

(3) $\frac{2}{3}m$

(4) $\frac{2}{9}m$

Concept Questions :-

Uniformly accelerated motion
High Yielding Test Series + Question Bank - NEET 2020

Difficulty Level:

A body falls from rest in the gravitational field of the earth. The distance travelled in the fifth second of its motion is $\left(g=10m/{s}^{2}\right)$

(1) 25m

(2) 45m

(3) 90m

(4) 125m

Concept Questions :-

Uniformly accelerated motion
High Yielding Test Series + Question Bank - NEET 2020

Difficulty Level:

If a body is thrown up with the velocity of 15 m/s then maximum height attained by the body is (g = 10 m/s2

(1) 11.25 m

(2) 16.2 m

(3) 24.5 m

(4) 7.62 m

Concept Questions :-

Uniformly accelerated motion
High Yielding Test Series + Question Bank - NEET 2020

Difficulty Level:

A balloon is rising vertically up with a velocity of 29 ms–1. A stone is dropped from it and it reaches the ground in 10 seconds. The height of the balloon when the stone was dropped from it is (g = 9.8 ms–2)

(1) 100 m

(2) 200 m

(3) 400 m

(4) 150 m

Concept Questions :-

Uniformly accelerated motion
High Yielding Test Series + Question Bank - NEET 2020

Difficulty Level:

A ball is released from the top of a tower of height h meters. It takes T seconds to reach the ground. What is the position of the ball in T/3 seconds

(1) h/9 meters from the ground

(2) 7h/9 meters from the ground

(3) 8h/9 meters from the ground

(4) 17h/18 meters from the ground

Concept Questions :-

Instantaneous speed and instantaneous velocity
High Yielding Test Series + Question Bank - NEET 2020

Difficulty Level:

Two balls of same size but the density of one is greater than that of the other are dropped from the same height, then which ball will reach the earth first (air resistance is negligible)

(1) Heavy ball

(2) Light ball

(3) Both simultaneously

(4) Will depend upon the density of the balls

Concept Questions :-

Uniformly accelerated motion
High Yielding Test Series + Question Bank - NEET 2020

Difficulty Level:

A packet is dropped from a balloon which is going upwards with the velocity 12 m/s, the velocity of the packet after 2 seconds will be

(1) –12 m/s

(2) 12 m/s

(3) –7.6 m/s

(4) 7.6 m/s

Concept Questions :-

Uniformly accelerated motion
High Yielding Test Series + Question Bank - NEET 2020

Difficulty Level:

If a freely falling body travels in the last second a distance equal to the distance travelled by it in the first three second, the time of the travel is

(1) 6 sec

(2) 5 sec

(3) 4 sec

(4) 3 sec

Concept Questions :-

Uniformly accelerated motion


text:
# Symbols:\mathcal

## Font Description

Mathcal is a calligraphic font built into $\LaTeX$.

Its uppercase alphabet is displayed here:

$\mathcal A$ $\mathcal B$ $\mathcal C$ $\mathcal D$ $\mathcal E$ $\mathcal F$ $\mathcal G$ $\mathcal H$ $\mathcal I$ $\mathcal J$ $\mathcal K$ $\mathcal L$ $\mathcal M$ $\mathcal N$ $\mathcal O$ $\mathcal P$ $\mathcal Q$ $\mathcal R$ $\mathcal S$ $\mathcal T$ $\mathcal U$ $\mathcal V$ $\mathcal W$ $\mathcal X$ $\mathcal Y$ $\mathcal Z$

The individual letters of this font and their various uses on $\mathsf{Pr} \infty \mathsf{fWiki}$ are listed on this page as well as on the pages for the letters themselves.

The $\LaTeX$ code for $\mathcal A$ for example is:

\mathcal A

## $\mathcal B$

This is used to denote a basis in topology.

An example of an introduction of this would be:

"Let $\left({X, \tau}\right)$ be a topological space."
"Let $\mathcal B$ be a basis for $\tau$."

## $\mathcal C$

This is used to denote a cover.

An example of an introduction of this would be:

"Let $S$ be a set."
"Let $\mathcal C$ be a cover for $S$."

## $\mathcal O$

This is used for Big-O Notation.

## $\mathcal P$

This is used to denote power set.

To introduce the power set of a set $S$ we would state:

"Let $S$ be a set, and let $\mathcal P \left({S}\right)$ be its power set."

## $\mathcal R$

This is used for binary relations.

For example to introduce a binary relation on $S \times T$ we would state:

"Let $\mathcal R \subseteq S \times T$ be a relation."


text:
# Dithering: how it works and why it matters

When most programmers and designers think about dithering, they think of images and animations from an ancient era or an annoying animated GIF. Surprisingly though dithering is still alive and well in many, many places. Some of those places would give web designers nightmares.

## Brief Reminder: Colours in the Browser (Roses are #F00...)

In the browser, as defined by the W3 spec for CSS3 colours, you'll usually see colours represented in a few different ways:

• #rgb - three-digit RGB notation
• #rrggbb - six-digit RGB notation
• rgb(rrr, ggg, bbb) - integer valued (0-255) RGB notation
• rgb(r%, g%, b%) - percentage valued RGB notation
• rgba(rrr, ggg, bbb, aaa) - integer valued (0-255) RGB notation with an alpha channel
• rgba(r%, g%, b%, a%) - percentage valued RGB notation with an alpha channel

Tangent: the three-digit RGB notation is expanded to the six-bit by repeating the hex digit (#rgb becomes #rrggbb instead of #r0g0b0). This, amongst other things, ensures that black (#000) and white (#FFF) expand to absolute black and white (#000000 and #FFFFFF respectively).

All the above are just ways of telling the browser how much red, green and blue go into making a given colour. For a standard browser, this is conveyed using 24 bits (8 bits per each of the three colour channels). This means you can view a total of over 16 million colours with the standard 24 bit colour display. Sounds pretty reasonable, right?

## Limited Colours & Dithering

Imagine you've been thrown back in time, to the days when computers were slow and bits were expensive. How can you improve the perceived image quality if you're limited to only displaying a palette of N different colours on the screen at once? You cheat. Dithering takes advantage of the human eye's tendency to "mix" two colors in close proximity to one another.

### Spatial Dithering

If you intermix two different colours evenly and discretely enough, the human eye sees an average of the two colours. In this case, when red and blue are mixed in a checkerboard pattern, the result appears a convincing purple. This is the traditonal case of dithering and is most commonly seen in old school games and animated GIFs due to their lack of a full colour palette.

### Temporal Dithering

You can also alternate quickly between two colours to end up with what appears to be the average of the two. This is referred to as temporal dithering. You'll most commonly find temporal dithering in hardware, specifically to improve the appearance of an image on a sub-par television or monitor display.

I've made an example of dithering using frame rate control but I preface it with the warning that it may be unsafe for those with epilepsy. If you're still happy that it won't impact you medically and you don't mind your CPU bursting into flames, click here. Why not use an animated GIF, you might ask? It turns out that browsers don't like rapidly changing GIFs all that much. The requestAnimationFrame is the best way to deal with rapidly changing elements in a browser. Better yet would be to actually implement it in something natively, but you wouldn't download arbitrary code off a website and run it, right..? ;)

## But everyone has good monitors now, right? No need for dithering!

### Minor issue: colour banding in gradients

If you were creating a soft linear gradient on a website, you might hit an issue. Imagine a soft shifting gradient from dark grey (#333) to lighter grey (#666) on a website.


text:
# nLab differential topology

Contents

### Context

#### Differential geometry

synthetic differential geometry

Introductions

from point-set topology to differentiable manifolds

Differentials

V-manifolds

smooth space

Tangency

The magic algebraic facts

Theorems

Axiomatics

cohesion

• (shape modality $\dashv$ flat modality $\dashv$ sharp modality)

$(\esh \dashv \flat \dashv \sharp )$

• dR-shape modality$\dashv$ dR-flat modality

$\esh_{dR} \dashv \flat_{dR}$

tangent cohesion

differential cohesion

singular cohesion

$\array{ && id &\dashv& id \\ && \vee && \vee \\ &\stackrel{fermionic}{}& \rightrightarrows &\dashv& \rightsquigarrow & \stackrel{bosonic}{} \\ && \bot && \bot \\ &\stackrel{bosonic}{} & \rightsquigarrow &\dashv& \mathrm{R}\!\!\mathrm{h} & \stackrel{rheonomic}{} \\ && \vee && \vee \\ &\stackrel{reduced}{} & \Re &\dashv& \Im & \stackrel{infinitesimal}{} \\ && \bot && \bot \\ &\stackrel{infinitesimal}{}& \Im &\dashv& \& & \stackrel{\text{étale}}{} \\ && \vee && \vee \\ &\stackrel{cohesive}{}& \esh &\dashv& \flat & \stackrel{discrete}{} \\ && \bot && \bot \\ &\stackrel{discrete}{}& \flat &\dashv& \sharp & \stackrel{continuous}{} \\ && \vee && \vee \\ && \emptyset &\dashv& \ast }$

Models

Lie theory, ∞-Lie theory

differential equations, variational calculus

Chern-Weil theory, ∞-Chern-Weil theory

Cartan geometry (super, higher)

# Contents

## Idea

Differential topology is the subject devoted to the study of topological properties of differentiable manifolds, smooth manifolds and related differential geometric spaces such as stratifolds, orbifolds and more generally differentiable stacks.

Differential topology is also concerned with the problem of finding out which topological (or PL) manifolds allow a differentiable structure and the degree of nonuniqueness of that structure if they do (e.g. exotic smooth structures). It is also concerned with concrete constructions of (co)homology classes (e.g. characteristic classes) for differentiable manifolds and of differential refinements of cohomology theories.

## Examples

Many considerations, and classification problems, depend crucially on dimension, and the case of high-dimensional manifolds (the notion of ‘high’ depends on the problem) is often very different from the situation in each of the low dimensions; thus there are specialists’ subjects like $3$-(dimensional) topology and $4$-topology. There are restrictions on an underlying topology which is allowed for some sorts of additional structures on a differentiable manifold.

For example, only some even-dimensional differentiable manifolds allow for symplectic structure and only some odd-dimensional one allow for a contact structure; in these cases moreover special constructions of topological invariants like Floer homology and symplectic field theory exist.

This yields the relatively young subjects of symplectic and contact topologies, with the first significant results coming from Gromov. Any (Hausdorff paracompact finite-dimensional) differentiable manifold allows for riemannian structure however; therefore there is no special subject of ‘riemannian topology’.

## References

Though some of the basic results, methods and conjectures of differential topology go back to Poincaré, Whitney, Morse and Pontrjagin, it became an independent field only in the late 1950s and early 1960s with the seminal works of Smale, Thom, Milnor and Hirsch. Soon after the initial effort on foundations, mainly in the American school, a strong activity started in Soviet Union (Albert Schwarz, A. S. Mishchenko, S. Novikov, V. A. Rokhlin, M. Gromov…).

Introductions and monographs:

Survey with connections to algebraic topology: