text:
# 1.2 Domain and range  (Page 7/11)

 Page 7 / 11

## Writing a piecewise function

A museum charges $5 per person for a guided tour with a group of 1 to 9 people or a fixed$50 fee for a group of 10 or more people. Write a function    relating the number of people, $\text{\hspace{0.17em}}n,\text{\hspace{0.17em}}$ to the cost, $\text{\hspace{0.17em}}C.$

Two different formulas will be needed. For n -values under 10, $\text{\hspace{0.17em}}C=5n.\text{\hspace{0.17em}}$ For values of $\text{\hspace{0.17em}}n\text{\hspace{0.17em}}$ that are 10 or greater, $\text{\hspace{0.17em}}C=50.$

$C\left(n\right)=\left\{\begin{array}{ccc}5n& \text{if}& 0

## Working with a piecewise function

A cell phone company uses the function below to determine the cost, $\text{\hspace{0.17em}}C,\text{\hspace{0.17em}}$ in dollars for $\text{\hspace{0.17em}}g\text{\hspace{0.17em}}$ gigabytes of data transfer.

$C\left(g\right)=\left\{\begin{array}{ccc}25& \text{if}& 0

Find the cost of using 1.5 gigabytes of data and the cost of using 4 gigabytes of data.

To find the cost of using 1.5 gigabytes of data, $\text{\hspace{0.17em}}C\left(1.5\right),\text{\hspace{0.17em}}$ we first look to see which part of the domain our input falls in. Because 1.5 is less than 2, we use the first formula.

$C\left(1.5\right)=\text{}25$

To find the cost of using 4 gigabytes of data, $\text{\hspace{0.17em}}C\left(4\right),\text{\hspace{0.17em}}$ we see that our input of 4 is greater than 2, so we use the second formula.

$C\left(4\right)=25+10\left(4-2\right)=\text{}45$

Given a piecewise function, sketch a graph.

1. Indicate on the x -axis the boundaries defined by the intervals on each piece of the domain.
2. For each piece of the domain, graph on that interval using the corresponding equation pertaining to that piece. Do not graph two functions over one interval because it would violate the criteria of a function.

## Graphing a piecewise function

Sketch a graph of the function.

$f\left(x\right)=\left\{\begin{array}{ccc}{x}^{2}& \text{if}& x\le 1\\ 3& \text{if}& 12\end{array}$

Each of the component functions is from our library of toolkit functions, so we know their shapes. We can imagine graphing each function and then limiting the graph to the indicated domain. At the endpoints of the domain, we draw open circles to indicate where the endpoint is not included because of a less-than or greater-than inequality; we draw a closed circle where the endpoint is included because of a less-than-or-equal-to or greater-than-or-equal-to inequality.

[link] shows the three components of the piecewise function graphed on separate coordinate systems.

Now that we have sketched each piece individually, we combine them in the same coordinate plane. See [link] .

Graph the following piecewise function.

$f\left(x\right)=\left\{\begin{array}{ccc}{x}^{3}& \text{if}& x<-1\\ -2& \text{if}& -14\end{array}$

Can more than one formula from a piecewise function be applied to a value in the domain?

No. Each value corresponds to one equation in a piecewise formula.

Access these online resources for additional instruction and practice with domain and range.

## Key concepts

• The domain of a function includes all real input values that would not cause us to attempt an undefined mathematical operation, such as dividing by zero or taking the square root of a negative number.
• The domain of a function can be determined by listing the input values of a set of ordered pairs. See [link] .
• The domain of a function can also be determined by identifying the input values of a function written as an equation. See [link] , [link] , and [link] .
• Interval values represented on a number line can be described using inequality notation, set-builder notation, and interval notation. See [link] .
• For many functions, the domain and range can be determined from a graph. See [link] and [link] .
• An understanding of toolkit functions can be used to find the domain and range of related functions. See [link] , [link] , and [link] .
• A piecewise function is described by more than one formula. See [link] and [link] .
• A piecewise function can be graphed using each algebraic formula on its assigned subdomain. See [link] .

find the equation of the line if m=3, and b=-2
graph the following linear equation using intercepts method. 2x+y=4
Ashley
how
Wargod
what?
John
ok, one moment
UriEl
how do I post your graph for you?
UriEl
it won't let me send an image?
UriEl
also for the first one... y=mx+b so.... y=3x-2
UriEl
y=mx+b you were already given the 'm' and 'b'. so.. y=3x-2
Tommy
"7"has an open circle and "10"has a filled in circle who can I have a set builder notation
x=-b+_Гb2-(4ac) ______________ 2a
I've run into this: x = r*cos(angle1 + angle2) Which expands to: x = r(cos(angle1)*cos(angle2) - sin(angle1)*sin(angle2)) The r value confuses me here, because distributing it makes: (r*cos(angle2))(cos(angle1) - (r*sin(angle2))(sin(angle1)) How does this make sense? Why does the r distribute once
so good
abdikarin
this is an identity when 2 adding two angles within a cosine. it's called the cosine sum formula. there is also a different formula when cosine has an angle minus another angle it's called the sum and difference formulas and they are under any list of trig identities
strategies to form the general term
carlmark
How can you tell what type of parent function a graph is ?
generally by how the graph looks and understanding what the base parent functions look like and perform on a graph
William
if you have a graphed line, you can have an idea by how the directions of the line turns, i.e. negative, positive, zero
William
y=x will obviously be a straight line with a zero slope
William
y=x^2 will have a parabolic line opening to positive infinity on both sides of the y axis vice versa with y=-x^2 you'll have both ends of the parabolic line pointing downward heading to negative infinity on both sides of the y axis
William
y=x will be a straight line, but it will have a slope of one. Remember, if y=1 then x=1, so for every unit you rise you move over positively one unit. To get a straight line with a slope of 0, set y=1 or any integer.
Aaron
yes, correction on my end, I meant slope of 1 instead of slope of 0
William
what is f(x)=
I don't understand
Joe
Typically a function 'f' will take 'x' as input, and produce 'y' as output. As 'f(x)=y'. According to Google, "The range of a function is the complete set of all possible resulting values of the dependent variable (y, usually), after we have substituted the domain."
Thomas
Sorry, I don't know where the "Â"s came from. They shouldn't be there. Just ignore them. :-)
Thomas
Darius
Thanks.
Thomas
Â
Thomas
It is the Â that should not be there. It doesn't seem to show if encloses in quotation marks. "Â" or 'Â' ... Â
Thomas
Now it shows, go figure?
Thomas
what is this?
i do not understand anything
unknown
lol...it gets better
Darius
I've been struggling so much through all of this. my final is in four weeks 😭
Tiffany
this book is an excellent resource! have you guys ever looked at the online tutoring? there's one that is called "That Tutor Guy" and he goes over a lot of the concepts
Darius
thank you I have heard of him. I should check him out.
Tiffany
is there any question in particular?
Joe
I have always struggled with math. I get lost really easy, if you have any advice for that, it would help tremendously.
Tiffany
Sure, are you in high school or college?
Darius
Hi, apologies for the delayed response. I'm in college.
Tiffany
how to solve polynomial using a calculator
So a horizontal compression by factor of 1/2 is the same as a horizontal stretch by a factor of 2, right?
The center is at (3,4) a focus is at (3,-1), and the lenght of the major axis is 26
The center is at (3,4) a focus is at (3,-1) and the lenght of the major axis is 26 what will be the answer?
Rima
I done know
Joe
What kind of answer is that😑?
Rima
I had just woken up when i got this message
Joe
Rima
i have a question.
Abdul
how do you find the real and complex roots of a polynomial?
Abdul
@abdul with delta maybe which is b(square)-4ac=result then the 1st root -b-radical delta over 2a and the 2nd root -b+radical delta over 2a. I am not sure if this was your question but check it up
Nare
This is the actual question: Find all roots(real and complex) of the polynomial f(x)=6x^3 + x^2 - 4x + 1
Abdul
@Nare please let me know if you can solve it.
Abdul
I have a question
juweeriya
hello guys I'm new here? will you happy with me
mustapha
The average annual population increase of a pack of wolves is 25.
how do you find the period of a sine graph
Period =2π if there is a coefficient (b), just divide the coefficient by 2π to get the new period
Am
if not then how would I find it from a graph
Imani
by looking at the graph, find the distance between two consecutive maximum points (the highest points of the wave). so if the top of one wave is at point A (1,2) and the next top of the wave is at point B (6,2), then the period is 5, the difference of the x-coordinates.
Am
you could also do it with two consecutive minimum points or x-intercepts
Am
I will try that thank u
Imani
Case of Equilateral Hyperbola
ok
Zander
ok
Shella
f(x)=4x+2, find f(3)
Benetta
f(3)=4(3)+2 f(3)=14
lamoussa
14
Vedant
pre calc teacher: "Plug in Plug in...smell's good" f(x)=14
Devante
8x=40
Chris
Explain why log a x is not defined for a < 0
the sum of any two linear polynomial is what


text:
# Signal-space separation (SSS) and Maxwell filtering¶

This tutorial covers reducing environmental noise and compensating for head movement with SSS and Maxwell filtering.

As usual we’ll start by importing the modules we need, loading some example data, and cropping it to save on memory:

import os
import mne

sample_data_folder = mne.datasets.sample.data_path()
sample_data_raw_file = os.path.join(sample_data_folder, 'MEG', 'sample',
'sample_audvis_raw.fif')

## Background on SSS and Maxwell filtering¶

Signal-space separation (SSS) 1 2 is a technique based on the physics of electromagnetic fields. SSS separates the measured signal into components attributable to sources inside the measurement volume of the sensor array (the internal components), and components attributable to sources outside the measurement volume (the external components). The internal and external components are linearly independent, so it is possible to simply discard the external components to reduce environmental noise. Maxwell filtering is a related procedure that omits the higher-order components of the internal subspace, which are dominated by sensor noise. Typically, Maxwell filtering and SSS are performed together (in MNE-Python they are implemented together in a single function).

Like SSP, SSS is a form of projection. Whereas SSP empirically determines a noise subspace based on data (empty-room recordings, EOG or ECG activity, etc) and projects the measurements onto a subspace orthogonal to the noise, SSS mathematically constructs the external and internal subspaces from spherical harmonics and reconstructs the sensor signals using only the internal subspace (i.e., does an oblique projection).

Warning

Maxwell filtering was originally developed for Elekta Neuromag® systems, and should be considered experimental for non-Neuromag data. See the Notes section of the maxwell_filter() docstring for details.

The MNE-Python implementation of SSS / Maxwell filtering currently provides the following features:

• Cross-talk cancellation

• Fine calibration correction

• tSSS

• Coordinate frame translation

• Regularization of internal components using information theory

• Raw movement compensation (using head positions estimated by MaxFilter)

• cHPI subtraction (see mne.chpi.filter_chpi())

• Handling of 3D (in addition to 1D) fine calibration files

• Epoch-based movement compensation as described in 1 through mne.epochs.average_movements()

• Experimental processing of data from (un-compensated) non-Elekta systems

## Using SSS and Maxwell filtering in MNE-Python¶

For optimal use of SSS with data from Elekta Neuromag® systems, you should provide the path to the fine calibration file (which encodes site-specific information about sensor orientation and calibration) as well as a crosstalk compensation file (which reduces interference between Elekta’s co-located magnetometer and paired gradiometer sensor units).

fine_cal_file = os.path.join(sample_data_folder, 'SSS', 'sss_cal_mgh.dat')
crosstalk_file = os.path.join(sample_data_folder, 'SSS', 'ct_sparse_mgh.fif')

Before we perform SSS we’ll set a couple additional bad channels — MEG 2313 has some DC jumps and MEG 1032 has some large-ish low-frequency drifts. After that, performing SSS and Maxwell filtering is done with a single call to maxwell_filter(), with the crosstalk and fine calibration filenames provided (if available):

raw.info['bads'].extend(['MEG 1032', 'MEG 2313'])
raw_sss = mne.preprocessing.maxwell_filter(raw, cross_talk=crosstalk_file,
calibration=fine_cal_file)

Out:

Maxwell filtering raw data
Bad MEG channels being reconstructed: ['MEG 2443', 'MEG 1032', 'MEG 2313']
Processing 204 gradiometers and 102 magnetometers
Using fine calibration sss_cal_mgh.dat
Adjusted coil positions by (μ ± σ): 0.5° ± 0.4° (max: 2.1°)
Using origin -4.1, 16.0, 51.7 mm in the head frame
Using 87/95 harmonic components for    0.000  (72/80 in, 15/15 out)
Processing 6 data chunks
[done]

Warning

Automatic bad channel detection is not currently implemented. It is critical to mark bad channels in raw.info['bads'] before calling maxwell_filter() in order to prevent bad channel noise from spreading.

To see the effect, we can plot the data before and after SSS / Maxwell filtering.

raw.pick(['meg']).plot(duration=2, butterfly=True)
raw_sss.pick(['meg']).plot(duration=2, butterfly=True)

Notice that channels marked as “bad” have been effectively repaired by SSS, eliminating the need to perform interpolation. The heartbeat artifact has also been substantially reduced.

The maxwell_filter() function has parameters int_order and ext_order for setting the order of the spherical harmonic expansion of the interior and exterior components; the default values are appropriate for most use cases. Additional parameters include coord_frame and origin for controlling the coordinate frame (“head” or “meg”) and the origin of the sphere; the defaults are appropriate for most studies that include digitization of the scalp surface / electrodes. See the documentation of maxwell_filter() for details.

## Spatiotemporal SSS (tSSS)¶

An assumption of SSS is that the measurement volume (the spherical shell where the sensors are physically located) is free of electromagnetic sources. The thickness of this source-free measurement shell should be 4-8 cm for SSS to perform optimally. In practice, there may be sources falling within that measurement volume; these can often be mitigated by using Spatiotemporal Signal Space Separation (tSSS) 2. tSSS works by looking for temporal correlation between components of the internal and external subspaces, and projecting out any components that are common to the internal and external subspaces. The projection is done in an analogous way to SSP, except that the noise vector is computed across time points instead of across sensors.

To use tSSS in MNE-Python, pass a time (in seconds) to the parameter st_duration of maxwell_filter(). This will determine the “chunk duration” over which to compute the temporal projection. The chunk duration effectively acts as a high-pass filter with a cutoff frequency of $$\frac{1}{\mathtt{st\_duration}}~\mathrm{Hz}$$; this effective high-pass has an important consequence:

• In general, larger values of st_duration are better (provided that your computer has sufficient memory) because larger values of st_duration will have a smaller effect on the signal.

If the chunk duration does not evenly divide your data length, the final (shorter) chunk will be added to the prior chunk before filtering, leading to slightly different effective filtering for the combined chunk (the effective cutoff frequency differing at most by a factor of 2). If you need to ensure identical processing of all analyzed chunks, either:

• choose a chunk duration that evenly divides your data length (only recommended if analyzing a single subject or run), or

• include at least 2 * st_duration of post-experiment recording time at the end of the Raw object, so that the data you intend to further analyze is guaranteed not to be in the final or penultimate chunks.

Additional parameters affecting tSSS include st_correlation (to set the correlation value above which correlated internal and external components will be projected out) and st_only (to apply only the temporal projection without also performing SSS and Maxwell filtering). See the docstring of maxwell_filter() for details.

## Movement compensation¶

If you have information about subject head position relative to the sensors (i.e., continuous head position indicator coils, or cHPI), SSS can take that into account when projecting sensor data onto the internal subspace. Head position data is loaded with the read_head_pos() function. The example data doesn’t include cHPI, so here we’ll load a .pos file used for testing, just to demonstrate:

head_pos_file = os.path.join(mne.datasets.testing.data_path(), 'SSS',
'test_move_anon_raw.pos')

The cHPI data file could also be passed as the head_pos parameter of maxwell_filter(). Not only would this account for movement within a given recording session, but also would effectively normalize head position across different measurement sessions and subjects. See here for an extended example of applying movement compensation during Maxwell filtering / SSS. Another option is to apply movement compensation when averaging epochs into an Evoked instance, using the mne.epochs.average_movements() function.

Each of these approaches requires time-varying estimates of head position, which is obtained from MaxFilter using the -headpos and -hp arguments (see the MaxFilter manual for details).

## Caveats to using SSS / Maxwell filtering¶

1. There are patents related to the Maxwell filtering algorithm, which may legally preclude using it in commercial applications. More details are provided in the documentation of maxwell_filter().

2. SSS works best when both magnetometers and gradiometers are present, and is most effective when gradiometers are planar (due to the need for very accurate sensor geometry and fine calibration information). Thus its performance is dependent on the MEG system used to collect the data.

## References¶

1(1,2)

Taulu S and Kajola M. (2005). Presentation of electromagnetic multichannel data: The signal space separation method. J Appl Phys 97, 124905 1-10. https://doi.org/10.1063/1.1935742

2(1,2)

Taulu S and Simola J. (2006). Spatiotemporal signal space separation method for rejecting nearby interference in MEG measurements. Phys Med Biol 51, 1759-1768. https://doi.org/10.1088/0031-9155/51/7/008

Total running time of the script: ( 0 minutes 6.255 seconds)

Estimated memory usage: 215 MB

Gallery generated by Sphinx-Gallery

format: plain


text:
# How to get the contents of clipboard in a variable?

If I copy something into the clipboard then use var=Paste[]; I get Null in the var and the clipboard content is printed on the next cell. How do I get the content of the clipboard directly into the variable.

I have a basic text in my clipboard and want it stored as a string.

Moreover Windows 10's clipboard now supports multiple entries. Is there a way to select entries other than the last one?

To get the last entry in clipboard you can use:

var = ToExpression[NotebookGet[ClipboardNotebook[]][[1, 1, 1, 1]]]

This works in version 9 / windows 10 (64bit).

• This allows to get only the last entry from the clipboard on Windows 10. Oct 24 '21 at 4:04
• Good point, thank you @AlexeyPopkov.
– kglr
Oct 24 '21 at 19:33

This is perhaps a partial answer; it shows that using ctrl+v rather than Paste[] allows an expression to be assigned to a variable as required.

As an example, enter

Red[]

Shows red box.

Select the box then use Paste from the context menu to copy it to the clip-board; then enter

x = Paste[]
x // FullForm

This shows x = Null.

Next, enter

y=

then type ctrl+v

This gives the red box as expected; enter

y // FullForm

This gives RGBColor[1,0,0], which shows that the expressions has been passed to y as required.

Actually, there is an undocumented function for this purpose:PastContent[]

• There is no built-in function PastContent, at least in version 12.3.1: Names["**Past*Content*"]` returns empty list. Probably you refer to this: mmaqa.com/qa/1731/mmaexcelmma?show=1773#a1773 Oct 24 '21 at 3:59
• @AlexeyPopkov Aha..Life is hard, and I don't remember what I ever did at all. That link you quoted is exactly one of the questions I answered myself a few years ago. BTW, you're Chinese? How did you find out about that community?
– yode
Oct 24 '21 at 11:37
• No, I've found this link here. Oct 24 '21 at 14:25


text:
UK Secondary (7-11)
Use long division to convert negative fractions to decimal numbers

## Interactive practice questions

Write the fraction $\frac{19}{25}$1925 as a decimal.

Easy
Less than a minute
Write the decimal $0.872$0.872 as a fraction in simplest form.
Write $6+\frac{2}{10}+\frac{5}{1000}$6+210+51000 as a decimal.
Write the fraction $\frac{11}{20}$1120 as a decimal.


text:
# Intuitive explanation of $(a^b)^c = a^{bc}$

What is an intuitive explanation for the rule that $(a^b)^c = a^{bc}$. I'm trying to wrap my head around it, but I can't really do it.

-
Maybe ask yourself why $(a^3)^7=a^{21}$. –  André Nicolas Sep 20 '11 at 5:02
This probably doesn't help the OP, but if you let $a$, $b$, and $c$ be sets, then the posted equation is essentially currying. –  Rahul Sep 20 '11 at 5:29

I will assume that $b$ and $c$ are positive integers and that $a$ is any "number" (it doesn't really matter much what $a$ is...).

Suppose I have $b \times c$ copies of the number $a$. I can arrange them into a $b \times c$ rectangular array: i.e., with $b$ rows and $c$ columns. When I multiply all $b \times c$ of these $a$'s together, I get $a^{bc}$.

On the other hand, suppose I look at just one column of the array. In this column I have $b$ $a$'s, so the product of all the entries in a column is $a^b$. But now I have $c$ columns altogether, so the product of all the entries is obtained by multiplying the common product of all the entries in a given column by itself $c$ times, or $(a^b)^c$.

Thus $a^{bc} = (a^b)^c$.

If you want to justify this identity when $b$ and $c$ are other things besides positive integers -- e.g. real numbers, or infinite cardinals -- that's another matter: please ask.

-
I like your explanation here, together with Zev's it broke through to me. I'm afraid I won't be able to understand your explanation for reals and infinite cardinals though, but I'll bite anyways :). Should I post a new question? –  Matt Munson Sep 20 '11 at 5:50
@Matt: I'm glad to help. Indeed my answer is similar to Zev's but expressed a bit more "geometrically". As for your other question: sure, you could post a followup asking about the case of real numbers and/or cardinal numbers. There would be a certain logic in not asking this question until you actually want/need to know the answer, but for such a basic and important question as this, other people would certainly be interested. So either wait until later or post it now, whichever you like. –  Pete L. Clark Sep 20 '11 at 6:24

When $b$ and $c$ are positive integers, we can make the following argument: $$(a^b)^c=\underbrace{(a^b)\times(a^b)\times\cdots\times(a^b)}_{c\text{ times}}=$$ $$\underbrace{\left(\underbrace{a\times a\times\cdots \times a}_{b\text{ times}}\right)\times\left(\underbrace{a\times a\times\cdots \times a}_{b\text{ times}}\right)\times\cdots\times \left(\underbrace{a\times a\times\cdots \times a}_{b\text{ times}}\right)}_{c\text{ times}}=$$ $$\underbrace{a\times a\times \cdots\times a}_{bc\text{ times}}=a^{bc}$$

-
+1 for excellent formula typesetting skills –  Kris Van Bael Sep 29 '11 at 21:33

If you want a physical, intuitive understanding, grab a slide rule. As you'll be manipulating the logarithmic forms of the exponents, it should become clear quite quickly.

-

It’s not a rule in the sense of a theorem, but of a definition. (In early mathematics training, even into calculus, there is a tendency, for administrative/teaching convenience, to conflate theorems and definitions, calling all such things “rules”.) It is simply a matter of the notation being chosen such that it is what we might call “fortuitous”. Let’s consider three other such instances.

1. x – y = x + (-y), as you can verify from numerical examples, but it is really a matter of definition: that is the fortuitous way in which x – y is DEFINED.

2. x/y = x(1/y), for y not equal to 0, as you can verify from numerical examples, but it is really a matter of definition: that is the fortuitious way in which x/y is DEFINED.

3. a raised to the power b = exp(b*log(a)), for positive a, as you can verify from numerical examples, but it is really a matter of definition: based on extensive numerical experience, that is the fortuitous way in which mathematicians decided to DEFINE a to the power b.

Now to your question. For positive a and arbitrary b and c (or arbitrary non-zero a and integer b and c), the expression a to the power of (bc) is DEFINED, for notational convenience, to be (a to the power of b) to the power of c. The fact that it is only a notational convenience can be seen if a is negative and not both b and c are integer . Presumably you would agree with the statement that in any (valid) mathematical expression, we should be able to reduce whatever fractions occur to lowest terms without affecting the value of the expression. But that does not happen if a is negative, say, -1, b is 2, and c = 1/4: ((-1 raised to the power 2))raised to the power (1/4) is 1, and this should equal (-1 raised to the (2/4) power), which equals (-1 raised to the 1/2 power), which is the imaginary unit, not unity.

So, the short answer to your question is: It is simply a fortuitous definition, based on extensive numerical experience. Your question arose simply from the fact that you were lacking a sufficient dose of that experience. It’s not enough to just think about it: you have to grok it.

-
I disagree with this answer. At some point we define $a^d$ when $d$ is any positive integer, for instance recursively: $a^0 = 1$, for $d \geq 1$, $a^d = a \cdot a^{d-1}$. Anyway, once we have made this definition, we do not need or get to make a new definition in the case $d = b \cdot c$. The result in question really is a proposition not a definition. (Of course it follows from certain definitions, as everything in mathematics does...) –  Pete L. Clark Sep 21 '11 at 3:15
@Pete L. Clark: That recursive definition gets discarded when the exp-log definition is finally embraced, much like a caterpillar shedding its cocoon to become a butterfly. –  Mike Jones Sep 21 '11 at 10:09
I had another comment where I explained that this argument makes sense for any element of a set endowed with a binary operation, in which context we generally do not have exponentials and logarithms...but I deleted that comment, perhaps because I felt there was insufficient evidence the OP was thinking in this way. (The point though is that the definition I gave is not "discarded": it is used in many parts of mathematics.) But anyway, I said for instance: I don't know of any reasonable definition of exponentiation for which the fact in question is true by definition. Do you? –  Pete L. Clark Sep 22 '11 at 4:52
It is similar to the situation with the factorial function. One can offer a strong plausibility argument why 0! = 1, but ultimately it is a matter of defintion. –  Mike Jones Sep 24 '11 at 21:30
In the situation of the factorial function $0! = 1$ defines the left hand side: i.e., the symbol $0!$ has not been given any prior meaning. But if we have already defined $x^a$ for positive integers $a$, then the identity $x^{ab} = (x^a)^b$ is a relation between two quantities which have already been defined, so it cannot be true by definition. In any case, I asked you for a reference to support your point of view. If you cannot or do not provide one, I don't see the point in continuing this discussion. –  Pete L. Clark Sep 25 '11 at 17:36


text:
# Clarification of Cauchy-Riemann equations

Theorem: Suppose that $$f(z)=u(x,y)+i\,v(x,y)$$ and that $f’(z)$ exists at a point $z_0=x_0+i\,y_0$. Then the first order partial derivatives of $u$ and $v$ must exists at $(x_0,y_0)$, and they must satisfy the Cauchy-Riemann equations $$u_x=v_y,\quad u_y=-v_x$$ there. Also, $f’(z_0)$ can be written $$f’(z_0)=u_x+i\,v_x,$$ where these partial derivatives are to be evaluated at $(x_0,y_0)$.

I understand that these equations provide necessary conditions for the existence of $f’(z_0)$ which is weaker than sufficient conditions. So my book, in the examples, states that, if the Cauchy Riemann equations are not satisfied then the derivative a function does not exist. Therefore, my question is, would I be able to use this theorem to find points in which a function is not differentiable?

• Yes. The function is not differentiable at those points which C-R equations fail. – Frank Lu Feb 22 '18 at 7:01
• @FrankLu thanks for confirming! – DMH16 Feb 22 '18 at 7:04
• For example, consider the function $f(z)=\frac{1}{z}$. With $z=x+\mathrm{i}y$ this leads to $f(z)=\frac{x}{x^2+y^2}+\mathrm{i}\frac{-y}{x^2+y^2}$ When Cauchy-Riemann equations are applied to the real and imaginary part, you will see that the CR equations are correct for both $u_x=v_y$ and $u_y=-v_x$ but the only problem is the origin (division by zero). – Christoph Feb 22 '18 at 7:41

Yes. Take, for instance $f(z)=|z|^2$. In this case, $u(x,y)=x^2+y^2$ and $v\equiv0$. So,$$\left\{\begin{array}{l}u_x(x,y)=v_y(x,y)\\u_y(x,y)=-v_x(x,y)\end{array}\right.\iff\left\{\begin{array}{l}2x=0\\2y=0\end{array}\right.$$and therefore $f$ is not differentiable at any $z$ for which $z\neq0$. It turns out that $f$ is differentiable at $0$:$$f'(0)=\lim_{z\to0}\frac{f(z)-f(0)}{z}=\lim_{z\to0}\overline z=0.$$This can also be deduced from the Cauchy-Riemann equations: since the domain of $f$ is an open set and $u$ and $v$ are continuously differentiable there, $f$ is differentable at $x+yi$ if and only if $(x,y)$ is a solution of the Cauchy-Riemann equations.


text:
[WP 34S] Working with matrices
Post: #1
 Michael de Estrada Senior Member Posts: 335 Joined: Dec 2013
[WP 34S] Working with matrices
Now that I have the printed manual and had the opportunity to read it in more detail, I am somewhat shocked at the rather primitive nature of matrix handling on the WP 34S as compared to the HP 42S, or even the HP 15C.

There is no matrix data type on the WP 34S, and matrices are defined by "descriptors" that point to a range of data registers where the matrix elements are stored. Matrix elements cannot be selected by their normal two digit row/column id, and instead it's up to the user to write down and remember which register contains which element. Furthermore, direct math operations cannot be performed e.g. RCL MAT1 RCL MAT2 x. In order to do this on the WP 34S one has to do something like RCL 89 RCL 99 70 h MATRIX Mx, where registers 89 and 99 contain the matrix descriptors and 70 is the base address for the result, which is not checked by the OS for overlap. In order to perform the equivalent of RCL MAT1 RCL MAT2 +, the only matrix operation I could find is M+x, which does not designate a result matrix and will overwrite the X matrix. To avoid this problem, one must first copy the X matrix to another non-overlapping set of registers something like RCL 89 RCL 99 70 h MATRIX M.COPY h MATRIX M+x. On the HP 15C, one simply defines data matrices A and B, and a result matrix C, where the results of all operations are automatically stored without overwriting the original matrices.

For example, I wrote the following program function for my HP 15C to use with the Solver to find eigenvalue roots:

PHP Code:
LBL ARCL MATRIX BXRCL MATRIX A-MATRIX 9RTN

Where the operation MATRIX 9 is the determinant. Also, prior to execution, The result matrix C was created with the same dimension as A and B.

On the WP 34S this became:

PHP Code:
LBL 'EGV'+/-RCL 89RCL 9970M.COPYM+xDETRTN

Which is far more cumbersome and difficult to understand IMO.

Of course, I may have missed something here, and welcome any input if there is a better way to do this.
01-14-2014, 10:12 PM
Post: #2
 Paul Dale Senior Member Posts: 1,396 Joined: Dec 2013
RE: [WP 34S] Working with matrices
You've got it correct. The matrix handling on the 34S isn't user friendly.

There isn't space in the numeric format to allow matrix descriptors (or even binary integers which is why we can't support both simultaneously) like the 15C. We don't have the concept of a typed stack like the 42S so we can't use that approach either.

On the plus side, the matrix operations are highly accurate

- Pauli
Post: #3
 Michael de Estrada Senior Member Posts: 335 Joined: Dec 2013
RE: [WP 34S] Working with matrices
Speaking of simple elegance, here's the code for the HP 42S:

PHP Code:
LBL  "FREQ"MVAR "EGV"RCL  "EGV"RCLx "MASS"RCL- "STIF"DETEND
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)


text:
Johnson Algorithm to find the shortest paths between all pair of vertices

Algorithms Graph Algorithms johnson algorithm dijkstra algorithm bellman ford algorithm shortest path

Johnson Algorithm is used to find shortest paths between every pair of vertices in a given weighted directed graph and here weights may be negative. Johnson Algorithm uses both Dijkstra and Bellman-Ford algorithms as subroutines.

Floyd-Warshall is most effective for dense graphs, while Johnson algorithm is most effective for sparse graphs. The reason that Johnson's algorithm is better for sparse graphs is that its time complexity depends on the number of edges in the graph.

Basically Johnson Algorithm uses:

• Bellman-Ford Algorithm in order to reweight the input graph for elimintaing negative edges and detect negative cycles.
• And then with modified graph, it uses Dijkstra's Algorithm to calculate shortest path between all pair of vertices.

Graph G is taken as input. Graph has a set of vertices V which maps to set of Edges E. Each edge, has their respective weights. This algorithm works on directed, weighted graphs.

Algorithm Steps

1. A new vertex is added to the graph G, and is connected by edges of zero weight to all other vertices in the graph. Let this modified graph be G'.

2. Run Bellman-Ford algorithm on G' with added new vertex as a source. Let the distance calculated by Bellman-Ford be h[0], h[1], h[2], ... h[V-1].

3. All edges go through a reweighting process that eliminates negative weight edges. New weight assigned is original weight + h[u] - h[v].

4. The added vertex is removed and Dijkstra's algorithm is applied on every node in the graph.

Pseudocode

Pseudocode for Johnson Algorithm:

Input : Graph G
Output : List of all pair shortest paths for G

Johnson(G){

G'.V = G.V + {n}
G'.E = G.E + ((s,u) for u in G.V)
weight(n,u) = 0 in G.V

Dist = BellmanFord(G'.V,G'.E)
for edge(u,v) in G'.E do
weight(u,v) += h[u] - h[v]
end

L = []        /*for storing result*/
for vertex v in G.V do
L += Dijkstra(G, G.V)
end

return L
}

Bellman-Ford : It is used to reweight the input graph to eliminate negative edges and detect negative cycles.

Dijkstra's Algorithm : It is an algorithm for finding the shortest paths between nodes in a graph.

Implementation

Implementation of Johnson's algorithm in Python:

MAX_INT = float('Inf')

def minDistance(dist, visited):

(minimum, minVertex) = (MAX_INT, 0)
for vertex in range(len(dist)):
if minimum > dist[vertex] and visited[vertex] == False:
(minimum, minVertex) = (dist[vertex], vertex)

return minVertex

def Dijkstra(graph, modifiedGraph, src):

num_vertices = len(graph)

sptSet = defaultdict(lambda : False)
dist = [MAX_INT] * num_vertices
dist[src] = 0

for count in range(num_vertices):

curVertex = minDistance(dist, sptSet)
sptSet[curVertex] = True

for vertex in range(num_vertices):
if ((sptSet[vertex] == False) and
(dist[vertex] > (dist[curVertex] +
modifiedGraph[curVertex][vertex])) and
(graph[curVertex][vertex] != 0)):

dist[vertex] = (dist[curVertex] +
modifiedGraph[curVertex][vertex]);

for vertex in range(num_vertices):
print ('Vertex ' + str(vertex) + ': ' + str(dist[vertex]))

def BellmanFord(edges, graph, num_vertices):

dist = [MAX_INT] * (num_vertices + 1)
dist[num_vertices] = 0

for i in range(num_vertices):
edges.append([num_vertices, i, 0])

for i in range(num_vertices):
for (src, des, weight) in edges:
if((dist[src] != MAX_INT) and
(dist[src] + weight < dist[des])):
dist[des] = dist[src] + weight

return dist[0:num_vertices]

def JohnsonAlgorithm(graph):

edges = []

for i in range(len(graph)):
for j in range(len(graph[i])):

if graph[i][j] != 0:
edges.append([i, j, graph[i][j]])

modifyWeights = BellmanFord(edges, graph, len(graph))

modifiedGraph = [[0 for x in range(len(graph))] for y in
range(len(graph))]

for i in range(len(graph)):
for j in range(len(graph[i])):

if graph[i][j] != 0:
modifiedGraph[i][j] = (graph[i][j] +
modifyWeights[i] - modifyWeights[j]);

print ('Modified Graph: ' + str(modifiedGraph))

for src in range(len(graph)):
print ('\nShortest Distance with vertex ' +
str(src) + ' as the source:\n')
Dijkstra(graph, modifiedGraph, src)

graph = [[0, -8, 2, 4],
[0, 0, 2, 6],
[0, 0, 0, 2],
[0, 0, 0, 0]]

JohnsonAlgorithm(graph)

Complexity

The main steps in algorithm are:

• Bellman Ford Algorithm called once
• Dijkstra called V times.

Time complexity of:

• Bellman Ford is O(VE)
• Dijkstra is O(VLogV).

So overall time complexity is O(V^(2)*log V + VE).

The time complexity of Johnson's algorithm becomes same as Floyd Warshell when the graphs is complete.

Worst Time complexity of above algorithm is O(V^(3) + V*E) as Dijkstra's Algorithm takes O(n^(2)).

Applications

• Johnson's algorithm is a shortest path algorithm that deals with the all pairs shortest path problem.
• It is used in case of Sparse graphs (graphs with a few edges)

References

• Introduction to Algorithms 3rd Edition by Clifford Stein, Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest

Nisarg Shah

Intern at Electromech Corporation Company (2018), DataOne Innovation Labs (2019), OpenGenus (2019) and DataThinker (2019). B. Tech (2017 to 2021) in IT at Ahmedabad University


text:
# All Questions

29 views

### Even natural numbers are sums of two primes with twins or of two primes without twins

I seems to be very few even numbers that can't be written as a sum of two primes with twins or as a sum of two primes without twins. That is, suppose that $\mathbb P'$ is the set of the primes not ...
21 views

### Stirling's formula problem [on hold]

Use stirling's formula to find: $$\displaystyle \lim_{n\to \infty}\dfrac {\ln(n!)}{n\ln(n)}$$ .
28 views

36 views

### Is this metric space normable?

Given the function $\rho:\mathbb{R}^n\to\mathbb{R}_+$ defined by $$\rho(x)=\log\left(\frac{\sum\left|x_i\right| e^{\left|x_i\right|}}{W\left(\sum\left|x_i\right| e^{\left|x_i\right|}\right)}\right)$$ ...
31 views

### Question about arc-connected property in a continuum

Suppose $X$ is metric, compact, connected, and $p\in X$. An arc is a copy of $[0,1]$. Is it possible that every two points in $X\setminus \{p\}$ can be joined by an arc, but there is no arc in $X$ ...
25 views

### Conditional probability using set notation [on hold]

Got this wrong on a quiz and i don't have the answers. Need to figure this out for a test coming up. \begin{align} P(A) &= 0.75 \\ P(B\mid A) &= 0.9 \\ P(B\mid A^c) &= 0.8 \\ P(C\mid A\...
23 views

### '2nd order' Picard Iteration

I'm self-studying differential equations using MIT's publicly available materials. One of the problem set exercises deals with what I'm calling a second order Picard Iteration. To be explicit, we ...
59 views

### A tricky integral - $\int_0^1 \sqrt{\frac{1}{(1-t^2)^2}-\frac{(n+1)^2t^{2n}}{(1-t^{2n+2})^2}}dt$

Evaluate: $$\int_0^1 \sqrt{\frac{1}{(1-t^2)^2}-\frac{(n+1)^2t^{2n}}{(1-t^{2n+2})^2}}dt$$ Where $n$ is any positive integer. Introduction: This integral came up while studying the distribution ...
9 views

### Are there any examples of higher order ireducible linear differential operators?

Given a monic, linear differential operator $L = D^n + f_{n-1}(x)D^{n-1} + \dots + f_1(x) + f_0(x)$, say $f_0, \dots, f_{n-1}$ analytic for simplicity's sake, we say that $L$ is irreducible if there ...
25 views

43 views

### Evaluate the following: [on hold]

$$1) \cos 2 \theta + \cos 2 \phi$$ and $$2) \sin(\theta + \phi)$$ If $$\sin\theta + \sin\phi = a$$ and $$\cos \theta + \cos\phi = b$$ please provide a detailed solution. I could not ...
23 views

### The Jeep Problem and Nash's Friends

The classical jeep problem is the following. A jeep can carry a maximum load of fuel of 1 gallon, and it travels $l$ miles with $l$ gallons of fuel. The jeep moves along a straight line, and is ...
15 views

### Solve for and Plot the Relationship Between Mean and Standard Deviation of a Normal Distribution Conditional on Satisfaction of A System of Equations

I am trying to use Mathematica, R, or Matlab to solve for (since it cannot seem to be solved analytically) and plot the relationship between mean and standard deviation of a normal distribution ...
38 views

### Is the relation $R$ on $\Bbb N$ given by $(a,b)\in R\iff a\mid b$ an equivalence relation?

$R \subset \Bbb N \times \Bbb N$ Is this an equivalence relation? $$R=\{(a,b)\in \Bbb N\times \Bbb N\,:\,a\mid b\}$$ I would argue that it is reflexive because $a\mid a$, but it is not symmetric ...
28 views

### For which values of t does a matrix not have eigenvalues

I need help solving this problem "For which values of real parameter t does the matrix: \begin{bmatrix} π^2t^2 & 36\\ -36 & 0 \\ \end{bmatrix} NOT have real eigenvalues. Thank you.
82 views

### What is the definition of real numbers? [duplicate]

I only know that the rational and irrational are together called real numbers. Rational numbers can be written in the form $\frac {p}{ q}$ ,where $p \in \mathbb Z$ and $q \in \mathbb Z$. Are there ...
18 views

### Homolorphic vector bundles on almost complex manifolds

Let $M$ be a real manifold with complex structure $J$, making $M$ into an almost complex manifold. I know that the complexification $T_{\textbf{C}}M = TM\otimes \textbf{C}$ of the tangent bundle $TM$ ...
10 views

### Minimum vertex cover exact algorithm analysis

An exact algorithm to find a minimum vertex cover in a simple, undirected graph would be based on the following recursive idea: "either a vertex v is in the minimum cover, or all of its neighbors are"....


text:
# Evaluate the following integral . (Do any wo [II_ z av where E is bounded by the cylinder y 31.

###### Question:

Evaluate the following integral . (Do any wo [II_ z av where E is bounded by the cylinder y 31. and 0 in the first * ocian. and all tie plancs (Ans 27/8) ALSuI (Ans 7i8-343) ) 3r4-7 drd& 65- dzdrde

#### Similar Solved Questions

##### A university has found that there is a relationship betweenscores on an admission examination, and studentsâ€™ performance. Theevidence for this relationship is a positive and statisticallysignificant correlation between test scores and freshman gradepoint average. What type of validity evidence is this?a. Constructb. Face validationc. Concurrrentd. Predictivee. ContentA psychologist is considering using a new test to assess hispatientsâ€™ depression. The psychologist has found that patientsâ€™p
A university has found that there is a relationship between scores on an admission examination, and studentsâ€™ performance. The evidence for this relationship is a positive and statistically significant correlation between test scores and freshman grade point average. What type of validity evi...
(tog: Include two t0 three organs Complete the table with the function of the systems and organs of the those humans Be as specific as possible malcs and femalcs_ Compare each organ Comparison each Organ to human'$ENCTONSLof List 2 - organs observed (functio., location, size ..) moesuatem (J p... 1 answer ##### Python question 2. (10 points) Consider the set objects in Python shown below.  Use a... python question 2. (10 points) Consider the set objects in Python shown below.  Use a Python set method to create a new set, setC that contains  only the items that are in seta but not in setb. seta setb {'Sue', 'Jon', 'Samir'} { 'Rob', 'Marta', '... 1 answer ##### Horacio agrees to paint Stella's house for$1,000 Horatio fails to paint and Stella hires Winston...
Horacio agrees to paint Stella's house for $1,000 Horatio fails to paint and Stella hires Winston to paint the house for$1,000 Stella Sue's Horacio for breach of contract seller will likely receive what kind of damage is a liquidated be consequential see nominal...
##### The Regal Cycle Company manufactures three types of bicycles-a dirt bike, a mountain bike, and a...
The Regal Cycle Company manufactures three types of bicycles-a dirt bike, a mountain bike, and a racing bike. Data on sales and expenses for the past quarter follow: Dirt Total Bikes $933,000$270,000 469,000 110,000 464,000 160,000 Mountain Racing Bikes Bikes $409,000$ 254,000 208,000 151,000 20...
##### 12. A +10uC charge is held at a distance of 5.0mm from a +304C charge. A...
12. A +10uC charge is held at a distance of 5.0mm from a +304C charge. A what distance from the +10uC will the electric field between the two charges equal zero? Hint: Let the distance from the +104C charge to the point be "" and the distance from the +30uC charge be 5-r". answer 13. Com...
##### When will the object hit the ground?
When will the object hit the ground?...
##### CHU JJU _OUU15 U- TUU.. Remaining Time: 1 hour, 58 minutes, 28 seconds. Question Completion Status:...
CHU JJU _OUU15 U- TUU.. Remaining Time: 1 hour, 58 minutes, 28 seconds. Question Completion Status: QUESTION 5 10 points Based on the Eagle Group's experience, which of these is NOT an important tenet of the symbolic frame? how someone becomes a group member is extremely important diversity supp...
##### P9-7 Calculating IRR (LO5) A firm evaluates all of its projects by applying the IRR rule....
P9-7 Calculating IRR (LO5) A firm evaluates all of its projects by applying the IRR rule. The IRR for the following project is percent. If the required return is 26 percent, the firm should (Click to select the project. (Do not include the percent sign (%). Round your answer to 2 decimal places. (e....

-- 0.087899--


text:
# Ask Uncle Colin: An Exponential Limit

Dear Uncle Colin,

I need to work out the limit of $\frac{2^{3x} - 1}{3^{2x}-1}$ as $x \to 0$, and I don’t have any ideas at all. Do you?

- Fractions Rotten, Exponents Generally Excellent

Hi, FREGE, and thanks for your message!

There are a couple of ways to approach this: you should choose between them depending on whether you’re allowed to use L’Hopital’s rule.

## L’Hopital’s rule

You can use L’Hopital’s rule1 whenever you’re working with the limit of a fraction, such that both the top and the bottom evaluate to zero in the limit; or if they both tend to infinity in the limit. When this condition is met, the limit of the fraction $\frac{f(x)}{g(x)}$ is the same as the limit of the derivatives of the two bits: $\frac{f’(x)}{g’(x)}$.

So, in this case, $f(x) = 2^{3x}-1$, which is zero when $x=0$, and differentiates to $f’(x) = 3\ln(2) 2^{3x}$. When $x=0$, that’s just $3\ln(2)$.

The bottom goes very similarly: $g(x) = 3^{2x} - 1$ (which is zero in the limit) and $g’(x) = 2\ln(3) 3^{2x}$, which is $2\ln(3)$.

That makes the limit of the original fraction $\frac{3\ln(2)}{2\ln(3)}$.

## The “proper” way

Alternatively, we can rewrite the fraction as $F(x) = \frac{e^{3\ln(2)x} - 1}{e^{2\ln(3)x}-1}$.

I know some things about $e^{kx}-1$, let me tell you. For example, I know that $kx < e^{kx}-1 < k\left(x+x^2\right)$, certainly for small $0<x<1$.

That’s helpful! It means that as long as $0 < x < 1$, we know $\frac{3\ln(2) x}{2\ln(3) (x + x^2)} < F(x) < \frac{3\ln(2) (x + x^2)}{2\ln(3)x}$. (Note that the first fraction has the smallest possible top and largest possible bottom, and vice versa).

Now let’s simplify:

$\frac{3\ln(2)}{2\ln(3) (1+x)} < F(x) < \frac{3\ln(2) ( 1+x)}{2\ln(3)}$.

As $x$ approaches 0, the lower fraction approaches $\frac{3\ln(2)}{2\ln(3)}$ - and so does the upper one! Since $F(x)$ is between those, it must also approach the same limit2.

I hope that helps!

- Uncle Colin

## Colin

Colin is a Weymouth maths tutor, author of several Maths For Dummies books and A-level maths guides. He started Flying Colours Maths in 2008. He lives with an espresso pot and nothing to prove.

1. discovered by Bernoulli []
2. I never know whether to call this the ‘squeeze theorem’ or the ‘sandwich theorem’. []

#### Share

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Sign up for the Sum Comfort newsletter and get a free e-book of mathematical quotations.

No spam ever, obviously.

##### Where do you teach?

I teach in my home in Abbotsbury Road, Weymouth.

It's a 15-minute walk from Weymouth station, and it's on bus routes 3, 8 and X53. On-road parking is available nearby.


text:
# How to minimize Nelson-Siegel parametric form

Problem
I am given the following function to minimize (w.r.t. $$\theta$$) $$f= \sum_{k=1}^5 \Big [ \sum_{i=1}^{N_k} CF_{k, i} \cdot e^{-r(t_{k, i}, \theta)\cdot t_{k, i}} - P_k^* \Big]^2$$ where $$\theta = (\beta_0, \beta_1, \beta_2, \lambda)$$ and $$r(t, \theta) = \beta_0 + \beta_1 \big(\frac{1-e^{-\frac{t}{\lambda}}}{\frac{t}{\lambda}} \big) + \beta_2 \big(\frac{1-e^{-\frac{t}{\lambda}}}{\frac{t}{\lambda}} - e^{-\frac{t}{\lambda}} \big)$$

Context
We are given 5 bonds, their cashflows, $$CF_{k, i}$$, and market price, $$P_k^*$$. All these values are given to us as numbers.

My attempt
I tried to apply Newton's Method using python. However, I am pretty sure that this method is not applicable here, and I need another minimization algorithm.

Could anyone suggest which algorithm is the best for such a function? ?


text:
Showing $\sum x_n\sin(nx)$ converges uniformly

Show the $\sum\limits_{n = 1}^\infty x_n\sin(nx)$ converges uniformly iff $nx_n →0$ as $n →\infty$, where $x_n$ is a decreasing sequence and with $x_n>0$ for all $n=1,2,\cdots$.

My attempt was with M-test. I took $M_n= nx_n$. Since $\sin(x)$ is bounded by $1$, I claim that $M_n >x_n\sin(nx)$ and we have $\sum M_n >\sum x_n\sin(nx)$. Then if $\sum M_n$ converges we have $\sum x_n\sin(nx)$ converges uniformly by theorem.

My problem here is question asking with iff. If $\sum M_n$ converges we know $|M_n|→0$. But I could not understand how we can show the opposite direction in this case. I mean if $|M_n|→0$ we can not be sure if $\sum M_n$ converges or not from the harmonic series case. Could you help me on that?

You cannot do this by directly applying some test for convergence. The proof involves 'summation by parts' and some calculations involving $\sin (nx)$ which are basic to Fourier series. A complete proof can be found here: Theorem 7.2.2 (part 1), p. 112 of Fourier Series: A Modern Introduction by R. E. Edwards. [ If the numbers don't match look for 'The series (C) and (S) as Fourier series' in the contents page].


text:
# Current drawn by microcontroller

How to estimate current drawn by microcontroller(on the ADC port) when interfaced to a module/IC/sensor theoretically?

• If you can give us a link to the datasheet for your microcontroller, we can probably show you where this is specified. Dec 9 '18 at 16:01
• – Megh
Dec 9 '18 at 16:05

The parameters of the pin you are interested in are the "LOW-level input current" and "HIGH-level input current". In case of that MCU it is 3 µA.

For the ADC you also have to factor in the sample and hold capacitance which is the "analog input capacitance" (1 pf). Also look at figure 12 "Suggested ADC interface", it shows the ADC input in more detail.

• will it be right to say that this the load current if we are measuring the power consumed by the sensor?
– Megh
Dec 9 '18 at 16:29
• Sensor power consumption and sensor output current are (almost) totally independent. You can have a sensor that consumes 5W to run a heater and still outputs just 1 mA signal.
– filo
Dec 9 '18 at 16:33
• So now if I need to calculate the power consumed by a sensor(specifically analog type temp sensor) interfaced to my controller, I need to find P=VI, where V is the supply voltage and I is the sum of load current and quiescent current at that very temperature. So what should I take as the load current?
– Megh
Dec 9 '18 at 16:39
• Which sensor? Thermocouple? Pt100? LM35? Provide a datasheet.
– filo
Dec 9 '18 at 16:40
• @Megh, I showed how in my answer. Given the specs filo pointed out, though, I am not sure the datasheet is 100% self-consistent, and to be conservative you should probalby use the 3 uA figure. Dec 9 '18 at 16:59

This isn't specified directly in your datasheet, but there are a couple of clues in there.

First, there's a spec for the maximum resistance of the sensor or signal conditioning circuit that drives the ADC:

where Note 8 refers us to Figure 11:

The limit on the source resistance tells us that the maximum input leakage current, when run through a 40 kΩ resistor, won't cause a voltage drop big enough to disturb the ADC reading (by more than the specified absolute error of counts). Taking the minimum VDDA value of 2.6 V, divided by the resolution of the ADC of 1024 levels, this implies

$$I_l < 4 \frac{2.5\ {\rm mV}}{40\ {\rm k\Omega}}$$


text:
## 155 Reputation

7 years, 235 days

## Getting a smooth DEplot3d from a stiff s...

Maple 18

I've been trying to make a smooth plot of some ODEs. It should show C rapidly increasing at the innitiation, until they get into a quassi steady state,  and then all three variables increase much slower. This should look like a roughly straight line that elbows sharply into a smooth curve.

Any attempt to DEplot3d it i've made either just shows the time before the quassi steady state is reached, so shows the straight line; or smooths that time together with the next period, making the straight line look like a part of the smooth curve.

Model := [diff(B[1](t), t) = k[a1]*C(t)*(R-B[1](t)-B[2](t))-k[d1]*B[1](t), diff(B[2](t), t) = k[a2]*C(t)*(R-B[1](t)-B[2](t))-k[d2]*B[2](t), diff(C(t), t) = (-(k[a1]+k[a2])*C(t)*(R-B[1](t)-B[2](t))+k[d1]*B[1]+k[d2]*B[2](t)+k[m]*((I)(t)-C(t)))/h];
DissMod := subs((I)(t) = 0, Model);
AssMod := subs((I)(t) = C[T], Model);

Pars := [k[a1] = 6*10^(-4), k[d1] = 7*10^(-3), k[a2] = 5*10^(-4), k[d2] = 10^(-2), R = .5, k[m] = 10^(-4), C[T] = 100, h = 10^(-6)]

StateSol := DEplot3d(subs(Pars, AssMod), [B[1](t), B[2](t), C(t)], t = 0 .. 1000, number = 3, B[1] = 0 .. .5, B[2] = 0 .. .5, [[B[1](0) = 0, B[2](0) = 0, C(0) = 0]], scene = [B[1](t), B[2](t), C(t)], maxstep = .1, maxfun = 0, method = l)

## plotting the intersection of two deforme...

Maple 18

I have two deformed planes, that i would like to draw with 3dplot, as well as drawing a curve marking their intersection.

the curves are given by the expressions:

C = -(k[d2]*B[2]+I*k[m]+k[d1]*B[1])/((B[1]+B[2]-R)*k[a1]+(B[1]+B[2]-R)*k[a2]-k[m]),

C = k[d1]*B[1]/(k[a1]*(R-B[1]-B[2]))

evaluated at

Pars := [k[a1] = 6*10^(-4), k[d1] = 7*10^(-3), k[a2] = 5*10^(-4), k[d2] = 10^(-2), R = .5, k[m] = 10^(-4), C[T] = 100, h = 10^(-6)]

with the variables B[1],B[2] and C within the bounds [0..0.5],[0..0.5],[0..100].

My method was to try and use solve to find a formula for the intersection curve- but i couldn't get 3dplot to plot it!

## exporting to latex...

Maple 2015

I have exported a maple document to latex, but it only shows the output of the commands used. Rather than the commands, and the procedures.

How do I get both to export together? and show up together?

## Describing the length of an equation...

My PhD involves generating equations that are very long, in some cases, more than 10 pages long.

For the reader its much more useful to have some of these equations described than presented. One of the descriptions I'd like to use is number of characters and intuitively the command Length feels like it should tell you the number of characters in an expr

However what is written on the help page for this function I don't understand:
https://www.maplesoft.com/support/help/maple/view.aspx?path=length

 For other objects, the length of each operand of expr is computed recursively and added to the number of words used to represent expr. In this way, the measure of the size of expr is returned.

then the example that is given is

 >length(x+2y) length(x+2y)
 99 (5)

Could anyone explain to me what is meant when it is said length(x+2y)=9? if I try an apply things recursively the expression with the most chatracters i can generate is "x+y+y"which is only 5 characters.

Is there another command that would be better suited to my purposes?

## Asterisk tickmarks in DEplot...

Maple 2015

I am trying to use y* to label a point on the axis of a graph made with DEplot, and am currently unable to.

with(DEtools);
NLC := diff(y(t), t) = k*(Am-y(t));
Am := 20; k := .1;
ivs := [y(0) = 10, y(0) = 30, y(0) = 50];
DEplot(NLC, y(t), t = 0 .. 20, ivs, tickmarks = [default, [20 = y^*]], font = [default, default, 30]);

makes y* apear as the label, as does the code

tickmarks = [default, [20 = y^*]]

wheras if i remove the  marks I get an error

 First 10 11 12 13 14 15 Page 12 of 15


text:
## A pilot case study on the impact of a self-prescribed ketogenic diet on biochemical parameters and running performance in healthy and physically active individuals

• Background: Ketogenic diets (KDs) have gained some popularity not only as effective weight-loss diets and treatment options for several diseases, but also among healthy and physically active individuals for various reasons. However, data on the effects of ketosis in the latter group of individuals are scarce. We therefore collected pilot data on the physiological response to a self-prescribed ketogenic diet lasting 5-7 weeks in a small cohort of healthy and physically active individuals. Methods: Twelve subjects (7 males, 5 females, age 24-60 yBackground: Ketogenic diets (KDs) have gained some popularity not only as effective weight-loss diets and treatment options for several diseases, but also among healthy and physically active individuals for various reasons. However, data on the effects of ketosis in the latter group of individuals are scarce. We therefore collected pilot data on the physiological response to a self-prescribed ketogenic diet lasting 5-7 weeks in a small cohort of healthy and physically active individuals. Methods: Twelve subjects (7 males, 5 females, age 24-60 years) who followed moderate to intensive exercise routines underwent blood testing, bioelectrical impedance analysis (BIA) and spiroergometry during an incremental treadmill test. On the next day, they went on a self-prescribed KD for a median of 38 days (range 35-50 days), after which the same tests were performed again. Ketosis was self-monitored by urinary ketone strips. Subjective feeling during the diet was assessed by a questionnaire after the intervention. Due to the small and heterogenous sample, the results are interpreted in the context of the already existing literature. Results: The KDs were tolerated well by the majority of individuals. Impaired recovery from exercise remained the most frequently reported side effect until the end of the study. Most blood parameters remained stable during the intervention. However, there were significant elevations of total and LDL cholesterol concentrations (p<0.01) and a trend towards increased HDL-cholesterol (p=0.05). The drastic reduction of carbohydrates had no statistically significant influence on running performance judged by the time to exhaustion, VO2max and respiratory compensation points. BIA measurements showed significant increases in phase angle (p=0.01) indicating improvements of body composition with an estimated decrease of 3.4 kg of fat mass (p=0.002) and gain of 1.3 kg of fat free mass. We discuss the validity of these estimates taking into account a possibly altered hydration status due to the KD. Conclusions: Active healthy individuals will probably experience no major problems during a short term KD lasting several weeks. The drastically reduced carbohydrate content of the diet seems to be no limiting factor for running performance. In addition, improvements in body composition can be expected. While most biochemical parameters are not influenced by the diet, there seems to be an impact on the blood lipid profile that could be considered problematic with respect to cardiovascular disease risk. However, the predictive role of cholesterol levels alone in individuals undergoing regular physical activity remains to be elucidated.

$Rev: 13581$


text:
# Average life expectancy..exponential function

Let $$N_0 = \text{initial number of AIDS patients}$$ $$N= \text{number of patients left}$$

The equation is given by: $$N=N_0\exp(-kt)$$ What is the average life expectancy of one person? (The answer is $t= \frac1k$)

How did we get to this answer without using expected value and probably/statistics analysis? (differential equations problem) Thanks in advance.

Edit: I know how to come up with the answer using expected value, but the problem is presented as a differential equations one.

• Hint. Do you know the integral that computes the expected value of a continuous distribution? And please format with mathjax: math.meta.stackexchange.com/questions/5020/… – Ethan Bolker Mar 27 '18 at 23:43
• Hello.. i know how to come up with the answer using expected value, but the problem is presented as a differential equations one. I am asking for a friend currently taking a DE course.. sorry about mathjax but i cannot format using my phone. – J.Moriarty Mar 27 '18 at 23:48
• Thank you Karn for formatting. – J.Moriarty Mar 27 '18 at 23:54

The answer is not very rigorous since, as you know, the DE itself is derived using expectation and average out everything but I think you will get the overall idea.

Let $N(\tau)=N_0-n$, $N(\tau+\delta)=N_0-(n+1)$. Hence, one life has lapsed in time $\delta$.

$$\tau=\frac{1}{k}\ln\frac{N_0}{N_0-n}$$ $$\tau+\delta=\frac{1}{k}\ln\frac{N_0}{N_0-(n+1)}$$

$$\delta=\frac{1}{k}\left(\ln\frac{N_0}{N_0-(n+1)}-\ln\frac{N_0}{N_0-n}\right)=\frac{1}{k}\left(\ln\frac{N_0-n}{N_0-(n+1)}\right)$$

Since this must hold true for all $n>1$,

$$\text{life expectancy}=\lim_{n\to \infty}\delta=\lim_{n\to \infty}\frac{1}{k}\left(\ln\frac{N_0-n}{N_0-(n+1)}\right)=\frac1k$$

• Thank you very much Karn. I understand the error was in presenting the problem as a differential equations one, as it really is more than that. Thanks for the answer. – J.Moriarty Mar 28 '18 at 0:18
• @J.Moriarty You are welcome :) I just edited the answer to be more rigorous now please check the edited ver out. – Karn Watcharasupat Mar 28 '18 at 0:19
• Yep this is better. Thank you! – J.Moriarty Mar 28 '18 at 0:23


text:
Address 2 Worlds Fair Dr, Somerset, NJ 08873 (732) 356-7700

# latex error undefined references Readington, New Jersey

Wardogs in Modern Combat Sieve of Eratosthenes, Step by Step Specific word to describe someone who is so good that isn't even considered in say a classification Why did Fudge and Please refer to it from somewhere inside a section body, i.e. \section{And now for something completely different} This is a reference to chapter \ref{foobar}. We add a reference to it using the \ref{} command, which just takes that same text string as an argument, e.g. If I download the whole set of files (or save to Dropbox) they all compile without modification in my local texlive installation, and the citations appear OK!

If you send us the link to your document (www.writelatex.com/contact), we'll have a look. At that state, they become useful because they tell you something is amiss and needs to be corrected. invalid email (thinking…) Reset or sign in with UserVoice password Forgot password? Edit: Hash.cpp file #include #include #include "Hash.h" using namespace std; void Hash::insert(int key, char value){ *hashFN[key]->addFront(value); cout << "Success!" << endl; } Trying to compile via terminal now with:

If you wish to cite more that one reference at the same time, do the following: \cite{ref_key1, ref_key2, ..., ref_key3}. How to use color ramp with torus more hot questions question feed lang-tex about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Uploading a preprint with wrong proofs 4 dogs have been born in the same week. If you haven't defined Hash class member functions, you need to do that first, then compile Hash.cpp and main.cpp then link them properly.

I personally use the former, but remember that the order you input them (or any data within an entry for that matter) is customisable and so you can get BibTeX to Gender roles for a jungle treehouse culture Yinipar's first letter with low quality when zooming in Why does Luke ignore Yoda's advice? Why won't LaTeX generate any output? The structure of the file is also quite simple.

Last revised 06/15/06 MacKichan Software, Inc. • 19307 8th Avenue, Suite C • Poulsbo, WA 98370-7370 Phone: 360-394-6033 • Toll-free: 877-724-9673 • Fax: 360-394-6039 Please email comments and suggestions regarding this bibtex citing miktex texmaker share|improve this question asked May 1 '15 at 16:36 Marc K. 5614 marked as duplicate by Johannes_B, moewe, Werner, Paul Gessler, egreg May 1 '15 at 18:16 BibTeX expects you to explicitly label the beginning and end of each value. The numeric style of citation is quite common in scientific writing.

C++ delete a pointer (free memory) How to know if a meal was cooked with or contains alcohol? The package lastpage defines the label LastPage, and your previous question showed that this package is used. More discussion is available at Why does an environment's label have to appear after the caption?. This key must be unique for all entries in your bibliography.

I don't have a deep knowledge of LaTeX code and can't spend hours finding a fix for warning message, sorry. The strange thing is that the references appear in the \bibliography command. Comment 3 John Smith 2005-05-16 04:40:21 EDT Created attachment 114415 [details] source file with a chapter Comment 4 John Smith 2005-05-16 04:42:03 EDT I have just added the line \chapter{Here's a When the linker tries to create the entire program, it then complains that the implementation (toHash::insert(int, char)) cannot be found.

In it, you'll get: The week's top questions and answers Important community announcements Questions that need answers see an example newsletter By subscribing, you agree to the privacy policy and terms Comment 5 Jindrich Novy 2005-05-16 05:07:04 EDT You need to pass the source through LaTeX twice in order to get correct references. It is a question that can have multiple answers, due to the same error message having multiple causes. Also, make sure the name of the .bst file you want to use is reflected in the \bibliographystyle{style} command (but don't include the .bst extension!).

Format For Printing -XML -Clone This Bug -Top of page First Last Prev Next This bug is not in your last search results. The punctuation used between years, in multiple citations when there is a common author. There is no error but the simple warning sequence: LaTeX Warning: Citation testcite' on page 1 undefined on input line 10 LaTeX Warning: There were undefined references. It's not uncommon to find .bib files on websites that people compile as a list of their own publications, or a survey of relevant works within a given topic, etc.

The condition can also occur if you specify only one LaTeX pass when you compile, especially when your document is a master document. How do spaceship-mounted railguns not destroy the ships firing them? I used the * symbol to eliminate numbering in subsections, because I am using test names with number so there is no need to add numbering. I assume the error occurs somewhere in my TexMaker settings.

This package is quite flexible, especially as you can easily switch between different citation styles by changing a single parameter. Wardogs in Modern Combat Is it legal to bring board games (made of wood) to Australia? I have created a very simple .bib and .tex file: The .tex file: % test.tex \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \title{Bibtex Test} \begin{document} Cite this\cite{testcite} \bibliographystyle{plain} \bibliography{references} \end{document} The.bib file: % references.bib @BOOK{testcite, Compute the Eulerian number "the Salsa20 core preserves diagonal shifts" Just a little change and we're talking physical education How to concatenate three files (and skip the first line of one


text:
# Simplifying an expression

• Sep 18th 2009, 04:28 PM
frozenflames
Simplifying an expression
the one that is still confusing me is the simplification of:

Imageshack - 07e3be3572344e492265b64
• Sep 18th 2009, 04:36 PM
redsoxfan325
Quote:

Originally Posted by frozenflames
thanks a lot, but i figured that one out.

the one that is still confusing me is the simplification of:

Imageshack - 07e3be3572344e492265b64

$\frac{\frac{2}{a+h}-\frac{2}{a}}{h}$

Start by finding common denominators for the two fractions in the numerator and combining them into one fraction:

$\frac{\frac{2}{a+h}-\frac{2}{a}}{h}=\frac{\frac{2a}{a(a+h)}-\frac{2(a+h)}{a(a+h)}}{h}$ $=\frac{\frac{2a-2(a+h)}{a(a+h)}}{h}=\frac{\frac{2a-2a+2h}{a(a+h)}}{h}=\frac{\frac{2h}{a(a+h)}}{h}$

To divide fractions, multiply the top fraction by the reciprocal of the bottom one:

$\frac{\frac{2h}{a(a+h)}}{h}=\frac{2h}{a(a+h)}\cdot \frac{1}{h}=\frac{2h}{ah(a+h)}$

Cancel the $h$'s and you're done:

$\frac{2h}{ah(a+h)}=\boxed{\frac{2}{a(a+h)}}$


text:
# What is the weight equation through general relativity?

The gravitational force on your body, called your weight, pushes you down onto the floor. $$W=mg$$ So, what is the weight equation through general relativity?

• If you like this question you may also enjoy reading this Phys.SE post. – Qmechanic Jan 3 '13 at 1:51

Start with the Schwarzschild metric $$ds^2 = (1-\frac{r_S}{r})c^2dt^2-(1-\frac{r_S}{r})^{-1}dr^2-r^2d\Omega^2$$ where $$r_S=\frac{2GM}{c^2}$$ A particle at rest at radius $r$ and angular parameters zero from the centre of mass has worldline $$x^{\mu}=(t, r, 0, 0)$$ Its four velocity is thus $$u^{\mu}=\frac{dx^{\mu}}{d\tau}=((1-\frac{r_S}{r})^{-\frac{1}{2}}, 0, 0, 0)$$ Its four-acceleration is $$a^{\mu}= \frac{du^{\mu}}{d\tau}+\Gamma^{\mu}_{\alpha \beta}u^{\alpha}u^{\beta}$$ After looking up the Christoffel symbols, because I'm lazy, I get $$a^{\mu} = (0, \frac{c^2r_S}{2r^2}, 0, 0)$$ So the Lorentz norm squared of the four-acceleration is $$g_{\mu \nu}a^{\mu}a^{\nu}= \frac{c^4r_S^2}{4r^4(1-\frac{r_S}{r})}=\frac{G^2M^2}{r^4(1-\frac{2GM}{c^2r})}$$ Now the proper acceleration of an object at time t is the acceleration relative to an observer in free fall, who is momentarily at rest w.r.to the object at time t. The free fall guy is the one who is not accelerating - the object held at rest at radius r is the one who is accelerating. As we've shown, his acceleration is $$\frac{GM}{r^2}\frac{1}{\sqrt{1-\frac{2GM}{c^2r}}}$$ So if you want to define a force, it would be $$F=ma=\frac{GMm}{r^2}\frac{1}{\sqrt{1-\frac{2GM}{c^2r}}}$$ As $c\rightarrow \infty$ we recover the Newtonian definition, but nobody bothers phrasing it in these terms.

• @CrazyBuddy Hah, it's only awful when you try to shoehorn concepts like forces into GR. That's why textbooks avoid them - all you need is the Einstein equation and the geodesic equations as Lubos mentioned. Then it becomes an object of beauty! – twistor59 Dec 22 '12 at 13:57
• "How do you guys learn such things..?" - very slowly and painfully! :-) – John Rennie Dec 22 '12 at 14:43
• @CrazyBuddy Or at a decent rate, and very much not painfully, if you happen to get the one-in-a-million combination of a great instructor and a great text ;) (GR is the only branch of physics where this happened for me) – user10851 Dec 23 '12 at 5:08
• Twistor, a fun answer but bizarre one, too. You at most tried to incorporate one particular GR correction and it is not the largest one. In your metric, you neglected the spin of the Earth and the associated interesting GR phenomena including frame-dragging and, more importantly, the already Newtonian centrifugal and Coriolis force that get mixed with the relativistic corrections. All those things are irrelevant in practice because they combine to some $W=mg$ at the end with some $g$ when the impact on classical mechanics is calculated. – Luboš Motl Dec 23 '12 at 5:40
• @LubošMotl that's because I only know how to calculate simple things! – twistor59 Dec 23 '12 at 8:27

Morally speaking, the formula is still obeyed in general relativity. However, both $W$ and $g$ become sort of obsolete quantities in general relativity, so we would never describe the behavior of the physical system in this way.

In general relativity, the gravitational acceleration $g$ has to be carefully replaced by a quantity that encodes the Christoffel connection for the metric. The connection isn't a proper tensor so the numerical values strongly depend on the choice of the coordinates. In various coordinates, one could write an equation that would resemble $W=mg$. At the end, however, we would be interested in the motion of an object, so we would be forced to rewrite $W$ as $ma$ in general relativity as well as $a$ would have to be calculated from the world line of the moving object etc.

In the same, as the previous sentences already hinted, $W$ is kind of obsolete. In general relativity, it's easiest to study the free fall of the objects – gravity is the only force that acts in this case. The free fall is described by the condition that the world line is a geodesic, $\delta \tau_{\rm proper} = 0$: the proper time along the world line is maximized (yes, maximized, it's not a mistake, the sign is unusual due to the Minkowski signature). In this form, the law is independent of the mass of the object, which isn't surprising given the equivalence principle underlying GR (all objects are affected by the gravitational field to the same extent).

If the object weren't moving in a free fall, one would have to describe the other forces that act on the object using the language of mechanics of the continuum – essentially field theory. General relativity doesn't describe macroscopic objects by "several numbers" such as positions and velocities. It requires us to describe the pressure etc. at every point of the objects and study how the pressure evolves and how it is affected by the spacetime curvature. So mechanical formulae of the type $W=mg$ are only good to describe point masses in GR: they're just inappropriate for extended objects. And for point masses, the only "long distance forces" that could act in a controllable way are the electromagnetic forces. Forces caused by the mutual contact of bodies require the bodies to be macroscopic, and then the usage of the field theory formalism of GR is necessary.

To summarize, $W=mg$ is an example of the obsolete language of Newton's mechanics and general relativity doesn't modify just some precise functional dependence in similar equations – which is what special relativity does. It forces us to describe the same phenomena using different, much more general concepts, too.

• hi @Luboš Motl i am looking for mathematical equation – user17093 Dec 22 '12 at 11:00
• The mathematical equations governing everything in GR are either variations of $G_{\mu\nu}=8\pi G T_{\mu\nu}$ for the background geometry or variations of $\delta \tau=0$ for the world lines of objects moving on a spacetime background, or some hybrid equations with additional fields. At any rate, they're partial differential equations for tensors and you would have to be more specific about what the desired equation should describe. There is no GR counterpart of $W=mg$. – Luboš Motl Dec 22 '12 at 12:03
• +1 The answer is brilliant in terms of the intuitions, though twistor gave a specific and explicit answer to a special case. – 299792458 Jun 13 '14 at 14:05


text:
# python – find first sequence item that matches a criterion

## The Question :

334 people think this question is useful

What would be the most elegant and efficient way of finding/returning the first list item that matches a certain criterion?

For example, if I have a list of objects and I would like to get the first object of those with attribute obj.val==5. I could of course use list comprehension, but that would incur O(n) and if n is large, it’s wasteful. I could also use a loop with break once the criterion was met, but I thought there could be a more pythonic/elegant solution.

The Question Comments :
• what if you want to get the item and the index?
• @CharlieParker, to get both the index and the item, use enumerate() – next((idx, obj) for idx, obj in enumerate(objs) if obj.val==5)

## The Answer 1

595 people think this answer is useful

If you don’t have any other indexes or sorted information for your objects, then you will have to iterate until such an object is found:

next(obj for obj in objs if obj.val == 5)

This is however faster than a complete list comprehension. Compare these two:

[i for i in xrange(100000) if i == 1000][0]

next(i for i in xrange(100000) if i == 1000)

The first one needs 5.75ms, the second one 58.3µs (100 times faster because the loop 100 times shorter).

## The Answer 2

5 people think this answer is useful
a=[100,200,300,400,500]
def search(b):
try:
k=a.index(b)
return a[k]
except ValueError:
return 'not found'
print(search(500))

it’ll return the object if found else it’ll return “not found”

Tags:,


text:
What are you looking for?
Geonor AS

# Geonor - Model G-200 - Fall Cone Penetration Test - Fall Cone Apparatus

A new model of the Geonor G-200 Fall Cone Penetration Test including a robust special purpose transport box and a flexible magnifier is now available.

Application

The Fall Cone Penetration, first introduced in 1915, provides a rapid, simple and accurate method for determining empirically the undrained shear strength, the shear strength of remolded samples and thus the sensitivity of clays. The equipment is also used for determination of liquid WL (or fineness number WF ). Four cones of different weights and apex angles are provided.

## Principle

Principle

The shear strength of a soil is (s) is proportional to the weight of the cone (Q) and inversely proportional to the square of the penetration (h) of the cone into the sample: s=K·Q/h² (Hansbo, S (1957): A new approach to the determination of the shear strength of clay by the fall cone test. Swedish Geot. Inst. Pub. No. 14, Stockholm). The proportional constant K depends primarily on the angle of the cone and sensitivity of the clay.

The shear strength is measured by placing the sample underneath the cone holder, with the tip of cone touching the sample. After releasing the cone from the magnet holder and measuring the depth of penetration, the shear strength of the undisturbed or of the remolded sample is given in tables accompanying the apparatus.

Determination of the liquid limit

The standard cone used to determine the liquid limit WL (see diagram) has a weight of 60 g and an angle of 60° (part no: 200400). The upper limit of plasticity corresponding to the liquid is defined as the moisture content at which the cone impression is 10 mm (Karlsson, R. (1961): Suggesting improvements in the liquid limits test, with reference to flow properties of remolded clays. 5th Ont. Conf. On Soil Mech, and Found. Eng., Vol 1. p. 171, Paris).

Determination of the sensitivity

The undrained shear strength of an undisturbed sample is first measured. Thereafter, the sample is completely remolded and the new shear strength is measured with the same water content. The ratio of the undisturbed to remolded shear strength is defined as the sensitivity (S)

## Features:

• Rapid, simple and accurate measurement of:
• Undrained shear strength
• Shear strength of remoulded samples and thereby sensitivity
• Liquid limit WL
• Testing capacity: Shear strengths of 0.01. to 200 kPa (0.001 to 20t/m2)
• Portable and easy to use
• Designed by the Norwegian Geotechnical Institute, NGI

## Customer reviews

No reviews were found for Geonor - Model G-200 - Fall Cone Penetration Test - Fall Cone Apparatus. Be the first to review!


text:
# Suitable graph to visualize the spread of data

I have some data like

A  2
A  4
A  76
B  8
B  13
.. ....

Basically, what is the spread of A, B, etc. What would be a suitable graph to visualize such information in R?

• Can you provide some more information about your data. How many points might there be for "A", "B", etc? Are the values in the second column presumably continuous? – Ananda Mahto Jun 30 '13 at 9:42
• Sure. Thanks for your response. The numeric values are age, so numeric data is not continuous but discrete. There can be any number of points for A, B, etc., ranging from, say, 1 to 150. – Kumar Vaibhav Jun 30 '13 at 9:46
• How many values in each group? – Glen_b Jun 30 '13 at 9:49
• So, there can be varying number of values in each group. Say, 20 for A and then 100 for B and then maybe 67 for C, and so on. – Kumar Vaibhav Jun 30 '13 at 9:52

There are numerous possible displays, depending on what more specifically you want.

One example would be a boxplot for each group (A, B, ...) (assuming there are enough values in each group to support one*):

boxplot(len~supp,data=ToothGrowth,horizontal=TRUE,boxwex=.7)

But you might want to look at histograms, ecdfs, or a number of other possibilities

* Edit: from your later comments, it looks like there's enough data for boxplots.

• Excellent! Let me try this! – Kumar Vaibhav Jun 30 '13 at 9:53
• Some other possibilities that haven't been mentioned in the answers yet would include Q-Q plots, beeswarm/beehive plots, and violin plots – Glen_b Jul 28 '13 at 1:15

You already got some excellent answers but let me suggest another plot that was not mentioned yet (this is an example that I created to answer another question):

In R, it is available e.g. through stripchart() or ggplot2's geom_point() or geom_jitter(). (Jitter adds a little bit of noise to avoid too much overlap.) This plot allows you to look at the data somewhat more directly than histograms (which can be badly misleading, see Glen_b's great answer to another question) or boxplots (which are great but a little more complicated to understand and explain).

In GGPlot, you can also combine boxplots and jittered dots, see the documentation.

• +1. There are many, many names for this plot. Dot and strip plots or charts are two of the most common. As "dot" is widely used in other senses, the name element "strip" is perhaps preferable, at least in searching for implementations (there are several, not just in R but also in all leading packages or languages, e.g. Stata stripplot). – Nick Cox Jun 30 '13 at 12:17
• This is awesome! – Kumar Vaibhav Jun 30 '13 at 12:28
• @NickCox +1 Thanks for the precisions, I was so confused by the names that I tried very hard not to choose one… Your comment reminded me of another R function to create a stripchart (now added to my answer). – Gala Jun 30 '13 at 12:48
• But how do I make this if one of the axes doesn't have any numeric data? – Kumar Vaibhav Jun 30 '13 at 14:02
• No problem i did it - ggplot() + geom_point(data=mydata, mapping=aes(x=mydata[,3], y=mydata[,2])) + coord_cartesian(xlim = c(5, 90)) + xlab("Age") + ylab("Something") + ggtitle("Demographic Analysis of Age and something") – Kumar Vaibhav Jun 30 '13 at 14:15

As mentioned by Glen_b, there are a number of possibilities.

Here is an example of a histogram and density plot using the "lattice" package. I've also provided some sample data.

set.seed(1)
mydf <- data.frame(V1 = sample(LETTERS[1:5], 500, replace = TRUE),
V2 = sample(0:50, 500, replace = TRUE))

densityplot(~V2 | V1, data = mydf)


text:
# College Physics Problem 1.2.6

## Solution:

First, convert 6 ft to inches

$\displaystyle 6\:ft=\left(6\:ft\right)\left(\frac{12\:in}{1\:ft}\right)=72\:in$

Add the 1.0 inch

$\displaystyle 72\:in\:+1\:in=73\:inches$

So, the total height of the person is 73 inches. We convert this to meters to come up with the desired unit.

$\displaystyle 73\:in=\left(73\:in\right)\left(\frac{1\:m}{39.37\:in}\right)=1.85\:m$

So, the height of the person is 1.85 meters.           ☚


text:
FutureStarr

A Fraction Calculator Mixed Fractions

Fraction Calculator Mixed Fractions

via GIPHY

You know that summer vacation is over and back to school is upon us, but you don't know how much you should invest? Fraction calculator is just one of the many interactive tools that can provide an answer. In this article, you'll see how to use the tool and what to watch out for.

Use

Unlike adding and subtracting integers such as 2 and 8, fractions require a common denominator to undergo these operations. One method for finding a common denominator involves multiplying the numerators and denominators of all of the fractions involved by the product of the denominators of each fraction. Multiplying all of the denominators ensures that the new denominator is certain to be a multiple of each individual denominator. The numerators also need to be multiplied by the appropriate factors to preserve the value of the fraction as a whole. This is arguably the simplest way to ensure that the fractions have a common denominator. However, in most cases, the solutions to these equations will not appear in simplified form (the provided calculator computes the simplification automatically). Below is an example using this method.

An alternative method for finding a common denominator is to determine the least common multiple (LCM) for the denominators, then add or subtract the numerators as one would an integer. Using the least common multiple can be more efficient and is more likely to result in a fraction in simplified form. In the example above, the denominators were 4, 6, and 2. The least common multiple is the first shared multiple of these three numbers.An __improper fraction__ is a fraction whose nominator is greater than its denominator. For example, \$${5 \over 4}\$$. A mixed fraction is a fraction of the form \$$c {n \over d}\$$, where \$$c\$$ is an integer and \$$n < d\$$. For example, \$${11 \over 4} = 2 {3 \over 4}\$$. It is therefore the sum of a whole number and a proper fraction. Use this calculator to convert your improper fraction to a mixed fraction. If you would like to convert a mixed fraction to an improper fraction, see our [mixed to improper fraction calculator](/show/calculator/mixed-to-improper). An alternative method for finding a common denominator is to determine the least common multiple (LCM) for the denominators, then add or subtract the numerators as one would an integer. Using the least common multiple can be more efficient and is more likely to result in a fraction in simplified form. In the example above, the denominators were 4, 6, and 2. The least common multiple is the first shared multiple of these three numbers. (Source: www.calculator.net)

Related Articles

• grimaldis the don

June 28, 2022     |     Abid Ali
• Pharmacist Resume Sample OR

June 28, 2022     |     Abid Ali
• NFL Honors 2022 to Be Hosted by Keegan-Michael Key\'

June 28, 2022     |     Mr. JA
• What Is One And A Quarter Cup In Decimals Worksheet

June 28, 2022     |     Fahad Nawaz
• A Infatuation

June 28, 2022     |     Muhammad Waseem
• Fast Food Resume Sample With No Experience

June 28, 2022     |     sheraz naseer
• Sims 4 - Hire a Butler...

June 28, 2022     |     Sheraz naseer
• Young Thug and Gunna collaborate on "Dollaz on My Head Lyrics",,,,

June 28, 2022     |     Mr. JA
• The Hymn "Christ is Risen Today"

June 28, 2022     |     Mr. JA
• Are There Four Cups in a Quart

June 28, 2022     |     Ayaz Hussain
• Dental Office Receptionist Resume Example;

June 28, 2022     |     Muhammad Waseem
• AA How to Add Phlebotomy Certification to Resume

June 28, 2022     |     Syed Zain
• A Procurement Resume Sample

June 28, 2022     |     sheraz naseer
• How To Calculate 18 Percent Of A Numbers

June 28, 2022     |     Fahad Nawaz
• A Craigslist Fenton Mi

June 28, 2022     |     Muhammad Waseem


text:
Looking for Arithmetic worksheets?
Check out our pre-made Arithmetic worksheets!
 Tweet

##### Browse Questions
• Arts (147)
• English Language Arts (6103)
• English as a Second Language ESL (4788)
• Health and Medicine (104)
• Life Skills (15)
• Math (3022)

• ### Subtraction with Regrouping

• #### Statistics and Probability Concepts

• Physical Education (121)
• Pop Culture (16)
• Science (2806)
• Social Sciences (58)
• Social Studies (1959)
• Study Skills and Strategies (8)
• Technology (2)
• Vocational Education (3)
• Other (63)

You can create printable tests and worksheets from these Grade 4 Addition with Regrouping questions! Select one or more questions using the checkboxes above each question. Then click the add selected questions to a test button before moving to another page.

Previous Next
67 +                = 121
Which number will make the number sentence true?
1. 54
2. 56
3. 64
4. 68
$ul({:( ,714),(+,297):})$
1. 901
2. 911
3. 1,001
4. 1,011
What is the value of x in the equation below?
8 + x = 22
1. 14
2. 20
3. 24
4. 30
How would the inverse operation of addition be used to solve this equation?
36 + m = 54
1. 54 - 36 = m
2. 36 + 54 = m
3. 54 / 36 = m
4. 36 x 54 = m
$ul({:(,365),(+,876):})$
1. 1,343
2. 1,141
3. 1,241
4. 1,243
The addition sentence is correct: 22 + 99 = 111
1. True
2. False
321 + 892 = ?
1. 1,213
2. 956
3. 1,023
4. 1,325
45 + 69 = 114
1. True
2. False
43,654 + 23,542 =
1. 45,891
2. 67,196
3. 34,908
4. 76,691
(3 + 8) + 12 + 90 = ?
1. 113
2. 89
3. 11
4. 123
345,890 + 234,765 =
1. 580,655
2. 543,890
3. 678,643
4. 523,555
$6283+576+3892+467$=         11,218
Tyler and his father are raising funds for a new animal shelter. So far, Tyler has raised $2,789. His father has raised$1,286. How much have they raised altogether?
1. $3,005 2.$3,065
3. $4,065 4.$4,075

$5,392 +3,709=$

$3,628+ 6,847=$

$1,847 + 573=$
Hundreds of knights came to the tournament. Then four hundred twenty knights went home. Seven hundred fifty-six knights remained. How many knights came to the tournament?
$2405+6893+562$


text:
# question about topology of open and closed intervals in $\mathbb{R}$

I'm studying the topology in $\mathbb{R}$ of open and closed intervals, and

I have some doubts regarding why I can have a topology of open intervals (in which I can have the generalized union but only the intersection of a finite number of sets) but not a topology of closed intervals (in which I can have the generalized intersection but only the union of a finite number of sets)

I think this as a natural fact considering that an interval is open if the complementary set is closed and vice versa.

Can someone help me to understand why? it is a convenction or is there a reason?

• It is not really clear what you are asking. One requirement is that arbitrary unions are also open. Any set can be written as the arbitrary union of closed sets (points) so that would mean all sets would have to be closed which would not be very useful. – copper.hat Jun 13 '18 at 14:40
• it is a convention that you call the family of all open sets "topology". But if you prefer to describe the closed sets instead, that is fine (as long as you indicate you are talking about the closed sets). Then the topology would be the family of the corresponding open sets (the complements of the closed sets that you have defined). So you could have the topology of closed intervals, in a way, it is just the terminology, that always means the topology is the family of all open sets. – Mirko Jun 13 '18 at 14:48