text:
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Deep learning has been an active field of research for some years, there are breakthroughs in image and language understanding etc. However, there has not yet been a good deep learning package in R that offers state-of-art deep learning models and the real GPU support to do fast training on these models.

In this post, we introduce MXNetR, an R package that brings fast GPU computation and state-of-art deep learning to the R community. MXNet allows you to flexibly configure state-of-art deep learning models backed by the fast CPU and GPU back-end. This post will cover the following topics:

• Train your first neural network in five minutes
• Use MXNet for Handwritten Digits Classification Competition
• Classify real world images using state-of-art deep learning models.

Train your first neural network in five minutes

Let's use a demo data to demonstrate the basic grammar and parameters of mxnet. Firstly we load in the data:

require(mlbench)

require(mxnet)

data(Sonar, package="mlbench")

Sonar[,61] = as.numeric(Sonar[,61])-1
train.ind = c(1:50, 100:150)
train.x = data.matrix(Sonar[train.ind, 1:60])
train.y = Sonar[train.ind, 61]
test.x = data.matrix(Sonar[-train.ind, 1:60])
test.y = Sonar[-train.ind, 61]

Next we are going to use a multi-layer perceptron as our classifier. In mxnet, we offer a function called mx.mlp so that users can build a general multi-layer neural network to do classification or regression.

There are several parameters we have to feed to mx.mlp:

• Training data and label.
• Number of hidden nodes in each hidden layers.
• Number of nodes in the output layer.
• Type of the activation.
• Type of the output loss.
• The device to train (GPU or CPU).
• Other parameters for mx.model.FeedForward.create.

The following code piece is showing a possible way of using mx.mlp (the output is modified to be shorter):

mx.set.seed(0)
model <- mx.mlp(train.x, train.y, hidden_node=10, out_node=2, out_activation="softmax",
num.round=20, array.batch.size=15, learning.rate=0.07, momentum=0.9,
eval.metric=mx.metric.accuracy)

## Auto detect layout of input matrix, use rowmajor..
## Start training with 1 devices
## [1] Train-accuracy=0.488888888888889
## [2] Train-accuracy=0.514285714285714
## [3] Train-accuracy=0.514285714285714

...

## [18] Train-accuracy=0.838095238095238
## [19] Train-accuracy=0.838095238095238
## [20] Train-accuracy=0.838095238095238

Note that mx.set.seed is the correct function to control the random process in mxnet. The reason is that most of MXNet random number generator can run on different devices, such as GPU. We need to use massively parallel PRNG on GPU to get fast random number generations. It can also be quite costly to seed these PRNGs. So we introduced mx.set.seed to control random numbers in MXNet. You can see the accuracy from the training process. It is also easy to make prediction and evaluate it.

preds = predict(model, test.x)

## Auto detect layout of input matrix, use rowmajor..

pred.label = max.col(t(preds))-1
table(pred.label, test.y)

##           test.y
## pred.label  0  1
##          0 24 14
##          1 36 33

Note for multi-class prediction, mxnet outputs nclass x nexamples, and each row corresponds to probability of that class.

A Regression Task with Structure Configuration

Now let's learn something new. We use the following code to load and process the data:

data(BostonHousing, package="mlbench")

train.ind = seq(1, 506, 3)
train.x = data.matrix(BostonHousing[train.ind, -14])
train.y = BostonHousing[train.ind, 14]
test.x = data.matrix(BostonHousing[-train.ind, -14])
test.y = BostonHousing[-train.ind, 14]

Although we can use mx.mlp again to do regression by changing the out_activation, this time we are going to introduce a flexible way to configure neural networks in mxnet. The configuration is done by the "Symbol" system in mxnet, which takes care of the links among nodes, the activation, dropout ratio, etc. To configure a multi-layer neural network, we can do it in the following way:

# Define the input data
data <- mx.symbol.Variable("data")
# A fully connected hidden layer
# data: input source
# num_hidden: number of neurons in this layer
fc1 <- mx.symbol.FullyConnected(data, num_hidden=1)

# Use linear regression for the output layer
lro <- mx.symbol.LinearRegressionOutput(fc1)

What matters for a regression task is mainly the last function. It enables the new network to optimize for squared loss. We can now train on this simple data set. In this configuration, we dropped the hidden layer so the input layer is directly connected to the output layer. For more information about the symbolic operation in mxnet, please check our tutorial on this topic.

Next we can make prediction with this structure and other parameters with mx.model.FeedForward.create:

mx.set.seed(0)
model <- mx.model.FeedForward.create(lro, X=train.x, y=train.y,
ctx=mx.cpu(), num.round=50, array.batch.size=20,
learning.rate=2e-6, momentum=0.9, eval.metric=mx.metric.rmse)

## Auto detect layout of input matrix, use rowmajor..
## Start training with 1 devices
## [1] Train-rmse=16.063282524034
## [2] Train-rmse=12.2792375712573
## [3] Train-rmse=11.1984634005885

...

## [48] Train-rmse=8.26890902770415
## [49] Train-rmse=8.25728089053853
## [50] Train-rmse=8.24580511500735

It is also easy to make prediction.

preds = predict(model, test.x)

## Auto detect layout of input matrix, use rowmajor..

sqrt(mean((preds-test.y)^2))

## [1] 7.800502

Here we also changed the eval.metric for regression. Currently we have four pre-defined metrics "accuracy", "rmse", "mae" and "rmsle". One might wonder how to customize the evaluation metric. mxnet provides the interface for users to define their own metric of interests:

demo.metric.mae <- mx.metric.custom("mae", function(label, pred) {
res <- mean(abs(label-pred))
return(res)
})

This is an example for mean absolute error. We can simply plug it in the training function:

mx.set.seed(0)
model <- mx.model.FeedForward.create(lro, X=train.x, y=train.y,
ctx=mx.cpu(), num.round=50, array.batch.size=20,
learning.rate=2e-6, momentum=0.9, eval.metric=demo.metric.mae)

## Auto detect layout of input matrix, use rowmajor..
## Start training with 1 devices
## [1] Train-mae=13.1889538083225
## [2] Train-mae=9.81431959337658
## [3] Train-mae=9.21576419870059

...

## [48] Train-mae=6.41731406417158
## [49] Train-mae=6.41011292926139
## [50] Train-mae=6.40312503493494

Congratulations! Now you have learnt the basic for using mxnet. We can go further to tackle some real world problems!

Handwritten Digits Classification Competition

MNIST is a handwritten digits image data set created by Yann LeCun. Every digit is represented by a 28x28 image. It has become a standard data set to test classifiers on simple image input. Neural network is no doubt a strong model for image classification. There's a long-term hosted competition on Kaggle using this data set.

We will present the basic usage of mxnet to compete in this challenge.

First, let us download the data from here, and put them under the data/ folder in your working directory.

Then we can read them in R and convert to matrices.

require(mxnet)

train <- data.matrix(train)
test <- data.matrix(test)

train.x <- train[,-1]
train.y <- train[,1]

Here every image is represented as a single row in train/test. The greyscale of each image falls in the range [0, 255], we can linearly transform it into [0,1] by

train.x <- t(train.x/255)
test <- t(test/255)

We also transpose the input matrix to npixel x nexamples, which is the column major format accepted by mxnet (and the convention of R).

In the label part, we see the number of each digit is fairly even:

table(train.y)

## train.y
##    0    1    2    3    4    5    6    7    8    9
## 4132 4684 4177 4351 4072 3795 4137 4401 4063 4188

Network Configuration

Now we have the data. The next step is to configure the structure of our network.

data <- mx.symbol.Variable("data")
fc1 <- mx.symbol.FullyConnected(data, name="fc1", num_hidden=128)
act1 <- mx.symbol.Activation(fc1, name="relu1", act_type="relu")
fc2 <- mx.symbol.FullyConnected(act1, name="fc2", num_hidden=64)
act2 <- mx.symbol.Activation(fc2, name="relu2", act_type="relu")
fc3 <- mx.symbol.FullyConnected(act2, name="fc3", num_hidden=10)
softmax <- mx.symbol.SoftmaxOutput(fc3, name="sm")

1. In mxnet, we use its own data type symbol to configure the network. data <- mx.symbol.Variable("data") use data to represent the input data, i.e. the input layer.
2. Then we set the first hidden layer by fc1 <- mx.symbol.FullyConnected(data, name="fc1", num_hidden=128). This layer has data as the input, its name and the number of hidden neurons.
3. The activation is set by act1 <- mx.symbol.Activation(fc1, name="relu1", act_type="relu"). The activation function takes the output from the first hidden layer fc1.
4. The second hidden layer takes the result from act1 as the input, with its name as "fc2" and the number of hidden neurons as 64.
5. the second activation is almost the same as act1, except we have a different input source and name.
6. Here comes the output layer. Since there's only 10 digits, we set the number of neurons to 10.
7. Finally we set the activation to softmax to get a probabilistic prediction.

Training

We are almost ready for the training process. Before we start the computation, let's decide what device should we use.

devices <- mx.cpu()

Here we assign CPU to mxnet. After all these preparation, you can run the following command to train the neural network! Note again that mx.set.seed is the correct function to control the random process in mxnet.

mx.set.seed(0)
model <- mx.model.FeedForward.create(softmax, X=train.x, y=train.y,
ctx=devices, num.round=10, array.batch.size=100,
learning.rate=0.07, momentum=0.9,  eval.metric=mx.metric.accuracy,
initializer=mx.init.uniform(0.07),
epoch.end.callback=mx.callback.log.train.metric(100))

## Start training with 1 devices
## Batch [100] Train-accuracy=0.6563
## Batch [200] Train-accuracy=0.777999999999999
## Batch [300] Train-accuracy=0.827466666666665
## Batch [400] Train-accuracy=0.855499999999999
## [1] Train-accuracy=0.859832935560859
## Batch [100] Train-accuracy=0.9529
## Batch [200] Train-accuracy=0.953049999999999
## Batch [300] Train-accuracy=0.955866666666666
## Batch [400] Train-accuracy=0.957525000000001
## [2] Train-accuracy=0.958309523809525

...

## Batch [100] Train-accuracy=0.9937
## Batch [200] Train-accuracy=0.99235
## Batch [300] Train-accuracy=0.991966666666668
## Batch [400] Train-accuracy=0.991425000000003
## [9] Train-accuracy=0.991500000000003
## Batch [100] Train-accuracy=0.9942
## Batch [200] Train-accuracy=0.99245
## Batch [300] Train-accuracy=0.992433333333334
## Batch [400] Train-accuracy=0.992275000000002
## [10] Train-accuracy=0.992380952380955

Prediction and Submission

To make prediction, we can simply write

preds <- predict(model, test)
dim(preds)

## [1]    10 28000

It is a matrix with 28000 rows and 10 cols, containing the desired classification probabilities from the output layer. To extract the maximum label for each row, we can use the max.col in R:

pred.label <- max.col(t(preds)) - 1
table(pred.label)

## pred.label
##    0    1    2    3    4    5    6    7    8    9
## 2818 3195 2744 2767 2683 2596 2798 2790 2784 2825

With a little extra effort in writting to a csv file, we can have our submission to the competition!

submission <- data.frame(ImageId=1:ncol(test), Label=pred.label)
write.csv(submission, file='submission.csv', row.names=FALSE, quote=FALSE)

LeNet

Next we are going to introduce a new network structure: LeNet. It is proposed by Yann LeCun to recognize handwritten digits. Now we are going to demonstrate how to construct and train an LeNet in mxnet.

First we construct the network:

# input
data <- mx.symbol.Variable('data')
# first conv
conv1 <- mx.symbol.Convolution(data=data, kernel=c(5,5), num_filter=20)
tanh1 <- mx.symbol.Activation(data=conv1, act_type="tanh")
pool1 <- mx.symbol.Pooling(data=tanh1, pool_type="max",
kernel=c(2,2), stride=c(2,2))
# second conv
conv2 <- mx.symbol.Convolution(data=pool1, kernel=c(5,5), num_filter=50)
tanh2 <- mx.symbol.Activation(data=conv2, act_type="tanh")
pool2 <- mx.symbol.Pooling(data=tanh2, pool_type="max",
kernel=c(2,2), stride=c(2,2))
# first fullc
flatten <- mx.symbol.Flatten(data=pool2)
fc1 <- mx.symbol.FullyConnected(data=flatten, num_hidden=500)
tanh3 <- mx.symbol.Activation(data=fc1, act_type="tanh")
# second fullc
fc2 <- mx.symbol.FullyConnected(data=tanh3, num_hidden=10)
# loss
lenet <- mx.symbol.SoftmaxOutput(data=fc2)

Then let us reshape the matrices into arrays:

train.array <- train.x
dim(train.array) <- c(28, 28, 1, ncol(train.x))
test.array <- test
dim(test.array) <- c(28, 28, 1, ncol(test))

Next we are going to compare the training speed on different devices, so the definition of the devices goes first:

n.gpu <- 1
device.cpu <- mx.cpu()
device.gpu <- lapply(0:(n.gpu-1), function(i) {
mx.gpu(i)
})

As you can see, we can pass a list of devices, to ask mxnet to train on multiple GPUs (you can do similar thing for cpu, but since internal computation of cpu is already multi-threaded, there is less gain than using GPUs).

We start by training on CPU first. Because it takes a bit time to do so, we will only run it for one iteration.

mx.set.seed(0)
tic <- proc.time()
model <- mx.model.FeedForward.create(lenet, X=train.array, y=train.y,
ctx=device.cpu, num.round=1, array.batch.size=100,
learning.rate=0.05, momentum=0.9, wd=0.00001,
eval.metric=mx.metric.accuracy,
epoch.end.callback=mx.callback.log.train.metric(100))

## Start training with 1 devices
## Batch [100] Train-accuracy=0.1066
## Batch [200] Train-accuracy=0.16495
## Batch [300] Train-accuracy=0.401766666666667
## Batch [400] Train-accuracy=0.537675
## [1] Train-accuracy=0.557136038186157

print(proc.time() - tic)

##    user  system elapsed
## 130.030 204.976  83.821

Training on GPU:

mx.set.seed(0)
tic <- proc.time()
model <- mx.model.FeedForward.create(lenet, X=train.array, y=train.y,
ctx=device.gpu, num.round=5, array.batch.size=100,
learning.rate=0.05, momentum=0.9, wd=0.00001,
eval.metric=mx.metric.accuracy,
epoch.end.callback=mx.callback.log.train.metric(100))

## Start training with 1 devices
## Batch [100] Train-accuracy=0.1066
## Batch [200] Train-accuracy=0.1596
## Batch [300] Train-accuracy=0.3983
## Batch [400] Train-accuracy=0.533975
## [1] Train-accuracy=0.553532219570405
## Batch [100] Train-accuracy=0.958
## Batch [200] Train-accuracy=0.96155
## Batch [300] Train-accuracy=0.966100000000001
## Batch [400] Train-accuracy=0.968550000000003
## [2] Train-accuracy=0.969071428571432
## Batch [100] Train-accuracy=0.977
## Batch [200] Train-accuracy=0.97715
## Batch [300] Train-accuracy=0.979566666666668
## Batch [400] Train-accuracy=0.980900000000003
## [3] Train-accuracy=0.981309523809527
## Batch [100] Train-accuracy=0.9853
## Batch [200] Train-accuracy=0.985899999999999
## Batch [300] Train-accuracy=0.986966666666668
## Batch [400] Train-accuracy=0.988150000000002
## [4] Train-accuracy=0.988452380952384
## Batch [100] Train-accuracy=0.990199999999999
## Batch [200] Train-accuracy=0.98995
## Batch [300] Train-accuracy=0.990600000000001
## Batch [400] Train-accuracy=0.991325000000002
## [5] Train-accuracy=0.991523809523812

print(proc.time() - tic)

##    user  system elapsed
##   9.288   1.680   6.889

As you can see by using GPU, we can get a much faster speedup in training! Finally we can submit the result to Kaggle again to see the improvement of our ranking!

preds <- predict(model, test.array)
pred.label <- max.col(t(preds)) - 1
submission <- data.frame(ImageId=1:ncol(test), Label=pred.label)
write.csv(submission, file='submission.csv', row.names=FALSE, quote=FALSE)

Classify Real-World Images with Pre-trained Model

After the MNIST examples, are you ready to take one step further? One of the cool thing that a deep learning algorithm can do is to classify real world images.

In this example we will show how to use a pre-trained Inception-BatchNorm Network to predict the class of real world image. The network architecture is decribed in [1].

The pre-trained Inception-BatchNorm network can be downloaded from this link This model gives the recent state-of-art prediction accuracy on image net dataset.

To get started, we load the mxnet package by

require(mxnet)

In this example, we also need the package imager to load and preprocess the images in R.

require(imager)

Make sure you unzip the pre-trained model in current folder. And we can use the model loading function to load the model into R.

model = mx.model.load("Inception/Inception_BN", iteration=39)

We also need to load in the mean image, which is used for preprocessing using mx.nd.load.

mean.img = as.array(mx.nd.load("Inception/mean_224.nd")[["mean_img"]])

Now we are ready to classify a real image. In this example, we simply take the parrots image from imager. But you can always change it to other images. Firstly we will test it on a photo of Mt. Baker in north WA.

im <- load.image("Pics/MtBaker.jpg")
plot(im)

Before feeding the image to the deep net, we need to do some preprocessing to make the image fit in the input requirement of deepnet. The preprocessing includes cropping, and substraction of the mean. Because mxnet is deeply integerated with R, we can do all the processing in R function.

The preprocessing function:

preproc.image <-function(im, mean.image) {
# crop the image
shape <- dim(im)
short.edge <- min(shape[1:2])
yy <- floor((shape[1] - short.edge) / 2) + 1
yend <- yy + short.edge - 1
xx <- floor((shape[2] - short.edge) / 2) + 1
xend <- xx + short.edge - 1
croped <- im[yy:yend, xx:xend,,]
# resize to 224 x 224, needed by input of the model.
resized <- resize(croped, 224, 224)
# convert to array (x, y, channel)
arr <- as.array(resized)
dim(arr) = c(224, 224, 3)
# substract the mean
normed <- arr - mean.img
# Reshape to format needed by mxnet (width, height, channel, num)
dim(normed) <- c(224, 224, 3, 1)
return(normed)
}

We use the defined preprocessing function to get the normalized image.

normed <- preproc.image(im, mean.img)

Classify the Image

Now we are ready to classify the image! We can use the predict function to get the probability over classes.

prob <- predict(model, X=normed)
dim(prob)

## [1] 1000    1

As you can see prob is a 1000 times 1 array, which gives the probability over the 1000 image classes of the input.

We can extract the top-5 class index.

max.idx <- order(prob[,1], decreasing = TRUE)[1:5]
max.idx

## [1] 981 971 980 673 975

These indices do not make too much sense. So let us see what it really represents. We can read the names of the classes from the following file.

synsets <- readLines("Inception/synset.txt")

And let us print the corresponding lines:

print(paste0("Predicted Top-classes: ", synsets[max.idx]))

## [1] "Predicted Top-classes: n09472597 volcano"
## [2] "Predicted Top-classes: n09193705 alp"
## [3] "Predicted Top-classes: n09468604 valley, vale"
## [4] "Predicted Top-classes: n03792972 mountain tent"
## [5] "Predicted Top-classes: n09288635 geyser"

Mt. Baker is indeed a vocalno. We can also see the second most possible guess "alp" is also correct.

Let's see if it still does a good job on some other images. The following photo is taken in Vancouver downtown.

im <- load.image("Pics/Vancouver.jpg")
plot(im)

normed <- preproc.image(im, mean.img)
prob <- predict(model, X=normed)
max.idx <- order(prob[,1], decreasing = TRUE)[1:5]
print(paste0("Predicted Top-classes: ", synsets[max.idx]))

## [1] "Predicted Top-classes: n09332890 lakeside, lakeshore"
## [2] "Predicted Top-classes: n03983396 pop bottle, soda bottle"
## [3] "Predicted Top-classes: n13133613 ear, spike, capitulum"
## [4] "Predicted Top-classes: n12144580 corn"
## [5] "Predicted Top-classes: n02980441 castle"

This photo is indeed taken at lakeside. One interesting guess is the fifth guess "castle". The outline of the building in the city is recognized as the battlements on a castle. We might need more pictures containing "battlements with glass windows" to teach the model about modern city.

im <- load.image("Pics/Switzerland.jpg")
plot(im)

normed <- preproc.image(im, mean.img)
prob <- predict(model, X=normed)
max.idx <- order(prob[,1], decreasing = TRUE)[1:5]
print(paste0("Predicted Top-classes: ", synsets[max.idx]))

## [1] "Predicted Top-classes: n04371774 swing"
## [2] "Predicted Top-classes: n04275548 spider web, spider's web"
## [3] "Predicted Top-classes: n01773549 barn spider, Araneus cavaticus"
## [4] "Predicted Top-classes: n03000684 chain saw, chainsaw"
## [5] "Predicted Top-classes: n03888257 parachute, chute"

This time the main element is small and cannot stand out from the "noisy" background. This time the result is not perfect, but we can still find similarity between "swing" and "gondola".

Now, why don't you take a photo around and ask mxnet to tell you what is included? Have some fun!

Try it out and Contribute

You can find MXNet on github. Besides R, MXNet also support python and Julia, and allows interpolations of models and analysis results between different language bindings. MXNet is built by a active community of users. Please fork the project on github and contribute your wisdom to make the project even better 🙂

Acknowledgement

We would like to thank the RcppCore Team for their great helps to make MXNetR happen.

[1] Ioffe, Sergey, and Christian Szegedy. "Batch normalization: Accelerating deep network training by reducing internal covariate shift." arXiv preprint arXiv:1502.03167 (2015).


text:
# Math Help - Prove that the det of a Matrix is divisible by 19 given...

1. ## Prove that the det of a Matrix is divisible by 19 given...

So, I'm given this question that I am REALLY stuck on, I honestly have no idea where to begin, it's got me absolutely stumped and none of the information I have on hand helps me out (Unless I'm overlooking something simple). Anyway, the question is:

The five numbers 21,375 38,798 34,162 40,223 and 79,154 are all divisible by 19. Prove that the determinant of the matrix:

$\begin{pmatrix}2&1&3&7&5\\3&8&7&9&8\\3&4&1&6&2\\4& 0&2&2&3\\7&9&1&5&4\\\end{pmatrix}$

is also divisible by 19

Any help would be appreciated

2. Originally Posted by AlmightyMidget
So, I'm given this question that I am REALLY stuck on, I honestly have no idea where to begin, it's got me absolutely stumped and none of the information I have on hand helps me out (Unless I'm overlooking something simple). Anyway, the question is:

The five numbers 21,375 38,798 34,162 40,223 and 79,154 are all divisible by 19. Prove that the determinant of the matrix:

$\begin{pmatrix}2&1&3&7&5\\3&8&7&9&8\\3&4&1&6&2\\4& 0&2&2&3\\7&9&1&5&4\\\end{pmatrix}$

is also divisible by 19

Any help would be appreciated
do this column operation and you'll be done (here $C_j$ is the j-th column): $10000C_1 + 1000C_2 + 100C_3 + 10C_4+C_5 \to C_5.$

3. How did tou figure it out? Is there a general way to do it

4. Originally Posted by pankaj

How did tou figure it out? Is there a general way to do it
i think if you do what i suggested in my previous post, you'll see how i figured it out.

5. Thanks very much NonCommAlg! I did what you suggested during my break today, and I almost kicked myself, it seems so simple, thanks!

6. Originally Posted by AlmightyMidget
So, I'm given this question that I am REALLY stuck on, I honestly have no idea where to begin, it's got me absolutely stumped and none of the information I have on hand helps me out (Unless I'm overlooking something simple). Anyway, the question is:

The five numbers 21,375 38,798 34,162 40,223 and 79,154 are all divisible by 19. Prove that the determinant of the matrix:

$\begin{pmatrix}2&1&3&7&5\\3&8&7&9&8\\3&4&1&6&2\\4& 0&2&2&3\\7&9&1&5&4\\\end{pmatrix}$

is also divisible by 19

Any help would be appreciated
Wait the 5 numbers are ordered pairs: 21,375 38,798 34,162 40,223 and 79,154?

format: plain


text:
Second derivative

1. Feb 20, 2012

Rasalhague

http://www.math.northwestern.edu/courses/placement/220_Self_Placement.pdf [Broken]

Question 7 here involves a function with the rule f(x) = 3x5-5x3. I computed the 2nd derivative as f''(x) = 60x3-30x (Mathematica agrees.), giving inflection points for f at -1/sqrt(2), 0, 1/sqrt(2). But the answer given in the PDF is 4x(4x2 - 3), whence they conclude the inflection points are -sqrt(3)/2, 0, sqrt(3)/2. Is this a mistake, or have I overlooked something?

Last edited by a moderator: May 5, 2017
2. Feb 21, 2012

Norwegian

You are right, and that is btw not the only mistake in that pdf.

3. Feb 21, 2012

Rasalhague

Thanks for confirming that, Norwegian. Could you tell me any others, or do you know if there's a list of errata anywhere online?

4. Feb 21, 2012

Norwegian

1d, derivative of ln(..) seems wrong, probably more mistakes too

5. Feb 21, 2012

Rasalhague

Oh yes, wow, so it is! The derivative of ln(2t3-1) is 6t2/(2t3-1), not 6t2/(ln(2t3-1)). When I was checking my answers for those simple ones at the beginning and saw they had something slightly different for 1d, I just assumed it was a typo on my part and didn't look that closely.


text:
0

# How do you write 580 as a fraction or mixed number in simplest form?

Wiki User

2015-01-07 13:28:02

If you mean 580 then it is simply 580/1 as an improper fraction

Wiki User

2015-01-07 13:28:02
🙏
0
🤨
0
😮
0
Study guides

20 cards

## A number a power of a variable or a product of the two is a monomial while a polynomial is the of monomials

➡
See all cards
3.72
335 Reviews

Wiki User

2015-01-07 12:32:05

580 is an integer and so is not really a fraction nor a mixed number. However, if forced to write it in those forms, it becomes:fraction: 580/1

mixed: 580 and 0/1.


text:
# CAT 2019 Quant Question with Solution 53

Question:
How many factors of $2^{4} \times 3^{5} \times 10^{4}$ are perfect squares which are greater than 1 ?

${{2}^{4}}\times {{3}^{5}}\times {{10}^{4}}={{2}^{8}}\times {{3}^{5}}\times {{5}^{4}}$

For perfect squares, we have to take only even powers of the prime factors of the number.

The number of ways 2’s can be used is 5 i.e. ${{2}^{0}},\ {{2}^{2}},\ {{2}^{4}},\ {{2}^{6}},\ {{2}^{8}}\$

The number of ways 3’s can be used is 3 i.e. ${{3}^{0}},\ {{3}^{2}},\ {{3}^{4}}\$

The number of ways 5’s can be used is 3 i.e. ${{5}^{0}},\ {{5}^{2}},\ {{5}^{4}}\$

Therefore, the total number of factors which are perfect squares = $5\times 3\times 3=45$

But this also includes the number 1. Hence excluding 1, the required number is 45-1=44.

Also Check: 841+ CAT Quant Questions with Solutions

#### CAT 2019 Slot-2

 Bodhee Prep's YouTube channel CAT Prep Whatsapp Group CAT Prep Telegram Group
X


text:
Wydawnictwa / Czasopisma IMPAN / Annales Polonici Mathematici / Wszystkie zeszyty

Disc functionals and Siciak–Zaharyuta extremal functions on singular varieties

Tom 106 / 2012

Annales Polonici Mathematici 106 (2012), 171-191 MSC: Primary 32U05; Secondary 32U35. DOI: 10.4064/ap106-0-13

Streszczenie

We establish plurisubharmonicity of envelopes of certain classical disc functionals on locally irreducible complex spaces, thereby generalizing the corresponding results for complex manifolds. We also find new formulae expressing the Siciak–Zaharyuta extremal function of an open set in a locally irreducible affine algebraic variety as the envelope of certain disc functionals, similarly to what has been done for open sets in $\mathbb C^n$ by Lempert and by Lárusson and Sigurdsson.

Autorzy

• Barbara Drinovec DrnovšekFaculty of Mathematics and Physics
University of Ljubljana
Institute of Mathematics, Physics and Mechanics
e-mail
• Franc ForstneričFaculty of Mathematics and Physics
University of Ljubljana
Institute of Mathematics, Physics and Mechanics


text:
# Pentary Search Recurrence Relation

I have done an assignment question which asks me to find the average case of pentary search. The one I came up with is:

C(n) = C(n/5) + 14/5

However, I got it wrong and the professor didn't really explain why.

Can you help me?

Thanks!

Edit:

Pentary search is dividing the array into 5 parts and look for a specific key.

In perspective:

1|2|3|4|4

These are the number of comparisons made by the computer from pentary search.

Adding all possible comparisons I get 14 over 5 slots. This is why I have 14/5

• I think a minimal explanation (i.e. "what is pentary search") might help. – G. Bach Oct 14 '13 at 0:38
• Edited, sorry about that – Julio Garcia Oct 14 '13 at 0:43

• Ok, I guess you're right and I made a mistake... (The previous version of my answer erroneously claimed that the average number of comparisons has to be of the form $X/4$ instead of $X/5$.) – Yuval Filmus Oct 14 '13 at 2:39


text:
# Python virtualenv questions

### Question

I'm using VirtualEnv on Windows XP. I'm wondering if I have my brain wrapped around it correctly:

I ran virtualenv ENV and it created C:\WINDOWS\system32\ENV. I then changed my PATH variable to include C:\WINDOWS\system32\ENV\Scripts instead of C:\Python27\Scripts. Then, I checked out Django into C:\WINDOWS\system32\ENV\Lib\site-packages\django-trunk, updated my PYTHON_PATH variable to point the new Django directory, and continued to easy_install other things (which of course go into my new C:\WINDOWS\system32\ENV\Lib\site-packages directory).

I understand why I should use VirtualEnv so I can run multiple versions of Django, and other libraries on the same machine, but does this mean that to switch between environments I have to basically change my PATH and PYTHON_PATH variable? So, I go from developing one Django project which uses Django 1.2 in an environment called ENV and then change my PATH and such so that I can use an environment called ENV2 which has the dev version of Django?

Is that basically it, or is there some better way to automatically do all this (I could update my path in Python code, but that would require me to write machine-specific code in my application)?

Also, how does this process compare to using VirtualEnv on Linux (I'm quite the beginner at Linux).

1
50
4/9/2019 5:35:48 PM

### Accepted Answer

Normally virtualenv creates environments in the current directory. Unless you're intending to create virtual environments in C:\Windows\system32 for some reason, I would use a different directory for environments.

You shouldn't need to mess with paths: use the activate script (in <env>\Scripts) to ensure that the Python executable and path are environment-specific. Once you've done this, the command prompt changes to indicate the environment. You can then just invoke easy_install and whatever you install this way will be installed into this environment. Use deactivate to set everything back to how it was before activation.

Example:

c:\Temp>virtualenv myenv
New python executable in myenv\Scripts\python.exe
Installing setuptools..................done.
c:\Temp>myenv\Scripts\activate
(myenv) C:\Temp>deactivate
C:\Temp>

Notice how I didn't need to specify a path for deactivate - activate does that for you, so that when activated "Python" will run the Python in the virtualenv, not your system Python. (Try it - do an import sys; sys.prefix and it should print the root of your environment.)

You can just activate a new environment to switch between environments/projects, but you'll need to specify the whole path for activate so it knows which environment to activate. You shouldn't ever need to mess with PATH or PYTHONPATH explicitly.

If you use Windows Powershell then you can take advantage of a wrapper. On Linux, the virtualenvwrapper (the link points to a port of this to Powershell) makes life with virtualenv even easier.

Update: Not incorrect, exactly, but perhaps not quite in the spirit of virtualenv. You could take a different tack: for example, if you install Django and anything else you need for your site in your virtualenv, then you could work in your project directory (where you're developing your site) with the virtualenv activated. Because it was activated, your Python would find Django and anything else you'd easy_installed into the virtual environment: and because you're working in your project directory, your project files would be visible to Python, too.

Further update: You should be able to use pip, distribute instead of setuptools, and just plain python setup.py install with virtualenv. Just ensure you've activated an environment before installing something into it.

92
11/16/2012 11:00:37 AM

Yes basically this is what virtualenv do , and this is what the activate command is for, from the doc here:

activate script

In a newly created virtualenv there will be a bin/activate shell script, or a Scripts/activate.bat batch file on Windows.

This will change your \$PATH to point to the virtualenv bin/ directory. Unlike workingenv, this is all it does; it's a convenience. But if you use the complete path like /path/to/env/bin/python script.py you do not need to activate the environment first. You have to use source because it changes the environment in-place. After activating an environment you can use the function deactivate to undo the changes.

The activate script will also modify your shell prompt to indicate which environment is currently active.

so you should just use activate command which will do all that for you:

> \path\to\env\bin\activate.bat

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon


text:
# Repeat scaled version of slide, \savebox and \usebox in multi-slide frame?

I have a frame where I uncover a tikz-diagram in 12 slides. In the next frame, I want to repeat a scaled-down version of the full diagram (slide 12). I've tried to use a combination of \savebox, \usebox, \scalebox, but can't get the overlay specifications to work with saving and using boxes.

A trimmed-down example of what I'm trying to achieve is like this:

\documentclass{beamer}
\usepackage{tikz}
\usepackage{graphicx}
\begin{document}

\newsavebox{\mybox}
\savebox{\mybox}{
\begin{overprint}
\begin{tikzpicture}
\onslide<1->{\node (A) at (0, 0) {Spam};}
\onslide<2->{\node (S) at (1, 1) {Eggs};}
\end{tikzpicture}
\end{overprint}
}

\begin{frame}
\usebox{\mybox} % here, I want to show ALL slides in the frame
\end{frame}

\begin{frame}
\scalebox{2}{\usebox{\mybox}} % here, I want only the LAST slide in the frame
\end{frame}

\end{document}

This appears to store only the first slide of the frame into \mybox. However, I want to have all slides in the first \usebox and only the last slide in the second \usebox.

I've also tried compiling the first frame as usual and then something like \savebox{\mybox}{\againframe<2>{myframe}}, but this resulted in an error message Missing \endgroup inserted.. And anyway, I don't want to repeat the full frame, but only the tikzpicture.

So, my question:

• How do I repeat a scaled-down version of a specific overlay of a tikzpicture from a previous frame?
-

The saveboxes and the overlay mechanism are not compatible which each other. The savebox fixes the typeset output of its content and does not allow this animations. You should consider storing the code into a macro instead which is used twice. This is less efficient as a box but works with overlays.

Only having the last slide in the second frame is actually an additional issue. You can use the overlay argument of frame to only have certain overlay steps displayed, but this will count for the whole frame. While OK in your minimal example it is no good if you have different overlay material in the frame with the scaled picture. In this case I would need more details on that.

Here a principal example. Note that I replaced the box with a macro. I also added some % at the end of some lines to avoid spurious spaces there (line endings can be taken as spaces).

\documentclass{beamer}
\usepackage{tikz}
\usepackage{graphicx}
\begin{document}

\newcommand{\mypic}{%
\begin{overprint}
\begin{tikzpicture}
\onslide<1->{\node (A) at (0, 0) {Spam};}
\onslide<2->{\node (S) at (1, 1) {Eggs};}
\end{tikzpicture}
\end{overprint}%
}

\begin{frame}
\mypic
\end{frame}

\begin{frame}<2>
\scalebox{2}{\mypic} % here, I want only the LAST slide in the frame
\end{frame}

\end{document}

-


text:
# Tag Info

36

You cant. Since $XOR$ is associative, i.e. $(x_1\oplus x_2)\oplus x_3=x_1\oplus(x_2\oplus x_3)$, you can only implement functions of the form $x_{i_1}\oplus...\oplus x_{i_k}$ where $x_{i_j}\in\{x_1,x_2\}$. This is equivalent to (depending on the parity of the number of instances of $x_1$ and $x_2$) either 0, $x_1$, $x_2$, or $x_1\oplus x_2$, which are not ...

19

Hmmm. It can't be done with boolean algebra that's for sure, but I could wire one up physically. The trick is wiring one of the inputs to a power lead of an XOR gate. I2 | 0 I1 | | | | \| |/ | |\ / | | .|---| \ / |--------/ \ V / \ / ...

17

Here is one way to prove the first identity: $$A \land (A \lor C) = (A \lor 0) \land (A \lor C) = A \lor (0 \land C) = A \lor 0 = A.$$ The second identity has a similar proof. Alternatively, you could use duality to deduce it from the first identity.

11

From that formula? It can be done. But it's easier to start with this one: (using a different notation here) a ^ b = ~(a & b) & (a | b) Ok, now what? Eventually we should derive ~(~(~(a & b) & a) & ~(~(a & b) & b)) (which looks like it has 5 NANDs, but just like the circuit diagram it has a sub-expression which is used twice). ...

9

As Pål GD mentions in his comment, the proof is actually very simple: there are $2^{2^n}$ functions, but only $C_S = S^{O(S)}$ circuits of size at most $S \geq n$. The exact constant in the exponent depends on the exact definition of a circuit. Getting the best exponent requires some rather intricate arguments, together with the assumption $S = \omega(n)$. ...

8

Informally, a (programming) language is Turing complete if every computable function has a representation. A general computable function accepts an input of arbitrary size. Boolean functions, on the other hand, accept an input of a fixed size. Hence Boolean functions don't even qualify as potentially Turing-complete. The relevant notion of completeness here ...

8

One way of looking at this is as a consequence of distributivity, where $P+QR\equiv (P+Q)(P+R)$. Then you'll have \begin{align} X+(X'Y) &\equiv (X+X')(X+Y)&\text{distributivity}\\ &\equiv T(X+Y)&\text{inverse}\\ &\equiv X+Y&\text{domination} \end{align}

8

I think you are asking for this proof: A^B = (!A)B + A(!B) = !!((!A)B) + !!(A(!B)) = !(!!A + !B) + !(!A + !!B) = !(A + !B) + !(!A + B) = !((A + !B)(!A + B)) = !(A(!A) + AB + (!A)(!B) + B(!B)) = !(AB + (!A)(!B)) = !(AB)(!(!A)(!B)) = !(AB)(!!A + !!B) = !(AB)(A+B) = !(AB)A + !(AB)B = !!(!(AB)A + !(AB)B) = !((!(!(...

8

Note that $\qquad A \lor (B \land C) \equiv (A \lor B) \land (A \lor C)$; you can "multiply out". Add in $\qquad (A \lor \lnot A) \land B \equiv B$ and you are done.

7

The clauses are not intended to be equivalent, so you shouldn't call it an "equivalent representation in 3-literal clauses." All the reduction requires is that the original formula has at least one satisfying assignment if, and only if, the new formula does. In this case, we have this property: if the original formula was satisfiable, we can choose at least ...

7

There are two ways to define a universal operator: when constants are allowed, and when they are not allowed. If constants are allowed, then one can define a universal operator which doesn't satisfy the claim, as follows: $$T(x,y,z) = \overline{x \land y} \land z.$$ This is universal since $T(x,y,1)$ is the NAND operator, but $T(0,0,0) = 0$. Now suppose ...

6

The classical example is $$(x_1 \lor y_1) \land (x_2 \lor y_2) \land \cdots \land (x_n \lor y_n)$$ which blows up to $2^n$ terms when converted to a DNF. Most functions have CNF and DNF complexity very large – $\Theta(2^n/n)$ if I remember correctly – and so for random functions there is no blow-up for trivial reasons. Miltersen, Radhakrishnan and Wegener ...

6

I'll write your expression as $A\lor(\neg A\land B)$. Then \begin{align} A\lor B &= A\lor((A\lor\neg A)\land B) &\text{identity}\\ &=A\lor (A\land B)\lor(\neg A\land B) &\text{distributive}\\ &=(A\lor (A\land B))\lor(\neg A\land B)\\ &= A\lor(\neg A\land B) &\text{absorption} \end{align}

6

Here's one way of thinking how these identities "work". Of the first one, when A is false, A and anything is false; when A is true, A or C is true, and the whole thing is true too; therefore being equal A in both cases. Similarly, the second, when A is true, then A or anything is true; when A is false, A and C is false, and the whole expression is also false....

6

First of all, this is a math question. I think you are confused on how brackets are used. They indicate precedence of operations, and can be used anywhere, even in places where such indication is not necessary. For example, $$3 \times 5 + 8$$ and $$(3 \times 5) + 8$$ are both legitimate expressions and they mean exactly the same thing. Your expression $$(x ... 5 Let's start with some definitions: A literal is either a variable (a positive literal) or the negation of a variable (a negative literal). A clause is a formula which is equivalent to a disjunction of literals. A Horn clause is a formula which is equivalent to a disjunction of literals, at most one of which is positive. Your formula (P \to Q) \to W is ... 5 strictly speaking as YF has answered, finite circuits cannot be Turing complete. however its worth mentioning a lead in response to this question (and maybe what youre looking for) a closely related concept used quite widely in theory where circuits are used to compute functions in a way that is stronger than Turing complete. namely, circuit families. a ... 5 No. It's not possible. Any function that can be computed using just XOR's is affine over GF(2). However, the Euclidean distance is not affine over GF(2), so there is no hope of representing it with just XOR's. Recall that GF(2) denotes the finite field with two elements; you might also see it indicated by \mathbb{F}_2, and it is the field (\{0,1\... 5 Since you already have the diagram answer, easily awailable from wikipedia by typing you question title in Google, as a .png diagram identical to yours, it should be easy for you to find the formula by extracting it from that diagram. Given the definition NAND as \text{NAND}(A,B)=\overline{AB}\;: The leftmost gate gives C=\overline{AB}; The top gate ... 5 The boolean satisfiability problem (SAT) involves finding a satisfying truth assignment for a set of clauses C over the boolean variables V=\{v_1, v_2, ..., v_n\} so that each clause in C contains at least one true literal. Since V contains n variables and each of these variables can only have 2 different values (i.e., true or false), the total ... 4 2 does not hold as stated. All you know is that if you flip the all bits in a given block B_i, the output flips. Without additional conditions, I don't think you're guaranteed anything about flipping any individual bit within B_i. EDIT: In fact, if B_1, B_2, \ldots, B_i, \ldots represents a maximal set of blocks, then for any B_i, there cannot be ... 4 You're confusing classical and quantum computation, so let me ignore the quantum aspects for now. If you forbid the unary NOT gate then you can use a binary NOT gate, say g(a,b) = \lnot a. You can also simulate NOT using natural gates: XOR(a,1) = \lnot a (and this gate can even be made reversible!). So this kind of restriction is not really meaningful. ... 4 They are not the same, but I don't blame you for thinking that they are. The reason why it doesn't seem clear that they are the same is that you've only seen one example of each. So let's step back, define them separately, and then look at some interesting examples. Propositional logic is a branch of mathematics that studies propositions, their truth or ... 4 Essentially, you can treat uninterpreted predicates as boolean-valued functions (adding a new boolean sort if necessary) and replace them with boolean variables as you would other functions. For the given example: Getting rid of F and G first:$$\begin{align*} p(z,f_1)&\wedge f_2=g_1\to p(x_1,y)\wedge x_1=f_1\to f_1=f_2\\ &\wedge x_1=x_2\to ...

4

I would hardly describe a lattice as a generalized form of boolean algebra, since there are many more things that a lattice can describe. A better description would be to say that boolean algebra forms an extremely simple lattice. It has two elements, $\top$ and $\bot$, with $\bot \sqsubset \top$. The meet corresponds to conjunction (AND), and the join ...

4

Giving an example of what Eugene has said, but letting you do your own homework. Let's look at another Truth Table: $\begin{array}{|c|c|c|c|} \hline a& b & c & \varphi \\ \hline 1 & 1& 1& 1\\ \hline 1 & 1 & 0 & 1 \\ \hline 1 & 0 & 1 & 0 \\ \hline 1 & 0 & 0 & 1 \\ \hline 0 & 1 & 1 & 0 \\... 4 I presume you are looking for a way to prove the identity using a calculus. So far you have used distributivity an idempotency. Recall that A = A1 so you get A1+AB and you can use distributivity again, this time in the other direction. Then two obvious steps. 4$\exists x\forall y \hspace{1mm}\varphi$is not equivalent to$\forall y \exists x \hspace{1mm} \varphi$. Consider for example the formula "for all$x$there exists$y$such that$y=x^2$". When evaluated over the reals, this is true (every real number has a square). However, if you switch the quantifiers you get the statement "there exists$y$such that for ... 4 There is a preprocessing method called vivification$^1$that can be used to detect subsumed clauses. It relies on unit propagation to work. To vivify a clause, make a partial variable assignment such that all the proposed clause's literals are false. E.g. if your proposed clause is$x_1 \lor \lnot{x_2} \lor x_3 \lor \lnot{x_4}$, assign$x_1$= FALSE,$x_2$... 4 Suppose that$f,g$were functions satisfying$f(A) g(A) = 1$and$f(A) g(B) = 0$if$A \neq B$. Take any$A \neq B$. Then$f(A) g(B) = 0$, and so either$f(A) = 0$or$g(B) = 0$. If$f(A) = 0$then$f(A) g(A) = 0$, and if$g(B) = 0$then$f(B) g(B) = 0\$. So no such functions exist.

Only top voted, non community-wiki answers of a minimum length are eligible


text:
# Explain the term entire function

Entire functions are those functions which are related to the field of complex analysis. Any entire function is also known as an integral function and hence both these terms are synonyms. In simple words, an entire function is defined as a function of complex values, which is holomorphic (differentiable at almost each and every point of its domain) on the complete complex plane. The most basic example of an entire function is the exponential functions, as they’re holomorphic over the entire complex plane.


text:
# A corollary of the Hahn-Banach theorem

Let $Z$ be a subspace of normed linear space $X$ and that $y$ is an element of $X$ whose distance from $Z$ is $d$. Then there exists a $\Lambda \in X^*$ (the dual space of $X$) so that $\| \Lambda\| \leq 1$, $\Lambda(y) = d$ and $\Lambda(z) = 0$ for all $z \in Z$.

This corollary is left as an exercise to the reader in chapter 3 of Reed and Simon's Functional Analysis, Corollary 3, page 77. I assumed that this corollary would be short and have relatively simple ideas as the previous 2 corollaries which were proved, but after multiple fruitless attempts I tried to find some solutions online to similar problems.

First I found some variations of the problem, for instance if $Z$ is closed, then one can define a linear functional $\lambda$ from $\operatorname{span}\{ y, Z \}$ to $\mathbb{R}$ by noting that each $x \in \operatorname{span}\{ y, Z \}$ can be written as a unique linear combination $x = \alpha y + z$ where $\alpha \in \mathbb{R}$ and $z \in Z$. Now define $\lambda$ by $$\lambda (\alpha y + z) = \alpha$$ This is a linear functional and the kernel of $\lambda$ is the closed subspace $Z$ and hence $\lambda$ is also continuous. The solution then refers to some theorem in which it was proved that $$\| \lambda \|_{\operatorname{span}\{ y, Z \}} = \frac{1}{d(0, \lambda^{-1} \{1 \})}$$ Since $\lambda^{-1} \{ 1 \} = y + Z$ it follows that $$\| \lambda \|_{\operatorname{span}\{ y, Z \}} = \frac{1}{d(0, y + Z)} = \frac{1}{d(y,Z)} = \frac{1}{d}$$ Now we have $\lambda(y) = 1$, $\lambda(z) = 0$ for all $z \in Z$ and $\| \lambda \|_{\operatorname{span}\{ y, Z \}} = \frac{1}{d}$. By an earlier corollary we may now extend the functional $\lambda$ to a functional $\lambda'$ on the whole space $X$ and furthermore $\| \lambda'\|_X = \| \lambda \|_{\operatorname{span}\{ y, Z \}}$. Now if we define $$\Lambda(x) = d \lambda' (x)$$ then $\Lambda$ has the desired properties.

This solution is fine as is, but the book I am using does not mention either of the two important steps (kernel is closed is equivalent to continuity, and the lemma for the relationship between the norm of $\lambda$ and preimage of $1$), so I am unsure if this was the method they had in mind. I am also unsure as to how to force a closed subspace. One method might be for instance to define the functional $\lambda$ from $\overline{\operatorname{span} \{ y, Z\}}$.

Does anyone have a completely alternate, perhaps simpler solution, or a way to dodge the fact that subspace $Z$ is not closed?

• Is $X^*$ the dual space of $X$? – Xianjin Yang Jul 7 '16 at 13:59
• Yes it is, I'll add that to the original question. – Kayle of the Creeks Jul 7 '16 at 13:59
• Re "some theorem in which it was proved...": $\|\lambda\|_{span (y,Z)}$ $=\sup \{|a|/\|ay+z\| : z\in Z\land ay+z\ne 0\}$ $=\max (0, \sup \{1/\|y+z/a\| : z\in Z\land a\ne 0\})$ $=\sup \{1/\|y+z\|: z\in Z\}=$ $(\inf _{z\in Z}\|y+z\|)^{-1}=1/d.$ And $d(0,\lambda^{-1}\{1\})$ $=\inf \{\|ay+z\|: a=1\land z\in Z\})=$ $\inf \{\|y+z\|z\in Z\|)=d.$ – DanielWainfleet Jul 7 '16 at 16:20
• Ran out of editing time. In my comment above, the last line should be $\inf\{\|y+z\| : z\in Z \}=d.$ – DanielWainfleet Jul 7 '16 at 16:29

Two answers. First, you can easily derive the general case from the case where $Z$ is closed. Second, and I think more important, $Z$ being closed is really irrelevant in the first place!

(i) You can derive the general case from the case where $Z$ is closed:

If $d=0$ you can just set $\Lambda=0$ and you're done.

Suppose $d>0$. Then $y\notin\overline Z$. And $d$ is also the distance from $y$ to $\overline Z$. Apply your argument to $y$ and $\overline Z$.

(ii) It really doesn't matter whether $Z$ is closed or not.

You start by defining $\lambda$ on the span of $Z$ and $y$ by $$\lambda(\alpha y+z)=\alpha d\quad(\alpha\in\Bbb R, z\in Z).$$

(You said $\alpha$, but it should be $\alpha d$ if you want $\lambda y=d$.)

As far as I can see, the only place you used the fact that $Z$ was closed was in showing that $\lambda$ is continuous. But $\lambda$ is clearly continuous, just from the definition. Saying $d$ is the distance from $y$ to $Z$ implies that $||y+z||\ge d$ for all $z\in Z$. Hence $||\alpha y+z||\ge|\alpha|d$. So $$|\lambda(\alpha y+z)|=|\alpha|d\le||\alpha y+z||.$$

In other words, $|\lambda x|\le||x||$ for every $x$ in the domain of $\lambda$. This says precisely that $\lambda$ is bounded, in fact $||\lambda||\le1$. Hence $\lambda$ is continuous (and in particular HB says $\lambda$ extends to $\Lambda$ with $||\Lambda||\le 1$).

• Thank you! I had some problems proving the continuity of the mapping $\lambda$ so I assumed that there was something else going on, but your method makes it obvious why the mapping is continuous. – Kayle of the Creeks Jul 7 '16 at 14:45

Let $P(x)=\inf_{z\in Z}\|x-z\|$. It is easy to show that $P(ax)=aP(x),a>0$ and $P(x+y)\leq P(x)+P(y)$. Meanwhile, $P(z)=0, \forall z\in Z$ and $P(y)=d$. We can show that $P(x)\leq \|x\|$ by choosing $z=0$ in the definition.

Next, we define another function $L(x)$. $L(z)=0, \forall z\in Z$ and $L(y)=d$. Let $L$ be defined on the subspace $Y=\{by+z|z\in Z, b\in R\}$ and linear. It is easy to show that on $Y$, $L(x)\leq P(x)$. By the Hahn-Banah theorem, we can extend $L$ to the whole domain $X$ and $L(x)\leq P(x) \leq \|x\|, \forall x$. So, $\|L\|\leq 1$ and satisfy all other conditions.

Done!


text:
# Prove that $\lim_{n \to \infty} \int_{[0,1]}{x^n}\, dx = 0$. Where $\int$ represents Lebesgue integration.

Please check my proof, thank you.

Prove \begin{align*} \lim_{n \to \infty} \int_{[0,1]}{x^n}\, dx = 0 \end{align*} Proof. Let $$f_n(x) = x^n$$. Since $$f_n$$ is a polynomial it is continuous and therefore measurable. It is clear that $$(x^n) \to 0$$ for $$x \in [0, 1)$$ and $$(x)^n \to 1$$ for $$x = 1$$. Furthermore, $$0 \leq x^{n+1} \leq x^{n}$$ for all $$x \in [0,1]$$ and $$n\in \mathbb{N}$$. So, $$f_n$$ is measurable, nonnegative, and decreasing, and $$f_n \to 0$$ almost everywhere in $$[0,1]$$. By the monotone dominated convergence theorem \begin{align} \lim_{n \to \infty} \int_{[0,1]}{x^n}\, dx = \int_{[0,1]}{0}\, dx = 0 \cdot m{[0,1]} = 0 \end{align}

Edit. So apparently the monotone convergence theorem applies to only increasing sequences of functions. So for the problem above we could let $$g_n(x) = x - x^n$$. Now $$(g_n)$$ is an monotone increasing sequence that is nonnegative and measurable (continuous). Also $$(g_n) \to x$$ almost everywhere in $$[0,1]$$ (not at $$x = 1$$). So by the monotone convergence theorem

\begin{align} \lim_{n \to \infty} \int_{[0,1]}{g_n(x)}\, dx = \int_{[0,1]}{x}\, dx = \int_{[0,1]}\left(f_1(x) - 0\right) \, dx \end{align}

also we have

\begin{align} f_1(x) &= \left(x - x^k\right) + x^k \\ \\ &\implies \int_{[0,1]}x = \int_{[0,1]} \left(x - x^k\right) + \int_{[0,1]} x^k \\ \\ &\implies \left(\int_{[0,1]}x\right) - \left(\int_{[0,1]} x^k\right) = \int_{[0,1]} \left(x - x^k\right) \\ \\ &\implies \lim_{k \to \infty} \left[ \left(\int_{[0,1]}x\right) -\left(\int_{[0,1]} x^k\right) \right] = \lim_{k \to \infty} \int_{[0,1]} \left(x - x^k\right) = \lim_{k \to \infty} \int_{[0,1]} g_k(x) \\ \\ &\implies \left(\int_{[0,1]}x\right) - \lim_{k \to \infty} \left(\int_{[0,1]} x^k\right) = \left(\int_{[0,1]} x\right) \\ \\ &\implies - \lim_{k \to \infty} \int_{[0,1]} x^k = 0 \\ \\ &\implies \lim_{k \to \infty} \int_{[0,1]} x^k = 0 \end{align}

• I think MCT applies to monotone increasing sequences. But you can use DCT for the same result. – user25959 Nov 12 '18 at 2:07
• Why not just compute the integral and then take the limit? – user608030 Nov 12 '18 at 2:33
• How do you compute the lebesgue integral of $x^n$? – Zduff Nov 12 '18 at 2:39
• By noting that it's the same as the Riemann integral. Unless you don't have that theorem then just use dominated convergence like user25959 said. – user608030 Nov 12 '18 at 2:48
• @user25959 you can apply also MCT here without much effort, taking $g_n(x):=-f_n(x)+1$ and $g(x):=-f(x)+1$, and after applying elementary properties of the Lebesgue integral – Masacroso Nov 12 '18 at 3:08


text:
## The ultimate crackpot iteration! [Two-Stage / GS Designs]

Hi ElMaestro,

» Therefore, I think the answer to the question I asked is 9
»
» The answer you give is related to a question about power at stage 1.

I see. Have to tweak that. However, PowerTOST is ~500 times faster than your magick.

Cheers,
Helmut Schütz

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes


text:
## A.1 Namespace and identifiers for OPC UA for PROFIenergy Information Model

This appendix defines the numeric identifiers for all of the numeric NodeIds defined in this document. The identifiers are specified in a CSV file with the following syntax:

<SymbolName>, <Identifier>, <NodeClass>

Where the SymbolName is either the BrowseName of a Type Node or the BrowsePath for an Instance Node that appears in the specification and the Identifier is the numeric value for the NodeId.

The BrowsePath for an Instance Node is constructed by appending the BrowseName of the instance Node to the BrowseName for the containing instance or type. An underscore character is used to separate each BrowseName in the path.

The NamespaceUri for all NodeIds defined here is http://opcfoundation.org/UA/PNEM/

The CSV released with this version of the specification can be found here:

http://www.opcfoundation.org/UA/schemas/PNEM/1.0/NodeIds.csv

NOTE    The latest CSV that is compatible with this version of the specification can be found here:

http://www.opcfoundation.org/UA/schemas/PNEM/NodeIds.csv

A computer processible version of the complete Information Model defined in this document is also provided. It follows the XML Information Model schema syntax defined in [OPC 10000-6].

The Information Model Schema for this version of the document (including any revisions, amendments or errata) can be found here:

http://www.opcfoundation.org/UA/schemas/PNEM/1.0/Opc.Ua.PnEm.NodeSet2.xml

NOTE    The latest Information Model schema that is compatible with this version of the document can be found here:

http://www.opcfoundation.org/UA/schemas/PNEM/Opc.Ua.PnEm.NodeSet2.xml


text:
1. May 21, 2005

### Zanket

Let a floating thread span the distance between two galaxies fast receding from each other due to space expanding between them. Eventually the thread must break. Expanding space forces apart adjacent particles of the thread all along the thread. The thread breaks at an arbitrary spot. Then any thread on Earth may break due to expanding space. There's a lot of fabric on Earth. Perhaps a thread somewhere spontaneously broke while you were reading this.

2. May 21, 2005

### Garth

Unless the thread itself expands with the universe.
(Not according to GR but SCC)
Garth

3. May 21, 2005

### matt.o

the space the Earth inhabits does not expand with the hubble flow, so the thread would not break on Earth. You never see galaxies stretching and breaking due to the expansion of the universe, do you?

4. May 21, 2005

### Garth

If you treat gravitation as a force then as it is ~10-40 the strength of the other forces we can safely conclude that the thread and physical rulers will not expand with the universe. The binding energies of the e-m and nuclear forces holding them together, and the local gravitational forces in the solar system and the galaxy holding the solar system and the galaxy together, are much stronger than those of the Hubble expansion. The Earth bound thread does not break, but the cosmological thread suspended between two galaxies does break.

If however we treat gravitation as space-time curvature, as indeed we do in GR, then the question arises as to whether this expansion applies to everything embedded in that space-time. So then, what expands with space-time?

As the Schwarzschild solution for gravitational orbits is embedded in that space-time should not its solutions co-expand? Also as the Bohr/Schrödinger/Dirac equations of atomic physics are also so embedded then should not their solutions, i.e. atoms, also expand? If so, as the thread is made of atoms it expands with the universe, so the Earth bound and now the cosmological threads do not break!

Furthermore, we might ponder that, if physical rulers expand with the universe, then there should be no expansion as measured by those rulers.

In such a case Hubble red shift would be interpreted as other than recession Doppler shift. (e.g. a variable mass effect).

If we ask whether there is any evidence for the solar system as a whole to so expand then such might be given by the intriguing Pioneer anomaly, which, interestingly, is of the same order as the Hubble acceleration cH.

So which is the more consistent approach in answering the ‘thread thread’ question, to treat gravitation as a force or as curvature?

Garth

Last edited: May 21, 2005
5. May 21, 2005

### Zanket

The Earth expands too, but gravity and other binding forces reel the pieces back in. The same with galaxies; they are not oases where expansion does not apply. A thread would break on Earth the same as in deep space.

Last edited: May 21, 2005
6. May 21, 2005

### Zanket

The location at which the thread between the galaxies breaks is arbitrary. The Earth is subject to cosmic expansion to the same degree as is an Earth-sized region in deep space. Then the Earth bound thread can also break.

Cosmic expansion is independent of gravity. Gravity and other binding forces work to counteract expansion (by reeling back in the pieces). In the expanding space paradigm, all space expands. Even you are expanding, but the binding forces counteract it.

7. May 21, 2005

### Zanket

There is a paradox of the expanding space paradigm here: If gravity and other binding forces work to counteract expansion of you or the Earth or a galaxy, then how can the thread spanning the galaxies break and the resulting ends fly apart as must happen? As far as I know, there is no answer.

8. May 21, 2005

### Garth

You have misunderstood what I was saying.
If we define atomic (rest) masses to be constant, as indeed is required by the conservation of energy-momentum, which is also consistent with the equivalence prinicple. Consequentially an atom, and the Earth, does not expand with the universe. That expansion is then interpreted as a real expansion and Hubble red shift is recessional Doppler shift in nature. A thread between two distant galaxies would break, but one strung between two poles on Earth would not.

Furthermore cosmological expansion is a prediction of Einsteins GR field equation, which is a gravitational theory. The standard version of the theory (without Dark Energy) predicts that the expansion should be decelerating 'because of the gravitational attraction between matter within it'. (BTW the fact that its not decelerating may be a more radical discovery than simply that of DE).

I was agreeing with you in proposing that such expansion might affect everything within the universe, but that is not the normal understanding of the cosmological solution of GR.

In that normal understanding the expanding universe is not modelled by an blown up balloon with dots painted on it, as such dots themselves would expand too. Rather it is normally modelled by a balloon with coins glued onto it. The balloon expands but the coins, galaxies, do not.

As I have said I question this understanding.

Garth

Last edited: May 21, 2005
9. May 21, 2005

### Zanket

That is what books say. What I’m saying is that it’s inconsistent. Books say, to paraphrase one for example, “A galaxy is held together by its own gravity and is not free to expand with the universe. Similarly, the Solar System, Earth, an atom, or almost anything is held together by various forces in some sort of equilibrium and cannot partake in cosmic expansion.” This does not imply that these things are in expansion-free zones. The space in which things exist does expand. But the binding forces of the things reel the separating pieces back in. In your sentence the only differences between the two threads is the length and the presence of the Earth. Neither is relevant. The thread between the galaxies breaks at an arbitrary location, so one meter of thread is as good as a megaparsec. (I string it between galaxies only to make it obvious that the thread will break. Nothing about the length of the thread makes it break.) And nothing about the Earth prevents the thread from breaking, because the Earth itself is not prevented from breaking. The paradigm just implies that the pieces of the Earth will be reeled back in by gravity and other binding forces. Since the Earth expands only something like a millimeter per century, this reeling back in, which happens continuously, is imperceptible.

The expanding space paradigm (that space itself expands) arose circa 1930, after GR. GR's expansion is just a free-rise between pairs of objects, like throwing a ball up in the air.

A book of mine says, "Slowly [circa 1930] emerged the idea that the universe consists of expanding space! The lesson we must learn from general relativity is that space can be dynamic as well as curved." Seeing as how GR came about in 1915, expanding space is presumably not predicted by GR. I'd like to know more about why books attribute the exanding space paradigm, newly emerged in circa 1930, with a theory of 1915.

I say that the expansion does affect everything within the universe, and then binding forces reel the pieces back in so that, for example, the galaxies do not expand.

A more accurate model would have the coins continuously expanding and then immediately contracting. When I drop an apple from a meter above ground, its fall to the ground is delayed by cosmic expansion, but negligibly so. Gravity overwhelms the cosmic expansion. The higher the height I drop it from, the more significant the delay, until, at some height, cosmic expansion overwhelms gravity and the apple recedes from the Earth instead of falling toward it.

Can you elaborate? What is SCC?

Last edited: May 21, 2005
10. May 21, 2005

### Mike2

So here's an idea: Expansion and being reeled back in sounds like some sort of uncertainty principle. If objects cannot be located with absolute certainty, then maybe there some sort of minimum spacetime "energy".

11. May 21, 2005

### Zanket

Good thought, but the paradigm doesn't suggest that. The apple example above shows that the "reeling in" is just gravity overwhelming the expansion. Maybe a better example is when you throw an apple up. Cosmic expansion keeps the apple in the air a bit longer (that is, longer than expected when gravity alone is considered), but isn't significant enough to keep the apple from coming back down. Likewise, as cosmic expansion continuously expands every part of your body, even at the subatomic level, the binding forces continuously pull the parts of you back to where they were. You expand only at a rate of something less than a nanometer per century, so the binding forces have easy work to keep you in shape.

12. May 22, 2005

### pervect

Staff Emeritus
Calculate the actual force (acceleration) on a kilometer long thread due to the expansion of the universe

For standard Friedman-Walker cosmologies, the acceleration / unit distance turns out to be -q H^2, where H is hubble's constant, and q is the "deceleration parameter", another (rather hard to measure) constant.

For the details see

To put it in perspective, this number is

3.12 × 10-33 m / s-2 per kilometer (also worked out in this thread) with soem reasonable assumptions for q and H.

There's another thread where this got brought up, I pointed out that the tidal forces due to the gravity of the Earth (or the moon) are MUCH stronger than this *extremely* weak tidal force.

So if you aren't worried about the moon breaking threads here on earth (the moon pulls more strongly on threads closer to it than it does on threads further away, stretching them), you should be even less worried about the expansion of the universe breaking them - at least with the current values of the various constants involved. The force/ unit distance can evolve with time, in some sceneraios with a non-zero cosmological constant it can eventually become significant.

13. May 22, 2005

### chronon

Zero - the so called expansion of space has no physical effect. (Of course a non-zero cosmological constant is a different matter)
-q H^2 is negative, so the thread would contract. This is simply the effect of gravity due to the other matter in the universe.

See http://www.chronon.org/articles/stretchyspace.html

14. May 22, 2005

### Zanket

I read the other thread you gave, thanks. Regardless of the smallness of the force on the thread spanning the galaxies, it must break eventually. It cannot stretch forever. Right? And when it breaks, it breaks at an arbitrary spot and the new ends must fly apart. Right? And then there is a paradox, as to how gravity can keep a galaxy together against cosmic expansion when the much stronger forces besides gravity that holds the thread together are not enough to keep it together.

And the Earth is not an expansion-free zone, so a thread on Earth can spontaneously break due to cosmic expansion and its ends can fly apart.

15. May 22, 2005

### Zanket

How can that be? It does stretch things, right? Do you mean almost zero?

I read this, thanks. (I had also previously read Ned Wright’s stuff and other books on this.) It seems to me that the main reason you want to think in terms of stretching space is because things in stretching space break eventually, whereas things moving apart do not. That’s a big difference. The way I see it, the expanding space paradigm implies that the galaxies (and all other material things) are continuously stretching or breaking apart due to cosmic expansion, and continuously being kept together or put back together by gravity and other binding forces. That is, these two sets of forces are in equilibrium. And that leads to the paradox mentioned above.

16. May 22, 2005

### Zanket

Also, is it true to say that the expanding space paradigm (created circa 1930) was shoehorned in to GR (1915)? My understanding is that expanding space in GR was originally just a cosmos mostly filled with objects free-rising from each other. The inclusion of the expanding space paradigm to GR adds stretching space, so that objects that look to be free-rising from each other either are, due to peculiar velocity, or are stationary with space stretching between them. Can someone give the history on this?

17. May 22, 2005

### Mike2

How much would the plank length have stretched in 13.7Gyrs? Yet if particles were strings and the expansion of space does not make particles any larger so that the physics would have changed in that time, then doesn't this prove that particles are not extended objects but are singularities instead? Thanks.

18. May 22, 2005

### Zanket

If I understand your question, I think the paradigm would say that a smallest-length-object would not stretch. It would slip on the expanding space to always maintain its length. In other words, this object is infinitely rigid hence non-stretchable.

19. May 22, 2005

### Janus

Staff Emeritus
Does it? Assumimg that the string is of uniform strength along its entire length, then it will break at its midpoint. The molecular bonds of the string try to hold it together, thus the expansion force felt at the ends is transmitted down the thread by these bonds, as will be the force acting at any point of the string. Each point will be subject not only to its own force due to expansion, but also that transmitted to it by the points 'outward' from itself, which it in turn transmits down the line to the next point. The midpoint will feel the result of all the expansion force working along the entire length of the thread, and being the point where the greatest amount of force is felt, will be the point at which the thread would break.
Imagine a thread hanging from an anchor point. each point of the string not only has to support its own weight, but the weight of all the thread below it. the anchor point has to support the whole weight of the string, and if the string gets long enough, this is th point where it will break. In your example, the 'anchor point' is the middle of the thread.
But any thread won't break due to expanding space, only one long enough where the cumulative expansion force acting along the whole length exceeds the strength of the molecular bonds at the midpoint of the string.

20. May 22, 2005

### Mike2

I have trouble with strings because it is not clear whether strings are spacetime itself of lower dimension embedded in the background of higher dimension or if they are something else. If they are embeddings, then they would stretch with the background, right, with all the physics changing with it. But if the physics does not change (e.g the tension, etc), then strings are not embeddings but are themselves different than lower dimensions embedded in higher dimensions.

My personl view is that everything that exist must ultimately be describible in geometric terms, manifolds within manifolds. Otherwise we are dealing with something that cannot be explained as having an origin describible in terms of mathematics. Yet it seems intuitive that if everything arises smoothly from a singularity, it must be explainable in terms of smooth geometry. It would not be possible to impose some arbitrary function on this geometry from the outside. All would have to result from the growth of the singularity in some smooth predictable way.

21. May 22, 2005

### Hurkyl

Staff Emeritus
No. That space would globally expand or contract fell naturally out of the math. Einstein introduced the Cosmological Constant precisely so that he could have an adjustable parameter that would eliminate that effect (when set to the right thing).

And even that wasn't "shoehorned". IIRC, it's essentially a constant of integration.

Also, you seem to have a fairly fundamental misconception about the effects of tension. If you grab the ends of a string and tug on them without breaking its elastic limit, you can tug for all of eternity with a constant force, and the string will never break. It will stretch once so that its intermolecular forces balance your tension force, and then it will stay in equilibrium until the applied tension is changed.

22. May 22, 2005

### chronon

No, I mean zero. If you ignore any cosmological constant/dark energy (i.e. the situation up until the 1990's) then there is nothing driving the galaxies apart. They are moving apart because they started out that way. The only force between them is gravitational, which causes deceleration.
No the reason for the expanding space paradigm was because the natural time coordinate chosen by cosmologists is the proper time, which is not compatible with special relativity. Expanding space was invented so that objects wouldn't seem to be moving apart faster than light. (My impression was that this paradigm started when it became common to detect objects beyond the Hubble sphere, that is in the last 30 years).

What GR introduced was the idea of spacetime as something real, which could be curved. However, it can't be said to expand, as that is a time based notion.

23. May 22, 2005

### Zanket

Space expands everywhere in the paradigm, so the stretch force is equalized everywhere. There’s no excess anywhere to be transmitted. The thread is not being stretched from any particular direction. It is being stretched throughout from within. Tell me, where would an infinitely long thread break? It has no midpoint. If it breaks, it breaks at an arbitrary point. And if it doesn’t break, then you must explain how it can stretch forever. That seems to address the rest of your post.

24. May 22, 2005

### Zanket

25. May 22, 2005

### pervect

Staff Emeritus
I went through the math not that long ago in that thread with Hellfire - there is in theory a physical effect due to the expansion of the universe. However, the effect is so small that it is not experimentally detectable as you can see by the numbers that I quoted.

The reason there is a physical effect is that the components of the Riemann tensor are not zero. Consider for instance the "flat" FRW metric

ds^2 = a^2(t)*(dx^2+dy^2+dz^2) - dt^2

The first clue that this space-time isn't flat is in the Christoffel symbols. They are a bit numerous to list, but consider for instance one example:

$$\Gamma_{txx} = -a(t) \frac{\partial a}{\partial t} = - a \dot{a}$$

This is easy to compute directly because we are in a coordinate basis:
(see MTW pg 210, for instance)

$$\Gamma_{abc} = \frac{1}{2}(g_{ab},c+g_{ac},b - g_{bc},a)$$

The comma notation is convenient, a comma means an ordinary partial derivative, hence the meaning of $$g_{ab},c$$ is $$\frac{\partial g_{ab}}{\partial c}$$

So to work our our example

G_txx = .5*(g_tx,x + g_xt,x - g_xx,t)

But g_tx = g_xt = 0, so the only non-zero component is g_xx,t, which is $$2 a \dot{a}$$. Thus $$\Gamma_{txx} = -a \dot{a}$$ as stated.

The fact that the Christoffel symbols are not identically zero should be enough for you to realize that the (t,x,y,z) coordiante system is NOT an inertial one! This means that pseudo-forces exist.

The detailed computation of the Riemann confirms that space-time isn't flat and gives the magnitude of the stretching components of the Riemann tensor. The thread also explains why $$\Gamma^x{}_{txt}$$ represents the tidal force.

As this has previously been done on the other thread, and is rather long, I won't repeat it here. You also might find it convenient to look up the Riemann for the FRW metric in a textbook, MTW gives the Einstein tensor on pg 728 for starters (you can figure out the Riemann from the Einstien, but it takes more work).

Note that q is a negative number for the numbers quoted, as far as sign issues go.


text:
## 1018 one year ago physics problem (question's in the comments)

1. 1018

2. Michele_Laino

3. 1018

oh hi ms michele! thank you for your help again. haha, ok i will :)

4. 1018

@Michele_Laino hi are you still online? im having trouble with the problem. if you're not too busy maybe you can help me? thanks

5. Michele_Laino

6. 1018

oh, that's just short for miss. haha. sorry

7. anonymous

Let's look at block m2 first forces acting on it are |dw:1441042822826:dw|

8. anonymous

for equilibrium resultant force on block m2=0 this implies for vertical components $N=m_{2}g+F.\sin(34)$ We know that friction is $f=\mu.N$ $\therefore f=\mu(m_{2}g+F.\sin(34))$ For horizontal components we have $T+f=F.\cos(34)$ From this you can find T $T=F.\cos(34)-f=F.\cos(34)-\mu(m_{2}g+F.\sin(34))$

9. anonymous

But then why is the block 1 given for?Maybe I'm missing out something :p

10. 1018

11. anonymous

Do you have an answer so we can at least verify by plugging in values?

12. 1018

no i dont sorry. actually the problem changed already, i mean same problem but with different values because i tried to answer it and it was wrong haha so im just trying to see the analysis of it

13. anonymous

oh

14. 1018

but do you want to see the new? although it's literally the same problem only with different values

15. 1018

or i could just type the new values. but really the same question.

16. 1018

i have an idea but i dont know. haha. there 2 tensions present in the string, so maybe it's tension (right) - tension (left) lol

17. anonymous

One thing that I think is not given is whether the applied force is keeping the system in equilibrium or causing acceleration, which is a key deciding factor Let's assume it causes acceleration a, cuz that seems to be the case here, Therefore for block 1 we have Force acting towards the right on it is the tension T and towards left have friction equal to normal reaction $T-\mu.m_{1}g=m_{1}a$ Thus to find T we need to eliminate a $T=m_{1}(\mu.g+a)$ Now consider the system of box 1 and 2 combined We have $a=\frac{F_{res}}{m_{1}+m_{2}}$ Where F is the resultant force on the system of 2 blocks I think F is $F_{res}=T-\mu.m_{1}g+F.\cos(34)-\mu(m_{2}g+F.\sin(34))-T$ The first 2 terms correspond to block 1 and other terms to block 2 cancelling out the Tension we get $F_{res}=F.\cos(34)-\mu(m_{1}g+m_{2}g+F.\sin(34))$ $\implies a=\frac{F.\cos(34)-\mu(m_{1}g+m_{2}g+F.\sin(34))}{m_{1}+m_{2}}$ plugging this into equation for Tension we have $T=m_{1}(\mu.g+\frac{F.\cos(34)-\mu(m_{1}g+m_{2}g+F.\sin(34))}{m_{1}+m_{2}})$ I'm not sure about it, but maybe worth a shot

18. 1018

yeah that's what i thought the first time, but i just assumed that it was not moving since there's a string involved.

19. anonymous

Can you try the expression I got for Tension?see if it works

20. 1018

ill try this equation. thanks! i'll let you know if its correct. haha

21. 1018

the dot is multiplication right? just to be clear, with the mew(?) and g

22. anonymous

yeep, I had to do it otherwise it was writing it as mug lol

23. anonymous

$mug$

24. 1018

on calcu its negative, is that ok?

25. 1018

oh hold on i think i made a mistake ill try again

26. 1018

hey! it's correct! thank you so much!


text:
# 7.5: Other Strategies for Integration

[ "article:topic", "authorname:openstax", "computer algebra system", "integration table", "license:ccby" ]

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

In addition to the techniques of integration we have already seen, several other tools are widely available to assist with the process of integration. Among these tools are integration tables, which are readily available in many books, including the appendices to this one. Also widely available are computer algebra systems (CAS), which are found on calculators and in many campus computer labs, and are free online.

## Tables of Integrals

Integration tables, if used in the right manner, can be a handy way either to evaluate or check an integral quickly. Keep in mind that when using a table to check an answer, it is possible for two completely correct solutions to look very different. For example, in Trigonometric Substitution, we found that, by using the substitution $$\displaystyle x=tanθ,$$ we can arrive at

$$\displaystyle ∫\frac{dx}{\sqrt{1+x^2}}=ln(x+\sqrt{x^2+1})+C.$$

However, using $$\displaystyle x=sinhθ$$, we obtained a different solution—namely,

$$\displaystyle ∫\frac{dx}{\sqrt{1+x^2}}=sinh^{−1}x+C.$$

We later showed algebraically that the two solutions are equivalent. That is, we showed that $$\displaystyle sinh^{−1}x=ln(x+\sqrt{x^2+1})$$. In this case, the two antiderivatives that we found were actually equal. This need not be the case. However, as long as the difference in the two antiderivatives is a constant, they are equivalent.

Example $$\displaystyle \PageIndex{1}$$: Using a Formula from a Table to Evaluate an Integral

Use the table formula

$$\displaystyle ∫\frac{\sqrt{a^2−u^2}}{u^2}du=−\frac{\sqrt{a^2−u^2}}{u}−sin^{−1}\frac{u}{a}+C$$

to evaluate $$\displaystyle ∫\frac{\sqrt{16−e^{2x}}}{e^x}dx.$$

Solution

If we look at integration tables, we see that several formulas contain expressions of the form $$\displaystyle \sqrt{a^2−u^2}.$$ This expression is actually similar to $$\displaystyle \sqrt{16−e^{2x}},$$ where $$\displaystyle a=4$$ and $$\displaystyle u=e^x$$. Keep in mind that we must also have $$\displaystyle du=e^x$$. Multiplying the numerator and the denominator of the given integral by $$\displaystyle e^x$$ should help to put this integral in a useful form. Thus, we now have

$$\displaystyle ∫\frac{\sqrt{16−e^{2x}}}{e^x}dx=∫\frac{\sqrt{16−e^{2x}}}{e^{2x}}e^xdx.$$

Substituting $$\displaystyle u=e^x$$ and $$\displaystyle du=e^x$$ produces $$\displaystyle ∫\frac{\sqrt{a^2−u^2}}{u^2}du.$$ From the integration table (#88 in Appendix A),

$$\displaystyle ∫\frac{\sqrt{a^2−u^2}}{u^2}du=−\frac{\sqrt{a^2−u^2}}{u}−sin^{−1}\frac{u}{a}+C.$$

Thus,

$$\displaystyle ∫\frac{\sqrt{16−e^{2x}}}{e^x}dx=∫\frac{\sqrt{16−e^{2x}}}{e^{2x}}e^xdx$$            Substitute $$\displaystyle u=e^x$$ and $$\displaystyle du=e^xdx.$$

$$\displaystyle =∫\frac{\sqrt{4^2−u^2}}{u^2}du$$            Apply the formula using $$\displaystyle a=4$$.

$$\displaystyle =−\frac{\sqrt{4^2−u^2}}{u}−sin^{−1}\frac{u}{4}+C$$                Substitute $$\displaystyle u=e^x$$.

$$\displaystyle =−\frac{\sqrt{16−e^{2x}}}{u}−sin^{−1}(\frac{e^x}{4})+C$$

## Computer Algebra Systems

If available, a CAS is a faster alternative to a table for solving an integration problem. Many such systems are widely available and are, in general, quite easy to use.

Example $$\displaystyle \PageIndex{2}$$: Using a Computer Algebra System to Evaluate an Integral

Use a computer algebra system to evaluate $$\displaystyle ∫\frac{dx}{\sqrt{x^2−4}}.$$ Compare this result with $$\displaystyle ln∣\frac{\sqrt{x^2−4}}{2+}\frac{x}{2}∣+C,$$ a result we might have obtained if we had used trigonometric substitution.

Solution

Using Wolfram Alpha, we obtain

$$\displaystyle ∫\frac{dx}{\sqrt{x^2−4}}=ln∣\sqrt{x^2−4}+x∣+C.$$

Notice that

$$\displaystyle ln∣\frac{\sqrt{x^2−4}}{2}+\frac{x}{2}∣+C=ln∣\frac{\sqrt{x^2−4}+x}{2}∣+C=ln∣\sqrt{x^2−4}+x∣−ln2+C.$$

Since these two antiderivatives differ by only a constant, the solutions are equivalent. We could have also demonstrated that each of these antiderivatives is correct by differentiating them.

You can access an integral calculator for more examples.

Example $$\displaystyle \PageIndex{3}$$: Using a CAS to Evaluate an Integral

Evaluate $$\displaystyle ∫sin^3xdx$$ using a CAS. Compare the result to $$\displaystyle \frac{1}{3}cos^3x−cosx+C$$, the result we might have obtained using the technique for integrating odd powers of $$\displaystyle sinx$$ discussed earlier in this chapter.

Solution

Using Wolfram Alpha, we obtain

$$\displaystyle ∫sin^3xdx=\frac{1}{12}(cos(3x)−9cosx)+C.$$

This looks quite different from $$\displaystyle \frac{1}{3}cos^3x−cosx+C.$$ To see that these antiderivatives are equivalent, we can make use of a few trigonometric identities:

$$\displaystyle \frac{1}{12}(cos(3x)−9cosx)=\frac{1}{12}(cos(x+2x)−9cosx)$$

$$\displaystyle =\frac{1}{12}(cos(x)cos(2x)−sin(x)sin(2x)−9cosx)$$

$$\displaystyle =\frac{1}{12}(cosx(2cos^2x−1)−sinx(2sinxcosx)−9cosx)$$

$$\displaystyle =\frac{1}{12}(2cos_3x−cosx−2cosx(1−cos^2x)−9cosx)$$

$$\displaystyle =\frac{1}{12}(4cos_3x−12cosx)$$

$$\displaystyle =\frac{1}{3}cos_3x−cosx.$$

Thus, the two antiderivatives are identical.

We may also use a CAS to compare the graphs of the two functions, as shown in the following figure.

Figure $$\PageIndex{1}$$: The graphs of $$\displaystyle y=\frac{1}{3}cos^3x−cosx$$ and $$\displaystyle y=\frac{1}{12}(cos(3x)−9cosx)$$ are identical.

Exercise $$\PageIndex{1}$$

Use a CAS to evaluate $$\displaystyle ∫\frac{dx}{\sqrt{x^2+4}}$$.

Hint

Possible solutions include $$\displaystyle sinh^{−1}(\frac{x}{2})+C$$ and $$\displaystyle ln∣\sqrt{x^2+4}+x∣+C.$$

## Key Concepts

• An integration table may be used to evaluate indefinite integrals.
• A CAS (or computer algebra system) may be used to evaluate indefinite integrals.
• It may require some effort to reconcile equivalent solutions obtained using different methods.

## Glossary

computer algebra system (CAS)
technology used to perform many mathematical tasks, including integration
integration table
a table that lists integration formulas

### Contributors

• Gilbert Strang (MIT) and Edwin “Jed” Herman (Harvey Mudd) with many contributing authors. This content by OpenStax is licensed with a CC-BY-SA-NC 4.0 license. Download for free at http://cnx.org.


text:
# Which components can be labelled as "BD" on a printed circuit board?

In the process of repairing some consumer electronics, I encountered some SMDs labelled BD on the silkscreen:

As this one has clearly blown, I'm interested in knowing what it could be.

Here is another component on the board, having the same label, that seems to be in better shape:

Note for people that might land here for a more general case: BD is a common abbreviation for "board".

• Could it maybe stand for "Bead", i.e. Ferrite Bead? They are commonly named FB, but who knows. Nov 30 '21 at 7:33
• We use FB for them (ferrite beads), BD seems unusual. Nov 30 '21 at 7:35
• I found Waldo! Now where's that darn scroll... Nov 30 '21 at 8:22
• As for what BD stands for... Bad Designator? :) It's clearly a ferrite bead, I've seen FE or FB for those. Nov 30 '21 at 12:54
• I'm pretty sure BD standard for "whatever Buddy, i Do what i want" Nov 30 '21 at 17:32


text:
# If You Know What I Mean's question at Yahoo! Answers regarding summations

Staff member

#### MarkFL

Staff member
Hello If You Know What I Mean,

For these two questions, we will rely on the formula:

$$\displaystyle \sum_{k=1}^nk=\frac{n(n+1)}{2}$$

We will factor out the integer $m$ which divides each term, leaving a summation of sequential natural numbers, whose upper limit of summation is determined by $$\displaystyle \left\lfloor\frac{101}{m} \right\rfloor$$. Hence, we find:

a) $$\displaystyle S=2\sum_{k=1}^{50}k=2\cdot\frac{50(50+1)}{2}=50 \cdot51=2550$$

b) $$\displaystyle S=5\sum_{k=1}^{20}k=5\cdot\frac{20(20+1)}{2}=50 \cdot21=1050$$

To If You Know What I Mean and any other guests viewing this topic, I invite and encourage you to post other summation of arithmetic series questions in our Pre-Algebra and Algebra forum.

Best Regards,

Mark.


text:
## tana 2 years ago A local car dealership advertises cars that get the following miles per gallon:15, 22, 36, 30, 38, 21 Find the variance. (Round your answer to the nearest hundreth.)

1. sheg

first find out the average

2. tana

162

3. sheg

@tana you are required to calculate the average first

4. sheg

how you have calculated the average???

5. tana

6. sheg

average is total / number

7. tana

duhh i added them to get the "TOTAL NUMBER "

8. sheg

$Average = {{15+22+36+30+38+21 }\over{6}}$

9. sheg

so average is???

10. tana

144.5

11. sheg

$Average = {{15+22+36+30+38+21 }\over{6}}={{162}\over{6}}=27$

12. sheg

tana do u know about variance

13. sheg

Miles/Gallon Deviation Deviation^2 15 -12 144 22 -5 25 36 9 81 30 3 9 38 11 121 21 -6 36 27=average variance= 69.33333333

14. tana

no

15. sheg

is this your variance???

16. tana

idk


text:
# Update astropy to 3.2.3 from conda-forge

XMLWordPrintable

## Details

• Type: RFC
• Status: Implemented
• Resolution: Done
• Component/s:
• Labels:
None

## Description

DM-22000 describes repeated failures to build obs_lsst due to a failure of the Astropy mechanism for automatically downloading the latest IERS-A table.

Astropy 3.2.3 addresses this issue. It is not currently available on the Conda default channel, but it is in conda-forge.

I propose incorporating this into the default scipipe_conda_env. This means updating

  astropy: 3.1.2-py37h7b6447c_0 --> 3.2.3-py37h516909a_0 conda-forge

on Linux, and

 astropy: 3.1.2-py37h1de35cc_0 --> 3.2.3-py37h0b31af3_0 conda-forge

on macOS.

It also means adding conda-forge to the list of channels in the environment definition files. (Question for the Conda cognoscenti: should we add conda-forge to just the package files, or also to the bleed files?)

I don't know when Astropy 3.2.3 might be available on default (second question for the cognoscenti: is there any way to tell?). Should that happen before this RFC is adopted, we will simply pick up the version from default and abandon the plan to use conda-forge.

Since DM-22000 has tripped up several folks over the last couple of days, I have given this RFC an unusually short (~24 hour) duration. Please shout loudly if you know of a reason to delay further.

## People

• Assignee:
John Swinbank
Reporter:
John Swinbank
Watchers:
John Swinbank, Krzysztof Findeisen


text:
## College Physics (4th Edition)

The work done by a gas is $P \Delta V$ The work done on a gas is $-P \Delta V$ If $\Delta V = 0$, then the work done on or by the system is zero. As a system undergoes a constant volume process, (c) the work done on or by the system is zero.


text:
# Just how to Find a documents in FreeBSD

I'm attempting to situate all duplicates of example.filename on my FreeBSD web server. What's the most effective/ most convenient/ most reliable means to do this?

0
2019-05-07 08:46:07
Source Share
find / -name example.filename

0
2019-05-09 02:46:34
Source

If you've obtained situate (also known as slocate) mounted, after that

locate example.filename

situate runs a cron work every evening that reindexes all the files on your equipment. It's not constantly approximately day therefore.

0
2019-05-09 02:42:23
Source

If you have the situate data source up - to - day, after that simply:

locate example.filename

0
2019-05-09 02:40:17
Source

I occasionally do

find . | grep example.filename

possibly widely ineffective nonetheless.

0
2019-05-09 02:36:04
Source
locate filename

Much faster than find, if you're running the situate solution, and also it just locates files that existed at the time updatedb last ran (usualy the evening befor under the control of a cron work).

You can run updatedb by hand, yet that is also slower than the , and also calls for origin. I occasionally upgrade the data source by hand after mounting a number of new things.

0
2019-05-09 02:13:26
Source

Sometimes you intend to find files at a details directory site degree. In this instance it can be hassle-free to make use of covering wildcards:

ls /data/*/example.filename

Obviously this just functions if you have an inflexible directory site framework.

0
2019-05-09 02:03:23
Source


text:
# tianjara.net | Andrew Harvey's Blog

myschool NPLAN Data (and NSW's Attempt at Censorship)
18th February 2010

Following up from my previous post, I have made improvements to the code, and I now have all the NPLAN data too. There are also some data files so you don't need to run the scraper and parser which hopefully this makes the data more usable and to a wider range of people. Now that I have the NPLAN data you can compare schools in terms of their (I assume the numbers are averages) test results. I was going to put in the repository some tables mashing together some of the data in the database, but I've had to research about a silly NSW law first. I'm not exactly sure what I can publish and what the implication of that would be (so best make your own league tables and possibly publish them if you want). The NSW law says,

A person must not, in a newspaper or other document that is publicly available in this State: (a) publish any ranking or other comparison of particular schools according to school results, or, (b) identify a school as being in a percentile of less than 90 per cent in relation to school results.

The folks at the Sydney Morning Herald seem to think that "Published online the same tables infringe no law; printed on these pages they are illegal." This is not what I interpret the law as. Publishing online means that the document is available for access from NSW. However I am confident I can get around this by not hosting anything myself and not hosting in Australia. For this I rely on the great services provided by wordpress.com (Automattic, Inc.) and/or github.com (GitHub, Inc.). Hopefully these US companies wouldn't cave into any threats from the Australian government.

This section of the law carries a maximum of 50 penalty units. Which is currently a fine of \$5500, that is a large enough sum for me to take extra care. This is why I'm still not sure if I should put such lists like schools ordered by certain NPLAN results in the github repository.

By the way, this censorship and damaging law raises the same questions and problems (problems for those that wish to avoid criminal or civil charges) about legal jurisdiction over the internet, the classic example is the "yahoo! nazi paraphernalia" debacle.

Footnote: This SQL query should give you an ordered list of schools based on the 2009 year 9 NPLAN results (but I guess if you can load the database dump you can probably write your own queries...).

SELECT s.name, n.score, sub.state
FROM nplan n, school s, (SELECT distinct pcode, state FROM suburb) sub
WHERE n.school = s.myschool_url
AND s.postcode = sub.pcode
AND n.year = 2009
ORDER BY n.score DESC;


text:
## Thursday, November 9, 2017

### Numerical Analysis Example for Phi Equation

As an example of numerical methods using a computer to solve equations, here's an equation who's solution is the phi ratio:
$$x^2-x-1=0$$

Let's say you want to solve this equation (or more much more complex), numerically, rather than symbolically, using a computer.  Here is a simple numerical method to do this:

Method 1:  Iteration
Rewrite the equation for the variable you want to solve for: (i.e., solve for "x=")
$x=x^2-1$            (eqn. 1)
$x^2=x+1$
$x=\sqrt{x+1}$          (eqn. 2)

Note, there are choices for the form of the equation.  Not all equations converge, so it takes practice in finding the form that easily converges.  Just try them all.  Eqn. 2 above converges while I had no luck with eqn. 1.

Write an iterative loop on the computer using a seed value for "x", and use the equation to calculate the next "x" then feed the results for "x" back into the equation and repeat.  Not all equations will converge, be aware.

Here is a sample basic program to calculate phi yourself from the phi equation:

10 PRINT "Numerical Analysis Example for Phi Equaiton"
15 iterations = 0
20 Rem seed value
30 x=2
35 Rem Resolution, adjust resolution to 1e-10 or 1e-9 for test cases
37 res=1e-16
40 Rem  Loop to solve Phi equationPhi equation
50 xnew=sqr(x+1)
60 err=abs(xnew - x)
65 x=xnew
66 iterations = iterations + 1
67 print "err=";err
70 if err>res then goto 40
80 print "Ourx=";x;"<---Our phi"
86 phi = (1+ sqr(5))/2
87 print "Phi= ";phi;"<---Actual phi"
90 print "resolution= ";res
95 print "iterations= ";iterations
100 end

Just cut and paste into this  Applesoft BASIC emulator.

There are other methods, and they're based on the same basic principle.  Such as writing the equation in a form such as:
$F(x,y,z)=Constant$
$F(x,y,z)=1$
or
$F(x,y,z)=x$
or
$F(x,y,z)=\pi$
as we have in the case of the re-written proton to electron mass ratio equation from The Oracle Precision Physics Constant Generator (TOP-PCG).  Simply focus on iterating the error towards zero.

Numerical methods are a powerful tool for investigation.  Anyone inspired can write a program with all kinds of features with numerical analysis, graphs, knobs, bells, whistles and adjustments, etc.
The Surfer, OM-IV