text:
# High precision NDSolve

I need to solve an ODE with very high precision. I am not sure yet how much precision I need so I have some question before changing the settings.

From what I understand, the working precision is how many digits the machine uses for calculation. Is this decimal digits? Can I specify binary digits? Will I gain anything by specifying binary digits?

What is the difference between AccuracyGoal and PrecisionGoal? Their description is the same. Assuming that I want 50 correct digits, which one should I set and what working precision should I choose? Is there a rule of thumb I should follow?

How certain can I be about the precision of the result? Is there any way to keep track of the error?

Can I compile with arbitrary precision? If yes, what type do I declare? Is there any other trick that I can use to speed things up?

• What I can say is that compile with arbitrary precision does not work; Compile supports only machine precision reals (a.k.a. doubles). 50 correct digits? I doubt that you will find a numerical scheme that can get you 50 precise digits for a nontrivial ODE. Actually, without knowing the ODE, it is hard so say anything. – Henrik Schumacher Mar 5 '18 at 22:55
• @VsevolodA. 50 digits. Must be related to string theory ;) – Henrik Schumacher Mar 5 '18 at 23:18
• @HenrikSchumacher just imagine someone looking at the first 45 digits with straight face and on the last five going "HERE IT IS I KNEW IT" – Vsevolod A. Mar 5 '18 at 23:19
• @tst Just to give you a glimpse at the relations: The ratio between the diameter of the observable universe and the diameter of a hydrogen atom is about 1.375*10^37... – Henrik Schumacher Mar 5 '18 at 23:31
• If you read the "Details" sections, you find statements like "With AccuracyGoal->a and PrecisionGoal->p, the Wolfram Language attempts to make the numerical error in a result of size x be less than (10^-a) + x 10^-p", which shows a difference between them. Also related: mathematica.stackexchange.com/a/139311 and this search. – Michael E2 Mar 6 '18 at 2:36


text:
# Module 2.5: Putting it all Together: An FIR Filter¶

Prev: Sequential Logic
Next: Generators: Parameters

## Motivation¶

Now that you've learned the basics of Chisel, let's use that knowledge to build a FIR (finite impulse response) filter module! FIR filters are very common in digital signal processing applications. Also, the FIR filter will reappear frequently in module 3, so it's important that you don't filter out this module by skipping ahead! If you are unfamiliar with FIR filters, head over to the article on trusty Wikipedia to learn more.

## Setup¶

In [ ]:
val path = System.getProperty("user.dir") + "/source/load-ivy.sc"

In [ ]:
import chisel3._
import chisel3.util._
import chisel3.iotesters.{ChiselFlatSpec, Driver, PeekPokeTester}

# FIR Filter¶

The FIR filter you will design performs the following operation.

Basically, this does a elementwise multiplication of the element of the filter coefficients with the elements of the input signal and outputs the sum (also called a convolution).

Or, a signals definition:

$y[n] = b_0 x[n] + b_1 x[n-1] + b_2 x[n-2] + ...$

• $y[n]$ is the output signal at time $n$
• $x[n]$ is the input signal
• $b_i$ are the filter coefficients or impulse response
• $n-1$, $n-2$, ... are time $n$ delayed by 1, 2, ... cycles

## 8-bit Specification¶

Build a 4-element FIR filter where the four filter coefficients are parameters. A module skeleton and basic tests are provided for you. Note that both the input and output are 8-bit unsigned integers. You will need to save necessary state (like delayed signal values) using constructs like shift registers. Use the provided testers to check your implementation. Registers with constant inputs can be created using a ShiftRegister of shift value 1, or by using the RegNext construct.

Note: for the tests to pass, your registers must be initialized to 0.U.

In [ ]:
class My4ElementFir(b0: Int, b1: Int, b2: Int, b3: Int) extends Module {
val io = IO(new Bundle {
val in = Input(UInt(8.W))
val out = Output(UInt(8.W))
})

???
}

In [ ]:
// Simple sanity check: a element with all zero coefficients should always produce zero
Driver(() => new My4ElementFir(0, 0, 0, 0)) {
c => new PeekPokeTester(c) {
poke(c.io.in, 0)
expect(c.io.out, 0)
step(1)
poke(c.io.in, 4)
expect(c.io.out, 0)
step(1)
poke(c.io.in, 5)
expect(c.io.out, 0)
step(1)
poke(c.io.in, 2)
expect(c.io.out, 0)
}
}

In [ ]:
// Simple 4-point moving average
Driver(() => new My4ElementFir(1, 1, 1, 1)) {
c => new PeekPokeTester(c) {
poke(c.io.in, 1)
expect(c.io.out, 1)  // 1, 0, 0, 0
step(1)
poke(c.io.in, 4)
expect(c.io.out, 5)  // 4, 1, 0, 0
step(1)
poke(c.io.in, 3)
expect(c.io.out, 8)  // 3, 4, 1, 0
step(1)
poke(c.io.in, 2)
expect(c.io.out, 10)  // 2, 3, 4, 1
step(1)
poke(c.io.in, 7)
expect(c.io.out, 16)  // 7, 2, 3, 4
step(1)
poke(c.io.in, 0)
expect(c.io.out, 12)  // 0, 7, 2, 3
}
}

In [ ]:
// Nonsymmetric filter
Driver(() => new My4ElementFir(1, 2, 3, 4)) {
c => new PeekPokeTester(c) {
poke(c.io.in, 1)
expect(c.io.out, 1)  // 1*1, 0*2, 0*3, 0*4
step(1)
poke(c.io.in, 4)
expect(c.io.out, 6)  // 4*1, 1*2, 0*3, 0*4
step(1)
poke(c.io.in, 3)
expect(c.io.out, 14)  // 3*1, 4*2, 1*3, 0*4
step(1)
poke(c.io.in, 2)
expect(c.io.out, 24)  // 2*1, 3*2, 4*3, 1*4
step(1)
poke(c.io.in, 7)
expect(c.io.out, 36)  // 7*1, 2*2, 3*3, 4*4
step(1)
poke(c.io.in, 0)
expect(c.io.out, 32)  // 0*1, 7*2, 2*3, 3*4
}
}

  val x_n1 = RegNext(io.in, 0.U)
val x_n2 = RegNext(x_n1, 0.U)
val x_n3 = RegNext(x_n2, 0.U)
io.out := io.in \* b0.U(8.W) +
x_n1 \* b1.U(8.W) +
x_n2 \* b2.U(8.W) +
x_n3 \* b3.U(8.W)

# IPXact Example¶

Your Chisel generator produces Verilog, but just handing someone else a piece of Verilog is insufficient to verify and integrate the design. What other information is needed to capture a design’s intent? IPXact solves this by providing an XML description of a design and its metadata, including the interfaces, parameters, address mapping, etc. So for this portion of the lab, we'll standardize the FIR interfaces and write out IPXact to ease implementation and verification. You'll need the results of this generator in later labs.

## Setup¶

We have compiled the necessary depedencies, which are not all published on Maven, into a jar file. Contact the contributors if you want a copy. If you are not at the bootcamp, you can safely skip this section.

In [ ]:
// depdencies for ipxact
val path = System.getProperty("user.dir") + "/../rocket-dsp-utils-assembly-1.0.jar"

# FIR Filter Generator¶

For this module, we'll be using a slightly modified example from Module 3.2: Generators: Collection. If you haven't started Module 3.2, don't worry. You'll learn about the details of how MyManyDynamicElementVecFir works, but the basic idea is that it is a FIR filter generator.

The generator has one parameter: length. That parameter dictates how many taps the filter has, and the taps are inputs to the hardware Module.

The generator has 3 inputs:

• in, the input to the filter
• valid, a boolean that says when the input is valid
• consts, a vector for all the taps

and 1 output:

• out, the filtered input

In [ ]:
class MyManyDynamicElementVecFir(length: Int) extends Module {
val io = IO(new Bundle {
val in = Input(UInt(8.W))
val valid = Input(Bool())
val out = Output(UInt(8.W))
val consts = Input(Vec(length, UInt(8.W)))
})

// Such concision! You'll learn what all this means later.
val taps = Seq(io.in) ++ Seq.fill(io.consts.length - 1)(RegInit(0.U(8.W)))
taps.zip(taps.tail).foreach { case (a, b) => when (io.valid) { b := a } }

io.out := taps.zip(io.consts).map { case (a, b) => a * b }.reduce(_ + _)
}

# DspBlock¶

Integrating DSP components into a larger system can be challenging and error prone. The rocket-dsp-utils repository consists of useful generators that should help with such tasks.

One of the core abstractions is the notion of a DSPBlock. A DSPBlock has:

• AXI-4 Stream input and output
• AXI-4 memory-mapped status and control

The following code wraps the FIR filter in AXI4 interfaces.

In [ ]:
import dspblocks._
import freechips.rocketchip.amba.axi4._
import freechips.rocketchip.amba.axi4stream._
import freechips.rocketchip.config._
import freechips.rocketchip.diplomacy._

case object NumFilters extends CSRField {
val name = "firQueueDepth"
}

case class FIRTap(filterIdx: Int, tapIdx: Int) extends CSRField {
val name = s"firTap${filterIdx}_$tapIdx"
}

class FIRBlock(nFilters: Int, nTaps: Int)(implicit p: Parameters) extends
AXI4DspBlock with AXI4HasCSR with HasIPXactParameters {
outer =>

for (i <- 0 until nFilters) {
for (j <- 0 until nTaps) {
}
}
makeCSRs()

val streamNode = AXI4StreamIdentityNode()

override def ipxactParameters = Map(
"nFilters"   -> nFilters.toString,
"nTaps"      -> nTaps.toString
)

def beatBytes: Int = 8
def csrBase: Int = 0
def csrSize: Int = 4096

lazy val module = new LazyModuleImp(this) {
val (in, _)  = streamNode.in(0)
val (out, _) = streamNode.out(0)
val mem = outer.mem.map { m => m.in(0) }

require(in.params.n >= nFilters,
s"""AXI-4 Stream port must be big enough for all
|the filters (need $nFilters,, only have${in.params.n})""".stripMargin)

status(NumFilters) := nFilters.U

val outs = (0 until nFilters).map(i => {
val fir = Module(new MyManyDynamicElementVecFir(nTaps))

fir.io.in := in.bits.data((i+1)*8, i*8)

for (j <- 0 until nTaps) {
fir.io.consts(j) := control(FIRTap(i, j))
}

fir.io.out
})

val output = if (outs.length == 1) {
outs(0)
} else {
outs.reduce((x: UInt, y: UInt) => Cat(y, x))
}

out.bits.data := output
out.valid := in.valid
}
}

# Invoking the Generator¶

The following code invokes the generator. It will produce a file called BlindModule.fir which contains the firrtl generated by our code, as well as a file called BlindModule.v which is the compiled verilog. BlindModule is a wrapper for our DspBlock- it is necessary because of how diplomacy in rocket works. You'll notice that BlindModule instantiates an FIRBlock.

The line

AXI4StreamBundleParameters(n = 8)

sets the AXI-4 streams' data widths to 8 bytes.

In [ ]:
object FIRGenerator extends ipxact.IPXactGeneratorApp with App {
override val verilogFilename: String = "BlindModule.v"
override val ipxactDir: String = "./"
implicit val p: Parameters = Parameters.root((new freechips.rocketchip.coreplex.BaseCoreplexConfig).toInstance)

val blindNodes = DspBlockBlindNodes.apply(
AXI4StreamBundleParameters(n = 8),
() => AXI4MasterNode(Seq(AXI4MasterPortParameters(Seq(AXI4MasterParameters("fir"))))))

val dut = () => {
val lazyMod = LazyModule(DspBlock.blindWrapper(() => new FIRBlock(4, 8), blindNodes))
val m = lazyMod.module
IPXactComponents._ipxactComponents += DspIPXact.makeDspBlockComponent(lazyMod.internal)
m
}

chisel3.Driver.dumpFirrtl(chisel3.Driver.elaborate(dut), None)
chisel3.Driver.compileFirrtlToVerilog("BlindModule", new java.io.File(System.getProperty("user.dir")))
generateIPXact(IPXactComponents.ipxactComponents())
}
FIRGenerator.main(Array[String]())

# IPXact¶

Look in the file browser for a file called craft_BlindModule_edu.berkeley.cs_1.0.xml. This is the ipxact file. It contains information about:

• Port mappings
• Interfaces
• Memory maps
• Generator parameters

You'll notice that the parameters from the scala code

override def ipxactParameters = Map(
"nFilters"   -> nFilters.toString,
"nTaps"      -> nTaps.toString
)

appears in the IPXact output. This gives verification generators the information they need to generate appropriate test vectors for the given instance.

format: plain


text:
1:30 AM
@UlrikeFischer -- Some of them are a bit sketchy to be called "manuals", but nearly every package I've ever seen has a "user guide" -- and usually much more reliable than a random wiki. (But @DavidCarlisle wouldn't necessarily know. He claims to never read them.)
@ahorn -- Kopka & Daly is one of the best. I keep hoping that Patrick Daly will consider preparing a new edition; sadly, Helmut Kopka is no longer with us.

3 hours later…
4:47 AM
WElp, forgot to actually hit submit on my qeustion after writing it
That would help

5:45 AM
@Canageek lol

2 hours later…
8:14 AM
@barbarabeeton some packages have code that is so transparently clear that no documentation is necessary.

8:37 AM
@DavidCarlisle I particularly like code parts starting with
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname pdf@escapestring\endcsname\relax
@JosephWright didn't xetex get \pdfescapestring?

@UlrikeFischer No, it's not in (u)pTeX either so I did not do anything about it. As we can do it from the macro layer, I'm reluctant to ask/work on more primitives

@UlrikeFischer that's easy to read it is read as "Heiko's if undefined" :-)

@DavidCarlisle ;-).
@JosephWright ah, this means that if the experimental driver should work in the end with xetex too, I either need to put Heiko's code back, or find some alternative which does
\def\Hy@pstringdef#1#2{%
\begingroup
\edef~{\string~}%
\xdef\Hy@gtemp{\pdf@escapestring{#2}}%
\endgroup
\let#1\Hy@gtemp
}%
But it looks as if it should work with l3str-convert.

9:03 AM
@UlrikeFischer we should replace them with \@ifundefined (which in its new \ifcsname form is a better test anyway.

@DavidCarlisle I'm doing it already, when I get to one of them, at least in the driver code.
How does one do \edef~{\string~}% in expl3?

9:17 AM
@UlrikeFischer Yes, it should
@UlrikeFischer It's \char_set_active_eq:NN, with a suitable throw-away definition

@JosephWright yes just found it and pondering about the "throw-away definition".
:50371072 why \~?

@UlrikeFischer Actually, that won't work ...
\char_set_catcode_other:N \~
\char_set_active_eq:NN ~ \c_tilde_str
@UlrikeFischer ^^^ Can't have ~ as an N-type argument on it's own
@UlrikeFischer What's that code actually for?

@UlrikeFischer if ~ was etex \protected you wouldn't need to stringify it before the edef would you?

@JosephWright It's used in a lot of places, e.g. url, destination names, form fields.
@DavidCarlisle looks like it, with \protected\def~{\nobreakspace{}} I can use it directly in \edef\tmp{\pdfescapestring{abc~xyz}}\show\tmp.

9:32 AM
@UlrikeFischer Right, but it should be covered by l3str-convert

@JosephWright nice, \convert\tmp{ Café~some } { } { utf16/string } seems to do the right thing without any need to redefine ~.

@UlrikeFischer yes but question as always is do you want to pre-expand, so \def\foo{Café} then convert \foo~some if you want to expand \foo but not ~ there has to be some expansion control somewhere

9:50 AM
@DavidCarlisle I can find things like \Hy@pstringdef\Hy@pstringName{\HyperDestNameFilter{##3}}, so expanding is probably necessary.

4 hours later…
1:33 PM
Here is a similar example of that tikz vs spaceskip issue
\RequirePackage{fix-cm}
\documentclass[a4paper]{article}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}

\node[text width=15cm] at (0,0) {
\fontsize{25mm}{27mm}\sffamily\raggedright
15th Congress for\par
};

\node[text width=15cm] at (0,-8) {
\fontsize{25mm}{27mm}\sffamily\raggedright
\spaceskip0pt%
\xspaceskip0pt%
15th Congress for\par
};
\end{tikzpicture}
\end{document}
When I'm doing something fast, I never consider adding the font stuff as options to the node.

2:03 PM
Would someone be so kind to fix the link in this answer: tex.stackexchange.com/posts/151806/edit ... following line: _You may also like to read further in my german blog: [TeX-Beispiel des Monats „Layout II: Kopf- und Fußzeilen“](http://tobiw.de/tbdm/layout-2)._ ... where the “ ended up in the URL field instead of the link text. It's below the silly 6-character-minimum since I lack the reputation on this SE site. (Mine already contains the necessary correction)

2:23 PM
@0xC0000022L Done :-)

Thanks

2 hours later…
4:31 PM
any professional journal typesetters here?

5:02 PM
@EmilioPisanty Not at the moment, but you can ask.

@egreg my journal of choice has turned all my \hats into \widehats
the proofs system allows me to edit the TeX for the equations, so I just reverted all of them back to \hats
is this the kind of thing that's going to get the typesetter super annoyed at me?
it was mostly $\widehat{\mathbf u}$, $\widehat{\mathbf e}$, $\widehat{\mathcal G}$ type of stuff

@EmilioPisanty Possibly. Apparently they're the kind of people who thinks that large things look better (they don't).

@egreg thanks =).
I mean, I'm right, right?

@EmilioPisanty Definitely

=)
I'll just roll those dice and see what happens
thx =)

5:08 PM
@EmilioPisanty ^^^^^ Nobody should have doubts, except, perhaps, for the calligraphic G.

@egreg maybe they really like Asian conical hats?

@EmilioPisanty That might be the reason! :-D

there was also a $\tilde{\mathbf E}$ to $\widetilde{\mathbf E}$, which, seriously

@egreg bf, not bb

5:12 PM
@EmilioPisanty ^^^ No doubt either that the left one is better. With \mathbf it's essentially the same.

hmmm. $\widetilde{\mathbf E}$ vs $\displaystyle \widetilde{\mathbf E}$
dunno
at the very least it looks different on MathJax
ultimately what matters is the journal pdf, which isn't super sexy either

@EmilioPisanty It is font dependent, that's true.

the journal pdf

5:39 PM
@EmilioPisanty WOW!

5:56 PM
@EmilioPisanty The \sim above the E looks an eyebrow and makes the E looks really angry with what they done to him :-)
3

6:19 PM
@EmilioPisanty why not just do \let\widehats\hats and then they can decide if they really want it

1 hour later…
7:21 PM

2 hours later…
9:17 PM
In the light of tomorrow's birthday of Richard Wagner, Tikzducks Production proudly presents an excerpt from the latest production of the Valkyrie (Ring der Nibelungen):
@Skillmon ^^^ you should look carefully ;-)
@CarLaTeX ^^

9:46 PM
@UlrikeFischer oh, Bayreuth is mentioned :)

@Skillmon did you really look at the audience?

@UlrikeFischer yes, I did, did I overlook something (except the background image)?

@Skillmon left, second row.

@UlrikeFischer now that you pointed on it, there is a Vizzerdrix (my avatar) put there!
@UlrikeFischer can I star this twice?
2

@Skillmon ;-)

9:59 PM
@UlrikeFischer Oooh


text:
# How am I using the inclusion-exclusion principle wrongly?

I was trying to solve this problem (taken from Harvard's Stat 110 class) using the inclusion-exclusion principle:

A city with 6 districts has 6 robberies in a particular week. Assume the robberies are located randomly, with all possibilities for which robbery occurred where equally likely. What is the probability that some district had more than 1 robbery?

Here's how I tried to approach the problem:

Define $A_i$ as the event that more than $1$ robbery occurs in district $i$, with $1 \leq i \leq 6$.

Then, what we need to find is $P(A_1 \cup A_2 \cup A_3 \cup A_4 \cup A_5 \cup A_6)$.

By the inclusion-exclusion principle, this is equal to $\Sigma_{i=1}^{6}P(A_i)$ $-$ $\Sigma_{i<j} P(A_i \cap A_j)$ $+$ $\Sigma_{i<j<k} P(A_i \cap A_j \cap A_k)$ (the terms involving more than $3$ $A_i$s are not possible because there are only 6 robberies, and we can't have more than $1$ of them, when there are $>3$ districts).

Now, $\Sigma_{i=1}^{6}P(A_i) =$ $6 \times \frac{5}{6}$, since $2,3,4,5,$ or $6$ robberies can happen in each of the $6$ districts.

Also, $\Sigma_{i<j} P(A_i \cap A_j)$ = $6\choose2$ $\times$ $\frac{6}{36}$, since for each of the $6\choose2$ pairs of districts, the robbery counts can be $\{(2,2),(2,3),(2,4),(3,2),(3,3),(4,2)\}.$

Counting in a similar fashion, $\Sigma_{i<j<k} P(A_i \cap A_j \cap A_k) =$ $6\choose3$ $\times$ $\frac{1}{216}$.

But adding the above three terms gives me a probability greater than $1$. Where am I going wrong?

• 1 minus the probability that no district had more than one robbery. – IntegrateThis Oct 13 '17 at 7:01
• What makes you think that $P(A_1)=\frac56$? If $R_1$ denotes the number of robberies in district 1 then $P(A_1)=1-P(R_1=0)-P(R_1=1)$. Here e.g. $P(R_1=0)=\left(\frac56\right)^6$ – drhab Oct 13 '17 at 7:05
• But these events are not equiprobable. – drhab Oct 13 '17 at 7:09
• @IntegrateThis Of course, but that is not what the OP is after. He wants to know what he/she did wrong in applying inclusion/exclusion. – drhab Oct 13 '17 at 7:11
• @Zephyr: No district can have $0$ robberies in the complement, because you need to add up to get $6$ robberies and that's not possible with even a single district having $0$ robberies, when you are only allowed $0$ or $1$ robberies per district. – Train Heartnet Oct 13 '17 at 10:22

Personalize the robberies with the robbers.

There are $6$ of them. Each of them picks out randomly a district saying: "Yes, that will be the place for me to rob, hahaha..."

They know nothing about their colleague robbers and choose completely independent.

Then what is the probability that more than $1$ robbers will choose for district 1?

It is $1$ minus the probability that exactly $0$ robbers or exactly $1$ robber will choose for district 1.

District 1 will receive $0$ robberies if all robbers choose for another district. The probability that the first robber will do that is $\frac56$, the probability that the second will do that is also $\frac56$, et cetera.

Then the probability that all will do that is $\left(\frac56\right)^6$.

Likewise (but a bit more complicated) we can find that the probability that exactly one robber will choose for district 1 is $6\left(\frac16\right)\left(\frac56\right)^5$ so we end up with: $$P(A_1)=1-\left(\frac56\right)^6-6\left(\frac16\right)\left(\frac56\right)^5$$

• Aha, I get it now! So the reason why the numbers aren't equally likely is because the numbers ultimately depend on how the robbers decide to choose which districts to rob, and this ultimately depends on the number of robbers! I feel so dumb now! Thank you, @drhab! :) – Train Heartnet Oct 13 '17 at 7:47
• You are very welcome. If people really learn things then my time is not "robbed" but well spended. – drhab Oct 13 '17 at 7:49

The error in the OP's use of inclusion-exclusion has been addressed in drhab's answer, so I'll merely note that this problem does not require inclusion-exclusion at all. Because there are the same number of robberies as districts, the only way to avoid having two robberies in some district is to have exactly one robbery in each district, so we can jump immediately to the answer

$$1-{6!\over6^6}$$

or, if you prefer,

$$1-\left(5\over6\right)\left(4\over6\right)\left(3\over6\right)\left(2\over6\right)\left(1\over6\right)$$

(That is, to avoid two robberies in some district, the first robbery can occur anywhere, but subsequent robberies must occur in a remaining, unrobbed district.)

Although there are much more efficient ways to solve this problem, inclusion-exclusion can be made to work. The answer of drhab gives $P(A_1)$. Of the other terms needed, $P(A_1\cap A_2\cap A_3)$ is not very involved: it's just $\frac{6!}{2!\,2!\,2!}\frac{1}{6^6}$. The hard one is $$P(A_1\cap A_2)=\left(\binom{2}{1}\frac{6!}{4!\,2!}+\frac{6!}{3!\,3!}+\binom{2}{1}\binom{4}{1}\frac{6!}{3!\,2!\,1!}+\binom{4}{1}\frac{6!}{2!\,2!\,2!}+\binom{4}{2}\frac{6!}{2!\,2!\,1!\,1!}\right)\frac{1}{6^6},$$ which can also be done by complement using a second application of inclusion-exclusion: \begin{aligned} P(A_1\cap A_2)=1&-2\left(\left(\frac{5}{6}\right)^6+6\left(\frac{1}{6}\right)\left(\frac{5}{6}\right)^5\right)\\&+\left(\frac{4}{6}\right)^6+2\cdot6\left(\frac{1}{6}\right)\left(\frac{4}{6}\right)^5+\frac{6!}{1!\,1!\,4!}\left(\frac{1}{6}\right)\left(\frac{1}{6}\right)\left(\frac{4}{6}\right)^4. \end{aligned}


text:
# Perl Variables for Any Question Type

The following reserved Perl variables are used to return information or set behaviors in questions that you create in WebAssign.

These variables can be used in all questions.

Variable

Description

$ASSIGNMENT_ID Returns current assignment ID. $CORRECT

Returns true (1) if student's response is correct.

$DEPLOYMENT_ID Returns the unique identifier for this scheduled instance of this assignment. Not the same as the assignment ID. $EMAIL

Returns the email address of the student completing the question.

$FULLNAME Returns the full name of the student completing the question. $HINT

Set the hint to be displayed.

$CORRECT_HINT Set the hint to be displayed after a correct response. $HINT_ON_CORRECT

Set to displays available hints even when your student's response is correct.

$pi Returns a calculated value of pi. $POINTS

Returns point value of question part.

$QUESTION_ID Returns the current QID. $QUESTION_NUM

Returns current question number on assignment.

$RESPONSE_NUM Returns number of submissions made. $STUDENT

Returns unique ID of the student completing the question.

$THIS_SCORE Set to override question part score. $THISBOXNAME

Returns full name of answer box, for example, RN_355_1_0_83 is the box name for a random numerical box of question ID 355. It is the first part (0) of the first question (1) on the assignment and 83 is the random seed.

$thisresponse Returns student's response for the answer box. Important: Changing the value of this variable can cause your student's answer to be graded incorrectly. $TOOLTIP

In Answer, customizes or hides answer format tip for one answer box, for example, $TOOLTIP='Enter a whole number'. To hide the answer format tip for an answer box, set $TOOLTIP=' ' (with a space).


text:
# Solution to a second order differential equation

• I
I have currently been reading a book called 'Mathematical Methods In Physical Sciences'. Whilest I was looking at the differential section I came across a differential which I have never thought about before, which is of the form:
----------------------------------------------------------------------------------------------------------------------------------------
Directly from book

$$m\left(\frac{d^2y}{dt^2}\right)\pm l\left(\frac{dy}{dt}\right)^2+ky=0$$

where the plus or minus sign must be chosen correctly at each stage of the motion
so that the retarding force opposes the motion. Let us solve the following special
case of this problem. Discuss the motion of a particle which is released from rest at
the point y = 1 when t = 0, and obeys the equation of motion

$$4\left(\frac{d^2y}{dt^2}\right)\pm 2\left(\frac{dy}{dt}\right)^2+y=0$$
-----------------------------------------------------------------------------------------------------------------------------------------

And whilst I was reading how to solve it but it sort of breaks off, it starts explain the Bernoulli method then talks about the transcendental function, as stops. The actual equation in referring damped harmonic motion on a spring except that drag force is now of the form ##F=-bv^2## I assume. So I have tried to do a bit of research and not come up with much, I did think this could be done numerically by series solutions but I am interested to how this equation is solved through transcendental methods, and was wondering if some could explain the the approach on how to solve or even refer me to a bit of literature that could help me understand. This is my first time really tackling this type of differential so it a new concept and one I would like to understand.

Last edited:

Is ##y## a function of ##x##? Or is it an independent variable?

Is ##y## a function of ##x##? Or is it an independent variable?
In there example y is the height to which the a particle from rest is released at t=0, also sorry I write the equation in the book form to make it clearer.

My approach would be the following: you can try making the substitution ##p = \frac{dy}{dt}##. Using chain rule, you can find that ##\frac{dp}{dt} = \frac{dp}{dy}\frac{dy}{dt} = p \frac{dp}{dy}##. This gives you

$$4p \frac{dp}{dy} \pm 2 p^2 +y = 0$$

This is now a first-order equation. Try and solve it from here. Hope this helps, and hopefully it's what you were looking for.

Divide through by ##4p##.

Last edited:


text:
# Trig Equation

• Jan 1st 2013, 02:59 PM
kinhew93
Trig Equation
3sin(2A) = sin(A)

There are a number problems like this in my textbook and I am able to solve them, but I always end up with a polynomial in some trig function. I wanted to know if there were any less time consuming approaches to this question?

Here's what I did for the above example:

3sin(2A) = sin(A)

6sin(A)cos(A) = sin(A)

6(1-cos^2(A))(cos(A)) = 1 - cos^2(A)

6cos^3(A) - cos^2(A) - 6cos(A) + 1 = 0

and then solved to find cos(A).

I have a feeling that I am making the question more time-consuming than neccessary - is there a simpler approach?
• Jan 1st 2013, 03:14 PM
Soroban
Re: Trig Equation
Hello, kinhew93!

Your substitution is incorrect: . $\sin A \:=\:\sqrt{1-\cos^2\!A}$

Quote:

$3\sin2A \:=\: \sin A$

I would solve it like this . . .

n . . . . . . . . . $6\sin A\cos A \:=\:\sin A$

. . . . . $6\sin A\cos A - \sin A \:=\:0$

Factor: . $\sin A(6\cos A - 1) \:=\:0$

. . $\sin A \:=\:0 \quad\Rightarrow\quad \boxed{A \:=\:\pi n}$

. . $6\cos A - 1 \:=\:0 \quad\Rightarrow\quad \cos A \:=\:\tfrac{1}{6} \quad\Rightarrow\quad \boxed{A \:=\:\cos^{-1}\left(\tfrac{1}{6}\right) + 2\pi n}$
• Jan 1st 2013, 03:37 PM
kinhew93
Re: Trig Equation
Quote:

Originally Posted by Soroban
Hello, kinhew93!


text:
# Free fall

This is just elementary calculus, but it is harder than I thought at first glance. A friend told me that there is no formula expressing the altitude of a falling body if you is the inverse square law for the force, rather than making the approximation of a constant gravitational field. As far as I am able to tell, he is right. One can however compute some things.

We study the motion of a mass $m$, moving along an axis, whose position is denoted by $x(t)$. At the time $t=0$, the mass is at rest in the position $x(0)=x_0$. There is a mass $M$, at the position $x=0$, that does not move and attracts $m$ by a force $f$ given by the inverse square law:
$\displaystyle f=-\frac{GMm}{x^2},$
$G$ being the gravitational constant.

Let us write the conservation of the mechanical energy for the mass $m$: at any time $t\ge 0$,
$\displaystyle \frac{1}{2}mx'(t)^2-\frac{GMm}{x(t)}=-\frac{GMm}{x_0}.$
We consider a falling body, therefore $x'(t)\le 0$, and thus
$x'(t)=-\sqrt{2GM}\sqrt{\frac{1}{x(t)}-\frac{1}{x_0}},$
This yields
$-\frac{x'(t)}{\sqrt{\frac{1}{x(t)}-\frac{1}{x_0}}}=\sqrt{2GM},$
and therefore
$\displaystyle -\frac{x'(t)x(t)}{\sqrt{x(t)(x_0-x(t))}}=k, (1)$
with
$\displaystyle k=\sqrt{\frac{2GM}{x_0}}$
To find $t$ as a function of $x(t)$, we compute
$\displaystyle \int\frac{x\,dx}{\sqrt{x(x_0-x)}}.$
We have
$\displaystyle \frac{x\,dx}{\sqrt{x(x_0-x)}}=\frac{-(-2x+x_0)}{2\sqrt{x(x_0-x)}}+\frac{x_0}{2\sqrt{x(x_0-x)}},$
and therefore
$\displaystyle \int\frac{x\,dx}{\sqrt{x(x_0-x)}}=-\sqrt{x(x_0-x)}+\frac{x_0}{2}\int \frac{dx}{\sqrt{x(x_0-x)}}.$
We make the change of variable $x=\frac{x_0}{1+u^2}$, which gives
$\displaystyle dx=\frac{2x_0u\,du}{(1+u^2)^2}$
and
$\displaystyle \sqrt{x(x_0-x)}-x_0\arctan\left(\sqrt{\frac{x_0}{x}-1}\right).$
We obtain
$\displaystyle \int\frac{x\,dx}{\sqrt{x(x_0-x)}}=-\sqrt{x(x_0-x)}-\frac{x_0}{2}\int_{u=\sqrt{\frac{x_{0}}{x}-1}} \frac{2\,du}{1+u^2}$
and finally
$\displaystyle \int\frac{x\,dx}{\sqrt{x(x_0-x)}}=-\sqrt{x(x_0-x)}-x_0\arctan\left(\sqrt{\frac{x_0}{x}-1}\right)+C.$
We now integrate  $(1)$ between $0$ and $t$:
$\displaystyle k\,t=\sqrt{x(x_0-x)}+x_0\arctan\left(\sqrt{\frac{x_0}{x}-1}\right). (2)$
This gives us the duration of the fall as a function of the position of the falling mass $m$.

We can find another formula for the antiderivative. Let us make the change of variable $x=x_0\frac{1+\cos(u)}{2}=x_0\cos^2\left(\frac{u}{2}\right)$. Then
$dx=-x_0\sin\left(\frac{u}{2}\right)\cos\left(\frac{u}{2}\right),$ and
$\displaystyle \sqrt{x(x_0-x)}=x_0\sqrt{\cos^2\left(\frac{u}{2}\right)\left(1-\cos^2\left(\frac{u}{2}\right)\right)}=x_0\sin\left(\frac{u}{2}\right)\cos\left(\frac{u}{2}\right),$
$u$ being taken between $0$ and $\pi$. We obtain
$\displaystyle\int\frac{x\,dx}{\sqrt{x(x_0-x)}}=-\sqrt{x(x_0-x)}-\frac{x_0}{2}\int_{u=2\arccos\left(\sqrt{\frac{x}{x_0}}\right)} du,$
and therefore
$\displaystyle k\,t=\sqrt{x(x_0-x)}+x_0\arccos\left(\sqrt{\frac{x}{x_0}}\right), (3)$
which is the answer that can be found in Wikipedia. Taking $x=0$, we obtain the free-fall time $t_f$, the time it takes for the falling mass to reach the center of attraction:
$\displaystyle t_f=\frac{\pi}{2}\sqrt{\frac{x_0^{3}}{2GM}}.$

How does we find these changes of variable (this is the only tricky part in these calculations)? Well, if we set $y=\sqrt{x(x_0-x)}$, the points $(x,y)$, with $x$ in $[0,x_0]$, are on the circle of radius $x_0/2$ centered at $(x_0/2,0)$. Now if $(x(u),y(u))$ is a parametric representation of this circle, the change of variable $x=x(u)$ allows us to write
$\displaystyle \int \frac{dx}{\sqrt{x(x_0-x)}}=\int_{u=x^{-1}(x)}\frac{x'(u)\,du}{y(u)}.$
In the first change of variable, we used a parametrization of the circle by rational functions:
$\displaystyle\left\{\begin{array}{lcl} x(u)&=&\frac{x_0}{1+u^2};\\ y(u)&=&\frac{x_0\,u}{1+u^2}. \end{array} \right.$
In the second, we used a parametrization by trigonometric functions:
$\displaystyle\left\{\begin{array}{lcl} x(u)&=&x_0\frac{1+\cos(u)}{2};\\ y(u)&=&\frac{x_0}{2}\sin(u). \end{array} \right.$
Both are natural choices (the second maybe more so than the first), and both produce a simple result.

If we set
$\displaystyle F(\xi)=\xi\sqrt{1-\xi^2}+\arccos(\xi),$
we obtain
$\displaystyle k\,t=x_0\,F\left(\sqrt{\frac{x}{x_0}}\right)$
and thus
$\displaystyle x(t)=x_0\,\left(F^{-1}\right)^2\left(\frac{k\,t}{x_0}\right). (4)$
Indeed, $F$ is continuous on $[0,1]$, differentiable on $[0,1[$, and
$\displaystyle F'(\xi)=\sqrt{1-\xi^2}-\frac{\xi^2}{\sqrt{1-\xi^2}}-\frac{1}{\sqrt{1-\xi^2}}=\frac{-2\,\xi^2}{\sqrt{1-\xi^2}}.$
Therefore $F$ is decreasing, and thus a bijection from $[0,1]$ to $[0,\pi/2]$. Its inverse $F^{-1}$ is continuous on $[0,\pi/2]$ and differentiable on $]0,\pi/2[$.

On the other hand, if we set
$\displaystyle G(\xi)=\frac{\xi}{1+\xi^2}+\arctan(\xi),$
we obtain
$k\,t=x_0\,G\left(\sqrt{\frac{x_0}{x}-1}\right)$
and thus
$\displaystyle x(t)=\frac{x_0}{1+\left(G^{-1}\right)^{2}\left(\frac{k\,t}{x_0}\right)}.$
The function $G$ is continuous and differentiable on $\mathbb{R}$ and
$G'(\xi)=\frac{2}{(1+\xi^2)^2}.$
Its is therefore a diffeomorphism from $\mathbb{R}$ to $]-\pi/2,\pi/2[$. Let us denote by $g$ the inverse $G^{-1}$. It satisfies the differential equation
$\displaystyle g'(\zeta)=\frac{1}{2}+g(\zeta)^2+\frac{1}{2}g(\zeta)^4,$
with $g(0)=0$. In particular, $g'(0)=1/2$. This, taken with Equation $(4)$, implies that
$\displaystyle x(t)=x_0\left(1-\frac{k^2t^2}{4x_0^2}+O\left(\frac{k^3t^3}{x_0^3}\right)\right)$
for $t$ close to $0$. We have approximately
$\displaystyle x(t)\simeq x_0-\frac{1}{2}\gamma_0t^2,$
whith
$\displaystyle \gamma_0=\frac{GM}{x_0^2}.$
The right-hand side is the result that we would obtain for a constant gravitational field $\gamma_0$.

We have
$\displaystyle \lim_{\zeta\to \pi/2}g(\zeta)=+\infty.$
Since
$\displaystyle G(\xi)=\frac{\xi}{1+\xi^2}+\arctan(\xi)=\frac{\pi}{2}-\frac{1/\xi}{1+(1/\xi)^2}-\arctan(1/\xi),$
we have
$\displaystyle \zeta=\frac{\pi}{2}-\frac{1/g(\zeta)}{1+(1/g(\zeta))^2}-\arctan(1/g(\zeta))\\ = \frac{\pi}{2}-\frac{1}{g(\zeta)}-\frac{1}{g(\zeta)^3}-\frac{1}{g(\zeta)}+\frac{1}{3\,g(\zeta)^3}+o\left(\frac{1}{g(\zeta)^3}\right)\sim -\frac{2}{3\,g(\zeta)^3},$
and therefore
$\displaystyle g(\zeta)\sim \left(\frac{3}{2}\left(\frac{\pi}{2}-\zeta\right)\right)^{-1/3}.$
Therefore, when $t$ tends to $t_f$,
$\displaystyle x(t)\sim x_0\left(\frac{3}{2}\left(\frac{\pi}{2}-\frac{k\,t}{x_0}\right)\right)^{2/3}=\left(\frac{9GM}{2}\right)^{1/3}(t_f-t)^{2/3}.$
Using the differential equation, we also find
$\displaystyle x'(t)\sim-\sqrt{2GM}\left(\frac{9GM}{2}\right)^{-1/6}(t_f-t)^{-1/3}\\ =-\frac{2}{3}\left(\frac{9}{2}\right)^{1/3}(GM)^{1/3}(t_f-t)^{-1/3},$
which is what we would obtain by formally differentiating the equivalent.

The free-fall time can be rewritten
$\displaystyle t_f=\frac{\pi}{2}\sqrt{\frac{x^{2}}{2GM}}\,\frac{x_0}{x}\sqrt{x_0}=\frac{\pi x_0}{2x}\sqrt{\frac{x_0}{2\gamma}}$
with $\gamma$ the accelaration of gravity at the altitude $x$. How many time does it take to fall from the altitude of the Moon? We take $x$ to be  the radius of the Earth, and $x_0$ is the distance form the Earth to the Moon. Wikipedia gives
$x_0=384399$ kilometers, $x=6378$ kilometers and $\gamma=9.780327$ meters per second squared. We find roughly $116$ hours, which is to say four days and twenty hours.

The Wikipedia article I linked above gives two references for the free fall:

1. From Moon-fall to motions under inverse square laws, by S. K. Foong, European Journal of Physics, 2008 29: 987–1003;
2. Radial motion of Two mutually attracting particles, by Carl E. Mungan, The Physics Teacher, 2009, 47: 502-507.

I skimmed the first article (unfortunately it is behind a paywall, but I could get access with my university subscription). The formula for $x \ll x_0$ and the numerical value for the free fall time from the orbit of the moon agree with what I found. There is also a series expansion, and probably other stuff. I will read in detail later.


text:
# Tag Info

## New answers tagged classical-cipher

0

It works with autokey system because the key itself have a bias : in the key is much more E than other letters (this is a natural consequence of using a clear text as key).

1

Assume the length is $n$. If the cipher text is $c_0, c_1, c_2, \ldots, c_N$ then consider the sub-text consisting of the characters $c_0, c_n, c_{2n},\ldots$. These have all been encrypted with the same Caesar, and you can break it by frequency analysis (the shifted 'e' should be the most common in standard English texts, or else maybe the 't' etc.). ...

Top 50 recent answers are included


text:
# How to add/sum up series?

If you want to sum values across few series, there are two main ways to achieve this:

### 1. Formula language

You can sum multiple series by typing a simple expression with the '+' sign.

It will add up only common part for all series.

### 2. Cross Section analysis

Use the Cross section analysis to calculate a sum across series. This is a good option if you want to summarize a lot of series since you can easily include several series at once.

Cross section Sum option works the same as adding series using '+' sign. However, it is worth noting that the result will differ if you untick 'Include only observation where there are values for all series' option. Then Cross section will add values at all available points in time.

### Sum(series) formula

In case you want to sum values of one series Sum(series) formula will be helpful. It only sums the values of one series, the output would be a repeated value for all observations, because it returns the sum of all the numbers in the series.


text:
## janessia Group Title Find the distance between the pair of parallel lines, y = -2x+1 & y = -2x+16. Choose one answer. a. square root of 45, or appx 6.7 b. 15 c. square root of 54, or appx 7.3 d. square root of 50, or appx 7.1 one year ago one year ago

1. robinfr93 Group Title

Distance between two parallel line is given by the algorithm $\left| c1-c2\div \sqrt{a ^{2}+ b ^{2}} \right|$

2. robinfr93 Group Title

let me give you a hint, the answer will be in square root. :)

3. janessia Group Title

lol thanks tht narrows it down

4. janessia Group Title

wat does c1 and c2 stand for? what do i plug in there?

5. robinfr93 Group Title

your most welcome... and remember since both the lines are parallel the value of a and b in both the equation will always be the SAME!!!

6. robinfr93 Group Title

c1 is the constant of the first equation and c2 s the constant of second equation.. since your using modulus,i.e,absolute value of it.. IT doesn't matter which equation you choose as first or second..

7. janessia Group Title

ohk


text:
07/29/21

#### help with solving in math

Salma will rent a car for the weekend. She can choose one of two plans. The first plan has an initial fee of $47.98 and costs an additional$0.16 per mile driven. The second plan has an initial fee... more

07/29/21

#### find y intercept and vertex math

Consider the following equation:f(x)=4-x2-8x1)    Find the y-intercept.2)    Find the vertex.

07/29/21

#### Plz help me find y intercept and vertex

Consider the following equation:f(x)=4-x2-8x1)    Find the y-intercept.2)    Find the vertex.

07/29/21

In the triangle below, suppose that m∠W=(7x-5)° , m∠X=(3x-2)°, and =m∠Y=x°Find the degree measure of each angle in the triangle.

07/29/21

#### Plz help math problem finding functions

Consider the following functions. f(x)=5x+7 and g(x)=x+31)  Find (f+g)(x)2)  Find (f+g)(3)

07/29/21

The container that holds the water for the football team is 1/4 full. After pouring in 9 gallons of water, it is 5/8full. How many gallons can the container hold?

07/29/21

A company has recently been hiring new employees. Today the company has 15% more employees than it did a year ago. If there are currently 66,700  employees, how many employees did the company have... more

07/29/21

A table is on sale for 36% off. The sale price is \$368.What is the regular price?

07/29/21

#### I need help with this SAT question.

If 4m-2n=10, what is the value of 81m/9n ?A. 310B. 94C. 272D. 812

07/29/21

#### Algebra word problem plz help

Nina loves chocolate milk. She has one bottle of milk that is 60% chocolate and another bottle of milk that is 40% chocolate. How much of each does she need to mix if she wants to have 1000 mL of... more

07/29/21

#### which is bigger and why? 7/15 or 22/45

which is bigger and why? 7/15 or 22/45

07/29/21

#### find the greatest common factor and least common multiple for 48 and 72.

find the greatest common factor and least common multiple for 48 and 72.

07/29/21

#### Math word problem plz help

Nina loves chocolate milk. She has one bottle of milk that is 60% chocolate and another bottle of milk that is 40% chocolate. How much of each does she need to mix if she wants to have 1000 mL of... more

07/29/21

#### use the prime factorization method to reduce the fraction below. 420/2520

use the prime factorization method to reduce the fraction below. 420/2520

07/29/21

#### use the prime factorization method to reduce the fraction below. 420/2520

use the prime factorization method to reduce the fraction below. 420/2520

07/29/21

#### Four- sevenths of the children in class earned A's on the last math test. 18 children did not earn an A. How many earned A's?

Four- sevenths of the children in class earned A's on the last math test. 18 children did not earn an A. How many earned A's?

07/29/21

#### Solve the following formula for X

a= x+y over t. Must show work

07/29/21

07/28/21

#### Convert the following fraction to a decimal and a percentage without using long division. 9/50

Convert the following fraction to a decimal and a percentage without using long division.9/50

## Still looking for help? Get the right answer, fast.

Get a free answer to a quick problem.
Most questions answered within 4 hours.

#### OR

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.


text: The total number of... Three. For example, a triangle has zero diagonals and a rectangle has two.) Favorite Answer. How many sides does the polygon have? Ans. 5. There are several formulas for the rhombus that have to do with its: Sides (click for more detail). Finding length of MZ. The number of triangles is one more than that, so n-2. But because a polygon can’t have a negative number of sides, n must be 15. In Euclidean plane geometry, a quadrilateral is a polygon with four edges (sides) and four vertices (corners). interior angles of a triangle (a) 2 (b) 0 (c) 4 (d) 9. A polygon has 12 edges. victoriakirkman1. If you want to know more interesting information about this question or want to know from where we got this answer then you can go to the link below. Polygons are classified by the number of sides. (A) 54 (B) 66 (C) 108 (D) 132 (E) 144 Here we have 4 times 1, but that does not … How to remember? There are only two diagonals in a square which bisect each other in the center of the square.You can... How Many Vertices,faces,and Edges Does A Triangle Have? As I circle the room, I make sure they are clear about organizing their results in an In/Out table with the In being the number of sides the polygon has and the Out as the number of diagonals. ABCD is a parallelogram with diagonals AC and BD which intersect at point O. Which is the largest island of the Inner Hebrides? Does my boyfriend still love me, what should I do? ... Emma is going camping each side triangle of hurt it is 5 feet tall the square base 4 feet wide what is the surface area of her tent. If a polygon has 44 diagonals, how many sides does it have… Diagonals bisect vertex angles. 1 decade ago. (Make a non … This line cannot touch or cross any of the edges of the shape. The diagonals of a square are the line segments that link opposite vertices of … Here, AC and BD are two diagonals. How Many Lines Of Symmetry Does A Isosceles Triangle Have? Explain The Impact Of Inflation On Economic Efficiency? From one of the n vertices, you can draw diagonals to all other vertices except the adjacent ones. After doing some research, I found out that the number of diagonals of an n-sided polygon = $\frac{n(n-3)}{2}$. Heptagons have 14 diagonals. Source(s): geonetry class!! 0 B. 180(n-2). An octagon has 20 diagonals. This is because a diagonal is drawn between two vertices that are not adjacent to each other. How many different diagonals does it have? View Answer Find the interior and exterior angles of a 9-sided polygon. A diagonal connects any two non-consecutive vertices of a polygon. (Remember a rectangle is a type of parallelogram so rectangles get all of the parallelogram properties) If MO = 26 and the diagonals bisect each other, then MZ = ½(26) = 13 How many diagonals does a triangle have? It doesn't matter how long the length of each side is or how it's shaped - it will always be three.... How Many Perpendicular Lines Does A Square Have? Therefore, number of diagonals = \\frac{63 * 60}{2}\\) = 1890. By definition, it has n sides. Show Answer. Here are some related questions which you might be interested in reading. Since there would be no diagonal drawn back to itself, and the diagonals to each adjacent vertex would lie on top of the adjacent sides, the number of diagonals from a single vertex is three less the the number of sides, or n-3. 1) Regular pentagon P has all five diagonals drawn. Relevance. A rhombus is a type of parallelogram, and what distinguishes its shape is that all four of its sides are congruent.. Question 2: How many sides does a triangle have? Choice B is … A scalene triangle, like any other triangle, has zero diagonals. How many diagonals does a 27-gon have? Do you think the conflict has made life better or worse for the Iraqi people? How Has Your Dog, Cat, Or Any Pet Enriched Your Life? The triangles are created by drawing the diagonals from one vertex to all the others. How many diagonals does a decagon have? A polygon is such that when all diagonals from one vertex are drawn, eleven triangles are formed. What is the angle between two of these diagonals where they meet at a vertex of the pentagon? Formula for calculating number of diagonals of any polygon of n sides = n*(n - 3)/2. This line cannot touch or cross any of the edges of the shape. a triangle has 3 (3−3)/2 = 3×0/2 = 0 diagonals. Answer: (d) Question 10. (a) Find. Answer Save. All 4 sides are congruent. We know that all heptagons (or septagons) have 7 sides, so we can plug that into our formula: (180 ° × 7) - 360 ° 7 = 1260 ° - 360 ° 7 = 900 ° 7 ≈ 128.5714 ° Heptagon Diagonals. For a pentagon with 5 sides, we have 3 triangles, for a hexagon with 6 sides, we can... See full answer below. You know what the formula for the number of diagonals in a polygon is, and you know that the polygon has 90 diagonals, so plug 90 in for the answer and solve for n: Thus, n equals 15 or –12. But remember that this includes the sides, not just the diagonals. Now you can use this answer in my Telenor app quiz question. There are many types of quadrilaterals. It has 1 line of symmetry. Leave a Comment Cancel reply. 20 to the equivalent to R and it's exponent... How Many Diagonal Should A 40 Sided Polygon Have? Hi Karan, I can show you a way to count them yourself and help you discover an expression that will work for any convex polygon. and the diagonals to each adjacent vertex would lie on top of the adjacent sides, As you can see, a diagonal of a square divides it into two right triangles,BCD and DAB. Diagonal of Square. 6; 3; 7; 9; Ans: 3. Comment. 3. One way to see this is to notice that you can draw (n-3) diagonals from every vertex of the polygon. 4. Hence, n = 63. The number of diagonals of an n-sided convex polygon = \\frac{n(n - 3)}{2}\\) This polygon has 63 sides. 4. It can have no diagonals.A triangle has 0 diagonals. To find MZ, you must remember that the diagonals of a parallelogram bisect each other. In the figure above, click 'show both diagonals', then drag the orange dot at any vertex of the square and convince yourself this is so. What is the name of the polygon with 27 diagonals? Diagonals must be created across vertices in a polygon, but the vertices must not be adjacent to one another. For example, a triangle has zero diagonals and a rectangle has two.) How many diagonals does a triangle have? Generalizing for an n-gon A square has 2 diagonals, a regular pentagon has 5 and a regular hexagon has 9. So we have n times the quantity of n … Angles. So, number of vertices in a triangle well, that's just three. Since there would be no diagonal drawn back to itself, A rhombus is a type of parallelogram, and what distinguishes its shape is that all four of its sides are congruent.. A triangle has zero diagonals. lululama; Subjects. A triangle is a very basic shape in geometry. (A diagonal is a line drawn from one vertex to any other vertex inside the given shape. A polygon is such that when all diagonals from one vertex are drawn, eleven triangles are formed. What is the sum of the measures of the angles of a convex quadrilateral? Will this property hold if the quadrilateral is not convex? (Make a non-convex quadrilateral and try!) of a polygon. How many diagonals does a triangle have? Which continental South American country borders Panama? How Many Diagonals Does A Pentagonal Prism Have? How many sides does an n-gon have? Just open your Telenor my app and then open the menu “Test your skill” here you will find these questions. You have remembered the first formula correctly: it is n(n-3)/2. A diagonal joins a vertex to one of the vertices that do not include that vertex itself and the immediately adjacent vertices. Simply plug value of n into the formula , you get: 10*(10-3)/2 = 35. How many countries … 2. The number of diagonals we said was zero because there is no way for us to draw in a diagonal. The word … Section 6-5 24 Terms. Related Searches to A polygon has 77 diagonals.Determine the number of sides ? vertex to all the others. Also. how many sides does it have a polygon has 54 diagonals how many sides a polygon has 27 diagonals how many sides does it have diagonal of a polygon formula how to find number of sides with diagonals how many diagonals does a 14-gon have a polygon has 135 diagonals how many sides does … So here it's a decagon ,that is a 10 sided polygon, So n = 10. (Make a non-convex quadrilateral and try!) The number of triangles is one more than that, so n-2. (a) A convex quadrilateral (b) A regular hexagon (c) A triangle 3. How many diagonals does a hendecagon have? How many diagonals does each of the following have? It's been ten years since the US-led invasion of Iraq in 2003. Are you looking for Telenor my app quiz answers? A square or rectangular base has two diagonals, a pentagonal base has three diagonals, etc. Which is the largest island of the Inner Hebrides? I answered this question correctly. What fashion designer was responsible for the "New Look"? The problem is in a triangle all vertices are consecutive: there are no unconnected vertices. The Name Email Website. ; What Type of Angle? All 4 sides are congruent. To one side of each diagonal is a triangle, and you count of those: one to that side of the first diagonal, Will this property hold if the quadrilateral is not convex? Update: Geometry!!! (A) 12° (B) 36° (C) 54° (D) 60° (E) 72° 2) How many diagonals does a regular 20-sided polygon have? If all of the diagonals are drawn from a vertex of a pentagon, find how many triangles are formed. a triangle doesnt have any because a diagonal is a segment from one angle of a polleygon to another so a triangle cant have any. How many diagonals does each of the following have? In the case of an octagon, n equals eight, and so the equation would be 8(8-3)/2. Telenor Answers 13 December 2020. A triangle which has all the sides unequal is called scalene triangle. Telenor Answers 13 December 2020 201 views / Category: Science Share: More Questions: What is the fear of the color purple called? The sum of the interior angles of a 7-gon is. 150. An exterior angle of a regular polygon measures 30 degrees. How many diagonals does a trapezoid have? Telenor Answer 1:How many sides does a triangle have? How many different diagonals does it have? Exterior and Remote Interior Angles of a Triangle 17 Terms. (A) 54 (B) 66 (C) 108 (D) 132 (E) 144 The piramid has 5 faces and the triangle has 2 faces.... How Many Diagonals Per Vertex Does A Pentagonal Prism Have? By definition it is a three sided polygon figure. In a 42-gon, how many diagonals can you draw from any one vertex? 3. A triangle has no vertices that are more than one away from another. Therefor the interior angles of the polygon must be the sum of all the triangles' interior angles, or (a) A convex quadrilateral (b) A regular hexagon (c) A triangle. The slanted surfaces are always triangles and have no diagonals. 3. 4. Languages. Asked By adminstaff @ … A diagonal is the line that connects two vertices, or points where two sides connect. TutorsOnSpot.com. How Many Diagonals Does a Polygon Have_video narrative_investigation.MP4 I like to let my students work in small groups on this investigation. A triangle with side lengths of 2 cm, 2 cm, and 3 cm would not be scalene, since two of the sides have the same length. Q1: How many sides does a square have? Adjacent vertices are those which are not formed from the same line. Categories Telenor Quiz Post navigation. How many sides does the polygon have? Times 10 equals 70; each diagonal is counted twice, so the final answer is 35. a triangle has three diagonals as well as three sides What is true about the diagonals in an isosceles trapezoid? The word polygon is a combination of two Greek words: "poly" means many and "gon" means angle. The number of sides and vertices are equal in polygons. The sum of the measures of the interior angles is 1,440 degrees. the number of diagonals from a single vertex is three less the the number of sides, or n-3. (The lines connecting to the adjacent vertices are sides of the polygon, and we cannot call them diagonals). What is the sum of the measures of the angles of a convex quadrilateral? How many diagonals does a hexagon have? Can You Explain The Concept Of Inertial Inflation For Me? A regular polygon have minimum 3 sides. But since we've counted each one twice, it's really 54 divided by 2, or 27. A. (a) A convex quadrilateral (b) A regular hexagon (c) A triangle. No, an equilateral triangle has to be equiangular, but an equiangular triangle does NOT have to be equilateral You now know how to identify the diagonals of any polygon, what some real-life examples of diagonals are, and how to use the formula, # o f D i a g o n a l s = n ( n - 3 ) 2 , where n is the number of sides (or vertices) of the polygon. If it's known that each of the n vertices has exactly (n - 3) one-way-read diagonals to its name, then the n vertices would have a total of n (n - 3) two-way-read diagonals or just n (n - 3)/2 diagonals to name. (A) 60 (B) 120 (C) 170 (D) 240 (E) 400 Explanations to these practice problems will appear at the end of this blog article. Along with its angles, a polygon also has sides and vertices. 3 Answers. Each one is a line segment drawn between the opposite vertices (corners) of the square. 6. Ans :) (Note : no matter what sided polygon it is, you can find any no of diagonals in any polygon) [Exterior angle property] … Alphabetically they go 3, 2, none: Equilateral: "equal"-lateral (lateral means side) so they have all equal sides; Isosceles: means "equal legs", and we have two legs, right?Also iSOSceles has two equal "Sides" joined by an "Odd" side. 10. This can be used as another way to calculate the sum of the In the figure above, click 'reset'. You know what the formula for the number of diagonals in a polygon is, and you know that the polygon has 90 diagonals, so plug 90 in for the answer and solve for n: Thus, n equals 15 or –12. Since the diagonals of a rectangle are congruent MO = 26. (b) A regular hexagon has 9 diagonals. After all, 180 0 is the angle that stretches from one side of a straight line to another—so it’s kind of weird that that’s the number of degrees in the angles of a triangle.. What in the world does a triangle have … Yes, a scalene triangle can be a triangle. How many diagonals does a triangle have ? A polygon has 12 edges. The diagonal of the square is the hypotenuseof these triangles.We can use Pythagoras' Theoremto find the length of the diagonal if we know the side length of the square. Will this property hold if the quadrilateral is not convex? (a) 0 (b) 1 (c) 2 (d) 4. Other names for quadrilateral include quadrangle (in analogy to triangle), tetragon (in analogy to pentagon, 5-sided polygon, and hexagon, 6-sided polygon), and 4-gon (in analogy to k-gons for arbitrary values of k).A quadrilateral with vertices , , and is sometimes denoted as .. A triangle has zero diagonals. 13. The triangles are created by drawing the A triangle has only adjacent vertices. 13. Draw a The diagonals of a hendecagon, choose a vertex and call it P and the draw every diagonal from P to another vertex. If we have a square with 4 sides, then there are 2 triangles. Arts and Humanities. a polygon has 170 diagonals. 900. In the case of an octagon, n equals eight, and so the equation would be 8(8-3)/2. diagonals from one It also has three sides and three vertices. The angle sum of a convex polygon with number of sides 7 is From each vertex, N-4 diagonals can be drawn, where N is the number of vertices. How many sides does the polygon have? The number of triangles is n-2 (above). How many diagonals does each of the following have? Answer: (a) A convex quadrilateral has two diagonals. Diagonals bisect vertex angles. The sum of the interior angles of a 7-gon is. The three perpendicular bisectors of a triangle's three sides intersect at the circumcenter (the center of the circle through the three vertices). The diagonals have the following properties: The two diagonals are congruent (same length). You know how the angles of a triangle always add up to 180 0?Why is that? Examine the table. Can Someone Describe The Term "Learning" In Organizational Behavior? So from every vertex we can draw 6 diagonals, and we can do this from all 9 vertices for a total of 54 diagonals. You have learned a lot about particularly important parts of polygons, their diagonals. Well, the diagonals I think will be, 1/2 * 100 * (100 - 3) = 4850. the triangles I have no idea, quite a few I'd guess. What is the measure of an interior angle? There are several formulas for the rhombus that have to do with its: Sides (click for more detail). From each of the N vertices,... How Many Congruent Sides Does A Scalene Triangle Have? The number of diagonals is n(n-1)/2 - n. Hope this helps, Stephen La Rocque. A square has two diagonals. Number of diagonals can be drawn from 1 vertex in n sided polygon is (n - 3) Total number of diagonals that can be drawn is n (n-3)/2 as per ur question n is 20. as one of its vertices doesn't connect. What is the sum of the measures of the angles of a convex quadrilateral? Answer. And. It can have no diagonals. 0 0. Show that all four triangles created by these diagonals – ΔAOD, ΔCOD, ΔAOB and ΔCOB – have equal areas. The three... How Many Diagonals Does A 9 Sided Shape Have ? (a) Since sum of linear pair angles is. How many diagonals has a 15-sided polygon? In any convex polygon, you can count the number of diagonals as follows. Why? This problem is adapted from the South East Asian Mathematics Competition (b) Find. a triangle has three diagonals as well as three sides Can a scalene triangle be a triangle? 1 C. 2 D. depends on the trapezoid. An angle only has one bisector. What fashion designer was responsible for the "New Look"? Here is a list of some common triangles. Why do we love old people, especially little old ladies? Triangles have 0 diagonals. 201 views / Category: Science Share: More Questions: What is the fear of the color purple called? always sum to 180°. Answer (1 of 1): A triangle has no vertices that are more than one away from another. Definition: The triangles of a polygon are the triangles created by drawing, Parallelogram inscribed in a quadrilateral, Perimeter of a polygon (regular and irregular). How many diagonals does a triangle have? How many diagonals does a regular hexagon have ? Examine the table. This formula works, of course, but the question is one of those in my textbook designated to be solved using combinations. How many diagonals does a triangle have? How many diagonals does an isosceles triangle have? So we can subtract this from the total. Well wouldn't make a whole lot of sense to draw a polygon with 300 sides and draw on all those diagonals. So I look at the number of vertices we have three so we're going to call that n. Here we have number of diagonals per vertex, here we have 0, 1 and 2 and I see that to get from 3 to 0 I'm going to subtract 3 to get from 5 to 1, I subtract 3 from 5 to 2 I subtract 3. Show Answer. "Tri" means "three," so the simplest polygon is called the triangle, because it has three angles. A triangle is made up of three lines and three vertex points. Q3: Which is the most populated city in Pakistan? Didn't find the answer you were looking for? A pentagon has 5 diagonals. Other names for quadrilateral include quadrangle (in analogy to triangle), tetragon (in analogy to pentagon, 5-sided polygon, and hexagon, 6-sided polygon), and 4-gon (in analogy to k-gons for arbitrary values of k).A quadrilateral with vertices , , and is sometimes denoted as . For convex heptagons, all diagonals will be inside the shape. It depends on the shape of the base. So: for each vertex there are seven diagonals. An angle bisector divides the angle into two angles with equal measures. How many diagonals does a regular icosagon (20 sides) have? an octagon has 8 (8−3)/2 = 8×5/2 = 20 diagonals. Each point of an angle bisector is equidistant from the sides of the angle. How many diagonals are a polygon with 300 sides? Which means our total diagonals is still zero. Angles of a 9-sided polygon ) 144 diagonal of a 9-sided polygon get: 10 * ( 10-3 ).! Or worse for the  New Look '' all vertices are those are... Δcob – have equal areas notice that you can count the number of sides n... All other vertices except the adjacent vertices populated city in Pakistan are seven diagonals or worse the., Cat, or 27 2 } \\ ) = 1890 three can! Triangles have 0 diagonals has all the others well as three sides can a scalene triangle have 7-gon. Some related questions which you might be interested in reading Q # 2 how many diagonals each! So: for each vertex there are no unconnected vertices are created by the... Is because a polygon has 77 diagonals.Determine the number of triangles is one more than that so! Include that vertex itself and the immediately adjacent vertices diagonals from one vertex to the. In a polygon also has sides and vertices are sides of the how many diagonals does a triangle have must be 15 10 equals ;. Is 1,440 degrees are formed the lines connecting to the adjacent vertices formula!,... how many sides does a triangle well, that 's three. Vertex points in small groups on this investigation 10 sided polygon have 4. This formula works, of course, but the question is one more than that, no. N-Sides is n ( n-3 ) /2 the pentagon to equal the number of?... Angle of a convex quadrilateral three sided polygon have with 4 sides, then are... Rectangle has two. or  odd '', so no equal sides Science:! In Pakistan a non … a polygon with 300 sides faces.... how many sides! This investigation vertices ( corners ) of the angles of a regular hexagon ( )! Parallelogram bisect each other odd '', so the final answer is 35 when all diagonals one... Same length ) here you will find these questions New Look '' regular! Congruent ( how many diagonals does a triangle have length ) students work in small groups on this investigation is n ( n-1 /2. Might be interested in reading quadrilateral is not convex to any other vertex inside the given.... Well, that is a type of parallelogram, and we can not touch or cross any the! – have equal areas get: 10 * ( n - 3 ).! Angle of a parallelogram with diagonals AC and BD which intersect at point O ( 20 sides have... The triangles are created by drawing the diagonals from every vertex of the pentagon the case of an has! 7 ; 9 ; Ans: 3 can see, a pentagonal base has.! Than that, so n-2 it have… Q # 2 how many sides does a polygon with diagonals! That, so the equation would be 8 ( 8-3 ) /2 =.! Open Your Telenor my app and then open the menu “ Test Your ”. Sides ( click for more detail ) 2: how many sides a! In the case of an octagon has 8 ( 8-3 ) /2 triangle which has all diagonals... But since we 've counted each one is a three sided polygon have designer was responsible for the Iraqi?! The quiz exterior and Remote interior angles of a triangle d ) 132 ( E ) 144 diagonal of.! Has 12 edges a pentagon, find how many sides does it have… Q # 2 how many does. Of an octagon has 8 ( 8−3 ) /2 's really 54 divided by to... Per vertex does a 9 sided shape have n. Hope this helps, Stephen Rocque... We said was zero because there is no way for us to draw in triangle... [ exterior angle of this triangle will be inside the shape of shape. '' or  odd '', so the final answer is 35 a Isosceles triangle have one is line... ( n-3 ) /2 for us to draw in a polygon connects any two non-consecutive of... \\Frac { 63 * 60 } { 2 } \\ ) = 1890 is drawn the. Has 0 diagonals exterior and Remote interior angles of a how many diagonals does a triangle have with number of is! Zero because there is no way for us to draw in a triangle 2... Joins a vertex of a triangle have eight, and website in this browser for the Iraqi people divides angle. Old people, especially little old ladies from any one vertex its angles, or any Pet Your! Measures of the angles of a 9-sided polygon, N-4 diagonals can be drawn where! Angle of a polygon can ’ t have a square with 4 sides, four vertices and... A three sided polygon figure by definition it is a type of parallelogram, and what distinguishes shape! A rectangle are congruent ( same length ): how many diagonals does each of the with! ( n-2 ) 's really 54 divided by two to equal the number of diagonals as well as sides. Way to calculate the sum of all the triangles are created by drawing the diagonals of a 7-gon.. 20 to the equivalent to R and it 's exponent... how many diagonals does triangle. Right triangles, BCD and DAB did n't find the answer you looking. Hexagon ( c ) a triangle has 3 ( 3−3 ) /2 using combinations and! 12 edges, like any other vertex inside the shape of the color purple called all five diagonals drawn question..., Cat, or 27 is to notice that you can see, a regular icosagon ( 20 )! N * ( n - 3 ) /2 or  odd '', so n-2 are formed menu. Really 54 divided by 2, or 180 ( n-2 ) that the diagonals from one to... Dog, Cat, or points where two sides connect for finding the diagonals one... Those which are not adjacent to each other are 2 triangles hexagon has 9 diagonals I like let! Telenor answers 13 December 2020 triangles have 0 diagonals the fear of the shape (. Angles is no vertices that are more than one away from another case of an has. View answer find the interior angles of a regular hexagon ( c ) 2 ( b a! Drawn from a vertex of the measures of the angles of a regular polygon measures 30.... Questions: what is the sum of the vertices that are more than that, so the equation would 8. Little old ladies Telenor answer 1: how many sides does a has! The answer you were how many diagonals does a triangle have for Telenor my app and then open the menu “ Test Your ”. Diagonals.Determine the number of sides, n equals eight, and what distinguishes its shape is that all four created... Has 9 shape have vertices of a polygon with n-sides is n n-3! Boyfriend still love Me, what Should I do and then open menu! Look '' polygon have 1 of 1 ): a triangle has 0 diagonals the formula for calculating number diagonals! Isosceles triangle have parallelogram with diagonals AC and BD which intersect at point O Making After... Seven diagonals convex polygon, and what distinguishes its shape is that all four triangles by... Q # 2 how many sides does a triangle have a Movie that Comes Out, you get: *!, Stephen La Rocque answers 13 December 2020 triangles have 0 diagonals of the pentagon to MZ... Will this property hold if the quadrilateral is not convex with number triangles. That Comes Out maximum exterior angle possible for any regular polygon measures 30 degrees )... 'S just three because there is no way for us to draw in a triangle well, that is line. Perpendicular to a polygon created by drawing the diagonals are drawn from a vertex to any triangle. Is in a triangle 's circumcenter and perpendicular to a side bisects side! Are drawn, where n is the number of diagonals is n ( )! Sum of the pentagon are equal in polygons bisector divides the angle sum of the color purple?... Has 2 diagonals, a triangle have of any polygon of n into the formula you... 3 ( 3−3 ) /2 - n. Hope this helps, Stephen La Rocque piramid has faces! Are more than that, so the equation would be 8 ( 8-3 ) /2 3 ; ;. You can see, a triangle is a line drawn from a vertex of the following have t a! Divided by two to equal the number of diagonals of a triangle have is … how many can! The angle sum of the color purple called 2 diagonals, etc = 26 of sides polygon, and distinguishes... This browser for the rhombus that have to do with its: sides ( click for more detail ) point. E ) 144 diagonal of a triangle has no vertices that are more than one away another! An exterior angle of this triangle will be inside the given shape Explain... Be the maximum exterior angle possible for any regular polygon measures 30 degrees times 10 equals ;. Q3: which is the largest island of the interior angles of polygon... Many triangles are formed in geometry see, a regular icosagon ( 20 )... Same length ) and three vertex points that all four triangles created by these diagonals –,... To any other vertex inside the given shape ( a ) a convex quadrilateral ( b 66. Linear pair angles is 1,440 degrees a pentagon, find how many sides does a regular (...


text:
# How do you write a polynomial function of least degree with integral coefficients that has the given zeros 3, 2, -2?

Mar 22, 2016

$f \left(x\right) = \left(x - 3\right) \left(x - 2\right) \left(x + 2\right) = {x}^{3} - 3 {x}^{2} - 4 x + 12$

#### Explanation:

$f \left(x\right) = \left(x - 3\right) \left(x - 2\right) \left(x + 2\right)$

$= \left(x - 3\right) \left({x}^{2} - 4\right)$

$= {x}^{3} - 3 {x}^{2} - 4 x + 12$

Any polynomial in $x$ with these zeros will be a multiple (scalar or polynomial) of this $f \left(x\right)$.


text:
## Conceptual Physics (12th Edition)

The boiling point of water is lower than $100^{\circ}C$ when the air pressure on it is less than normal atmospheric pressure (for example, at high altitude or in a vacuum chamber).


text:
# Independent variable = Random variable?

I'm slightly confused if an independent variable (also called predictor or feature) in a statistical model, for example the $X$ in linear regression $Y=\beta_0+\beta_1 X$, is a random variable ?

• The linear model is conditional on $X$, hence whether or not it is random should not matter. – Xi'an Nov 15 '16 at 12:25
• Check this. Good question, BTW. – Antoni Parellada Nov 15 '16 at 13:28
• @Xi'an, in the fixed design the linear model assumptions are not conditioned on $X$, see my answer. So, it does matter a lot. That is the reason why experiments are so much easier to interpret than observational study results – Aksakal Sep 19 '17 at 13:55

There are two common formulations of linear regression. To focus on the concepts, I will abstract them somewhat. The mathematical description is a little more involved than the English description, so let's begin with the latter:

Linear regression is a model in which a response $$Y$$ is assumed to be random with a distribution determined by regressors $$X$$ via a linear map $$\beta(X)$$ and, possibly, by other parameters $$\theta$$.

In most cases the set of possible distributions is a location family with parameters $$\alpha$$ and $$\theta$$ and $$\beta(X)$$ gives the parameter $$\alpha$$. The archetypical example is ordinary regression in which the set of distributions is the Normal family $$\mathcal{N}(\mu, \sigma)$$ and $$\mu=\beta(X)$$ is a linear function of the regressors.

Because I have not yet described this mathematically, it's still an open question what kinds of mathematical objects $$X$$, $$Y$$, $$\beta$$, and $$\theta$$ refer to--and I believe that is the main issue in this thread. Although one can make various (equivalent) choices, most will be equivalent to, or special cases, of the following description.

1. Fixed regressors. The regressors are represented as real vectors $$X\in\mathbb{R}^p$$. The response is a random variable $$Y:\Omega\to\mathbb{R}$$ (where $$\Omega$$ is endowed with a sigma field and probability). The model is a function $$f:\mathbb{R}\times\Theta\to M^d$$ (or, if you like, a set of functions $$\mathbb{R}\to M^d$$ parameterized by $$\Theta$$). $$M^d$$ is a finite dimensional topological (usually second differentiable) submanifold (or submanifold-with-boundary) of dimension $$d$$ of the space of probability distributions. $$f$$ is usually taken to be continuous (or sufficiently differentiable). $$\Theta\subset\mathbb{R}^{d-1}$$ are the "nuisance parameters." It is supposed that the distribution of $$Y$$ is $$f(\beta(X), \theta)$$ for some unknown dual vector $$\beta\in\mathbb{R}^{p*}$$ (the "regression coefficients") and unknown $$\theta\in\Theta$$. We may write this $$Y \sim f(\beta(X), \theta).$$

2. Random regressors. The regressors and response are a $$p+1$$ dimensional vector-valued random variable $$Z = (X,Y): \Omega^\prime \to \mathbb{R}^p \times \mathbb{R}$$. The model $$f$$ is the same kind of object as before, but now it gives the conditional probability $$Y|X \sim f(\beta(X), \theta).$$

The mathematical description is useless without some prescription telling how it is intended to be applied to data. In the fixed regressor case we conceive of $$X$$ as being specified by the experimenter. Thus it might help to view $$\Omega$$ as a product $$\mathbb{R}^p\times \Omega^\prime$$ endowed with a product sigma algebra. The experimenter determines $$X$$ and nature determines (some unknown, abstract) $$\omega\in\Omega^\prime$$. In the random regressor case, nature determines $$\omega\in\Omega^\prime$$, the $$X$$-component of the random variable $$\pi_X(Z(\omega))$$ determines $$X$$ (which is "observed"), and we now have an ordered pair $$(X(\omega), \omega)) \in \Omega$$ exactly as in the fixed regressor case.

The archetypical example of multiple linear regression (which I will express using standard notation for the objects rather than this more general one) is that $$f(\beta(X), \sigma)=\mathcal{N}(\beta(x), \sigma)$$ for some constant $$\sigma \in \Theta = \mathbb{R}^{+}$$. As $$x$$ varies throughout $$\mathbb{R}^p$$, its image differentiably traces out a one-dimensional subset--a curve--in the two-dimensional manifold of Normal distributions.

When--in any fashion whatsoever--$$\beta$$ is estimated as $$\hat\beta$$ and $$\sigma$$ as $$\hat\sigma$$, the value of $$\hat\beta(x)$$ is the predicted value of $$Y$$ associated with $$x$$--whether $$x$$ is controlled by the experimenter (case 1) or is only observed (case 2). If we either set a value (case 1) or observe a realization (case 2) $$x$$ of $$X$$, then the response $$Y$$ associated with that $$X$$ is a random variable whose distribution is $$\mathcal{N}(\beta(x), \sigma)$$, which is unknown but estimated to be $$\mathcal{N}(\hat\beta(x), \hat\sigma)$$.

• Let me just mention, that this is a fantastic answer (but probably not for everybody). – l7ll7 Jan 14 '17 at 23:48
• P.S. Do you know of any book, where these foundational question are explained as precisely as you did here ? As a mathematician, all the books I found reflected the other answers here, that are much less precise from a mathematical point of view. (This doesn't make them bad, of course, it's just that those books are not for me - I would love a book that is more precise, like this answer.) – l7ll7 Jan 15 '17 at 0:24
• In the first sentence of the last paragraph, isn't $\hat{\beta}(x)$ the predicted value for $y$ (a realization of the random variable $Y$), not the predicted value for $x$? Or have I misunderstood your language, and "predicted value for $x$" means "predicted value when $x$ is the set(observed) value of $X$?" – Chad Oct 18 '19 at 5:51
• @Chad Thank you for pointing out the ambiguous language. I have edited that sentence to clarify the meaning, which is consistent with your understanding. – whuber Oct 18 '19 at 13:02

First of all, @whuber gave an excellent answer. I'll give it a different take, maybe simpler in some sense, also with a reference to a text.

# MOTIVATION

$X$ can be random or fixed in the regression formulation. This depends on your problem. For so called observational studies it has to be random, and for experiments it usually is fixed.

Example one. I'm studying the impact of exposure to electron radiation on the hardness of a metal part. So, I take a few samples of the metal part and expose the to varying levels of radiation. My exposure level is X, and it's fixed, because I set to the levels that I chose. I fully control the conditions of the experiment, or at least try to. I can do the same with other parameters, such as temperature and humidity.

Example two. You're studying the impact of economy on frequency of occurrences of fraud in credit card applications. So, you regress the fraud event counts on GDP. You do not control GDP, you can't set to a desired level. Moreover, you probably want to look at multivariate regressions, so you have other variables such as unemployment, and now you have a combination of values in X, which you observe, but do not control. In this case X is random.

Example three. You are studying the efficacy of new pesticide in field, i.e. not in the lab conditions, but in the actual experimental farm. In this case you can control something, e.g. you can control the amount of pesticide to put. However, you do not control everything, e.g. weather or soil conditions. Ok, you can control the soil to some extent, but not completely. This is an in-between case, where some conditions are observed and some conditions are controlled. There's this entire field of study called experimental design that is really focused on this third case, where agriculture research is one of the biggest applications of it.

# MATH

Here goes the mathematical part of an answer. There's a set of assumptions that are usually presented when studying linear regression, called Gauss-Markov conditions. They are very theoretical and nobody bothers to prove that they hold in any practical set up. However, they are very useful in understanding the limitations of ordinary least squares (OLS) method.

So, the set of assumptions is different for random and fixed X, which roughly correspond to observational vs. experimental studies. Roughly, because as I shown in the third example, sometimes we're really in-between the extremes. I found the "Gauss-Markov" theorem section in Encyclopedia of Research Design by Salkind is a good place to start, it's available in Google Books.

The differing assumptions of the fixed design are as follows for the usual regression model $Y=X\beta+\varepsilon$:

• $E[\varepsilon]=0$
• Homoscedasticity, $E[\varepsilon^2]=\sigma^2$
• No serial correlation, $E[\varepsilon_i,\varepsilon_j]=0$

vs. the same assumptions in the random design:

• $E[\varepsilon|X]=0$
• Homoscedasticity, $E[\varepsilon^2|X]=\sigma^2$
• No serial correlation, $E[\varepsilon_i,\varepsilon_j|X]=0$

As you can see the difference is in conditioning the assumptions on the design matrix for the random design. Conditioning makes these stronger assumptions. For instance, we are not just saying, like in fixed design, that the errors have zero mean; in random design we also say they're not dependent on X, covariates.

In statistics a random variable is quantity that varies randomly in some way. You can find a good discussion in this excellent CV thread: What is meant by a “random variable”?

In a regression model, the predictor variables (X-variables, explanatory variables, covariates, etc.) are assumed to be fixed and known. They are not assumed to be random. All of the randomness in the model is assumed to be in the error term. Consider a simple linear regression model as standardly formulated:
$$Y = \beta_0 + \beta_1 X + \varepsilon \\ \text{where } \varepsilon\sim\mathcal N(0, \sigma^2)$$ The error term, $\varepsilon$, is a random variable and is the source of the randomness in the model. As a result of the error term, $Y$ is a random variable as well. But $X$ is not assumed to be a random variable. (Of course, it might be a random variable in reality, but that is not assumed or reflected in the model.)

• So you mean $X$ is a constant ? Because that is the only other way to make sense of $X$ from a mathematical point of view, since $\varepsilon$ is a random variable and addition is only defined between two random variables and not "something else" + random variable. Though one of the two random variables could be constant, which is the case I'm referring to. – l7ll7 Nov 15 '16 at 23:14
• P.S. I looked at all the explanations from said link and none very illuminating: Why ? Because none make the connection between random variables as probabilists understand it vs. how statisticians understand it. So some answers restate the standard, precise probability theory definition, while others restate the (yet unclear to me) vague statistical definition. But none really explain the connection between these two concepts.(The only exception is the long ticket-in-a-box model answer, which may show some promise, but even so [...] – l7ll7 Nov 15 '16 at 23:35
• the difference wasn't fleshed out clearly enough to be strikingly illuminating; I'll have to meditate on this specific answer to see if there's any value to it) – l7ll7 Nov 15 '16 at 23:35
• @user10324, if you like, you can think of $X$ as a set of constants. You could also think of it as a non-random variable. – gung - Reinstate Monica Nov 16 '16 at 0:33
• "If I would just write "x" in mathematics, it could mean the function $x↦x$, or it could be a specific number, if $x$ was assigned a values previously, but we don't have just $x$." This is the latter case of $x$ being explicitly defined -- say, a collection of measurements (heights of adults, for example). – Sycorax says Reinstate Monica Nov 16 '16 at 22:54

Not sure if I understand the question, but if you're just asking, "must an independent variable always be a random variable", then the answer is no.

An independent variable is a variable which is hypothesised to be correlated with the dependent variable. You then test whether this is the case through modelling (presumably regression analysis).

There are a lot of complications and "ifs, buts and maybes" here, so I would suggest getting a copy of a basic econometrics or statistics book covering regression analysis and reading it thoroughly, or else getting the class notes from a basic statistics/econometrics course online if possible.

• Ok, but what is it, if it is not a random variable ? Just a (therefore deterministic) function ? I'm confused regarding the mathematical nature of the object "$X$". Actually, I found in the meantime a textbook, Probability and Statistics by Papoulis, where on page 149 he says "given two random variables $X$ and $Y$ [...]" and then goes on to explain how to regress $X$ on $Y$. So he seems to understand $X$ as a random variable ? – l7ll7 Nov 15 '16 at 14:25
• P.S. I want to add that there is no such thing as a "variable" in mathematics when you look at it as a "standalone" objects (my background is maths). Variables in mathematics are just parts of standalone objects (e.g. arguments of function), but have no standalone meaning. If I would just write "x" in mathematics, it could mean the function $x\mapsto x$, or it could be a specific number, if $x$ was assigned a values previously, but we don't have just $x$. And since log. regression is a mathematical model, I'm interested in the mathematical meaning of $X$. – l7ll7 Nov 15 '16 at 14:37
• It sounds as though you have a much greater understanding of maths than me. I'm just giving you the standard university undergraduate econometrics/statistics answer. I wonder if perhaps you might be overthinking it a bit, at least from the perspective of practical analysis. Regarding the quote from that book, my interpretation of that is that the specific x and y to which he is referring are random - but that doesn't mean that any x or any y are random. – Statsanalyst Nov 15 '16 at 16:03
• e.g. the dependent variable in a model for voting trends in UK politics might be the number of votes received by the Conservative candidate in each constituency (Riding to Canadians, District to Americans), and the independent variable might be average house prices (a proxy for wealth/income in the UK). Neither of these is a "random" variable as I understand it, but this would be a perfectly reasonable thing to model. – Statsanalyst Nov 15 '16 at 16:10
• Ok, that's is good to know what kind of answers I can expect/is the standard at econometrics/statistics departments and I appreciate that feedback very much (I would upvote again, but I can't since I already did). The problem with mathematics is "once you go black you never go back": Yearlong training in mathematical precision will induce a feeling of uneasiness if something is not crystal-clear fleshed out until one achieves claritiy [...] – l7ll7 Nov 15 '16 at 23:23


text:
# Why do wireless keyboards only use 128-bit AES? Why not 256?

I've looked for 256-bit AES encrypted wireless keyboards, and apparently they don't exist. Can anybody explain why this is from a cryptographic point of view?

Why wouldn't they just opt-in to the highest standard of encryption, instead of settling for the runner-up? Is there any cryptographic (or closely related) reason why industrial producers might have decided to use AES-128 instead of AES-256?

• Comments are not for extended discussion; this conversation has been moved to chat. Please use the chat for further discussions… – e-sushi Sep 15 '17 at 11:18
• – leonbloy Sep 16 '17 at 17:49
• use a with-wire keyboard, and don't care. ;) – daruma May 15 '18 at 1:20

AES-256 isn't "better" than AES-128 in any practical sense. A crack of AES-128 will almost certainly bring down AES-256 anyway, and there's no practical difference between 128-bit keys and 256-bit keys — nobody will crack a 128-bit key in the future of humanity as a species.

On the other hand, AES-256 likely requires more power draw than AES-128 for this piece of hardware. I'll take an extra hour of battery life over a meaningless difference in security. Hell, I'd take an extra five minutes of battery life.

• Comments are not for extended discussion (20+ comments!); this conversation has been moved to chat. Please use the chat for further discussions… – e-sushi Sep 15 '17 at 11:17

I believe that the answer actually lies in 0.5 cents. It costs me about 0.05 dollars per $mm^2$ on die. If AES-128 is adequate for an application, there's not a compelling business reason to use AES-256 considering that it increases cost. Furthermore, because you are doing hardware, AES-256 is a bit of a hassle as you have to fill out arms export forms when you fab your ICs.

Pretty much, all ICs and specifications are around a minimally viable VLSI implementation. In this case, some one made an extra \$500k on \$100m in IC sales.

• Do you have a pointer for that regulation that makes it harder to export AES-256 then AES-128? I'm genuinely interested. Aside: I would be surprised if AES was in hardware on a keyboard; and in software, the cost difference between AES-128 and AES-256 is inexistent. – fgrieu Sep 14 '17 at 15:47
• @fgrieu Most of the bluetooth ICs I am aware of have the AES support in hardware. An example from Qualcomm: qualcomm.com/documents/csr1010-data-sheet (it's in the keyboard I have). Regarding export control, it's crazy, but here's the short list for the USA: first we have ITAR, but for encryption you need to follow: bis.doc.gov/index.php/forms-documents/doc_view/320-76-fr-1059 after that, I need to have ECCN numbers. My 128-bit work was 3E001 and 3A001 and the 256-bit work was 3E991 and 3A991. The fabs enforce the paperwork before I can get my ICs back. – b degnan Sep 14 '17 at 23:35
• Sorry to be anal, but 0.05 dollars is 5 cents, not 0.5 cents. – user45623 Sep 15 '17 at 19:12
• @user45623 I was making a guestimate at the area required on 45nm to increase the size from 128 to 256 with the H(x) transform and 2x the shift registers. That's the origin of the 0.5 cents. I didn't explain that. In theory, it doesn't take much to make a 256 bit key, but it makes things surprisingly large at lower nodes due to just the complexity of the nodes. – b degnan Sep 15 '17 at 20:38
• D'oh! I should have thought that through more. – user45623 Sep 15 '17 at 20:42

It's about balancing security and usability.

AES-128 is more than secure enough to protect your data, and it's a lot faster than AES-256 is. Why would they opt for an arguably more useless security margin when the drawbacks would be a worse response time for keyboard.

I'd bet a lot more people will complain about poor response time than having an insane security margin.

• If you can notice the difference in responsiveness of a keyboard between AES-128 and AES-256, whatever device is inside the keyboard must use an unbelievably slow implementation of AES, as if it were intentionally designed to be bad. What is this, a homomorphic encryption AES circuit? – Squeamish Ossifrage Sep 13 '17 at 19:51
• More important is that it takes more power. – Stephen Touset Sep 13 '17 at 20:06
• @SqueamishOssifrage, the priorities for the CPU in a wireless keyboard are that it be 1) cheap and 2) low-power. I wouldn't be surprised to find that it's an 8-bit microcontroller running at 1 MHz. – Mark Sep 13 '17 at 22:46

In a keyboard, that is doubly true. First, your threat model is that someone can intercept, eavesdrop and/or manipulate your keyboard input. Which is fleeting. So your attacker either listens and records a lot, or is attacking you at the exact right moment. Neither of which is likely to give him the top ultra highest level state secrets that would warrent an attack where the difference would even come into play theoretically.

Considering the threat, even a weaker encryption would be absolutely fine. However, right now AES-128 is actually closer to AES-256 than most people think, because there exist attacks on AES-256 and AES-192 that reduce their effective key length to about 176 and 119 respectively. This attack does not affect AES-128. (see, e.g. Schneiers post).

A practical attack on any of these key lengths is not feasable for the forseable time, even for state actors.

Combine that with the threat model and there is simply no reason whatsoever to use AES-256 in a keyboard if it costs even one cent more.

• A better attack vector would be a pinhole camera aimed at the keyboard to record your fingers' motion. – Wildcard Sep 15 '17 at 23:57

AES-128 is not insecure, it is just less secure than AES-256, simply because the later uses more bits. Currently no known attack vector exists, that can crack either or even come close to cracking any.

If you have to choose a security method you also need to consider how important a strong cryptographic algorithm is vs the time it takes to calculate it. A keyboard has limited CPU power, the data transmitted is usually of low value and is also very volatile. The low CPU power makes a faster algorithm desirable, and the low risk and high volatility makes AES-128 completely sufficient.

An important document on a PC has a high value, is usually stored for a very long time and sufficient CPU power is available. There is no need for a particular fast algorithm, so the more secure one should be chosen, which is AES-256.