text:
# etendue

## English

### Etymology

An incandescent lamp. In optics, etendue is a measure of how “spread out” light that crosses, or is emitted by, a surface is, in terms of angle and area.

Borrowed from French étendue (area, expanse; size; extent, range, scale), short for étendue géométrique (geometric extent).

### Noun

etendue (uncountable)

1. (optics) A conserved property of the light in an optical system which characterizes how "spread out" the light is in terms of angle and area: it is the product of its cross-sectional area (normal to the direction of propagation) and the solid angle it subtends.
• 1966, “Advanced Infrared Technology [course title]”, in The University of Michigan Engineering Summer Conferences: Fundamentals of Infrared Technology, June 6–10, 1966; Advanced Infrared Technology, June 27 – July 1, 1966; Precision Radiometry – Calibration and Instrumentation, June 27 – July 1, 1966: Three Intensive One-week Courses for: Engineers, Scientists (University of Michigan Official Publication), volume 67, number 115, Ann Arbor, Mich.: University of Michigan, OCLC 24801012:
The topics include [] carefully outlining the concepts of etendue, finesse, and their theoretical implications; methods of spectral, spatial, temporal, and polarization discrimination; and application of these topics to search and track systems.
• 2003, Wolfgang Demtröder, “Spectroscopic Instrumentation”, in Laser Spectroscopy: Basic Concepts and Instrumentation (Advanced Texts in Physics), 3rd edition, Berlin: Springer-Verlag, DOI:10.1007/978-3-662-05155-9, →ISBN, ISSN 1439-2674, page 149:
The light power transmitted to the detector is proportional to the product of the solid angle ${\displaystyle {\mathit {\Omega }}}$ and area ${\displaystyle A}$ in the central plane, which is imaged by the lens onto the aperture (often called the étendue ${\displaystyle U}$).
• 2006, Kazuya Ota; Yukata Watanabe; Vadim Banine; Hans Franken, “EUV Source Requirements for EUV Lithography”, in Vivek Bakshi, editor, EUV Sources for Lithography, Bellingham, Wash.: SPIE Press, →ISBN, section 2.2.6 (Etendue of Source Output and Positioning Stability), pages 36–37:
Etendue is an optical invariant and is called by many different names. One of the names is "light-gathering power." As implied by this terminology, when light enters an optical system with smaller etendue from another optical system with larger etendue, the former optical system fails to transmit some part of the light. [] Therefore, a given EUV [extreme ultraviolet] power with a larger etendue than that of the requirement is substantially equivalent to a smaller EUV power with the etendue of the requirement.

format: plain


text:
# How do you write the expression for: the sum of twice a number and half the number is 10?

Apr 22, 2018

$2 x + \frac{x}{2} = 10$
$2 \left(x\right) + \frac{1}{2} \left(x\right) = 10$
$2 x + \frac{x}{2} = 10$


text:
mne.grade_to_vertices(subject, grade, subjects_dir=None, n_jobs=1, verbose=None)[source]

Convert a grade to source space vertices for a given subject.

Parameters
subjectstr

Name of the subject.

Resolution of the icosahedral mesh (typically 5). If None, all vertices will be used (potentially filling the surface). If a list, then values will be morphed to the set of vertices specified in in grade[0] and grade[1]. Note that specifying the vertices (e.g., grade=[np.arange(10242), np.arange(10242)] for fsaverage on a standard grade 5 source space) can be substantially faster than computing vertex locations. Note that if subject=’fsaverage’ and ‘grade=5’, this set of vertices will automatically be used (instead of computed) for speed, since this is a common morph.

subjects_dir

The path to the freesurfer subjects reconstructions. It corresponds to Freesurfer environment variable SUBJECTS_DIR.

n_jobsint

The number of jobs to run in parallel (default 1). Requires the joblib package.

verbose

If not None, override default verbose level (see mne.verbose() and Logging documentation for more).

Returns
vertices

Vertex numbers for LH and RH.


text:
ON THE PROBABILITY OF RUIN IN A CONTINUOUS RISK MODEL WITH DELAYED CLAIMS

Title & Authors
ON THE PROBABILITY OF RUIN IN A CONTINUOUS RISK MODEL WITH DELAYED CLAIMS
Zou, Wei; Xie, Jie-Hua;

Abstract
In this paper, we consider a continuous time risk model involving two types of dependent claims, namely main claims and by-claims. The by-claim is induced by the main claim and the occurrence of by-claim may be delayed depending on associated main claim amount. Using Rouch$\small{\acute{e}}$'s theorem, we first derive the closed-form solution for the Laplace transform of the survival probability in the dependent risk model from an integro-differential equations system. Then, using the Laplace transform, we derive a defective renewal equation satisfied by the survival probability. For the exponential claim sizes, we present the explicit formula for the survival probability. We also illustrate the influence of the model parameters in the dependent risk model on the survival probability by numerical examples.
Keywords
continuous time risk model;survival probability;delayed claim;Laplace transform;
Language
English
Cited by
1.
On the Expected Discounted Penalty Function for the Classical Risk Model with Potentially Delayed Claims and Random Incomes, Journal of Applied Mathematics, 2014, 2014, 1
2.
THE ULTIMATE RUIN PROBABILITY OF A DEPENDENT DELAYED-CLAIM RISK MODEL PERTURBED BY DIFFUSION WITH CONSTANT FORCE OF INTEREST, Bulletin of the Korean Mathematical Society, 2015, 52, 3, 895
3.
On the probability of ruin in a continuous risk model with two types of delayed claims, Communications in Statistics - Theory and Methods, 2016, 45, 13, 3734
References
1.
H. Albrecher and O. J. Boxma, A ruin model with dependence between claim sizes and claim intervals, Insurance Math. Econom. 35 (2004), no. 2, 245-254.

2.
H. Albrecher and J. L. Teugels, Exponential behavior in the presence of dependence in risk theory, J. Appl. Probab. 43 (2006), no. 1, 257-273.

3.
P. Boogaert and J. Haezendonck, Delay in claim settlement, Insurance Math. Econom. 8 (1989), no. 4, 321-330.

4.
M. Boudreault, H. Cossette, D. Landrault, and E. Marceau, On a risk model with dependence between interclaim arrivals and claim sizes, Scand. Actuar. J. 2006 (2006), no. 5, 265-285.

5.
D. C. M. Dickson and C. Hipp, On the time to ruin for Erlang(2) risk processes, Insurance Math. Econom. 29 (2001), no. 3, 333-344.

6.
X. S. Lin and G. E. Willmot, Analysis of a defective renewal equation arising in ruin theory, Insurance Math. Econom. 25 (1999), no. 1, 63-84.

7.
C. Macci, Large deviations for risk models in which each main claim induces a delayed claim, Stochastics 78 (2006), no. 2, 77-89.

8.
H. R. Waters and A. Papatriandafylou, Ruin probabilities allowing for delay in claims settlement, IInsurance Math. Econom. 4 (1985), no. 2, 113-122.

9.
Y. T. Xiao and J. Y. Guo, The compound binomial risk model with time-correlated claims, Insurance Math. Econom. 41 (2007), no. 1, 124-133.

10.
J. H. Xie and W. Zou, Ruin probabilities of a risk model with time-correlated claims, Journal of the Graduate School of the Chinese Academy of Sciences 25 (2008), 319-326.

11.
J. H. Xie and W. Zou, Expected present value of total dividends in a delayed claims risk model under stochastic interest rates, Insurance Math. Econom. 46 (2010), no. 2, 415-422.

12.
J. H. Xie and W. Zou, On the expected discounted penalty function for the compound Poisson risk model with delayed claims, J. Comput. Appl. Math. 235 (2011), no. 8, 2392-2404.

13.
K. C. Yuen and J. Y. Guo, Ruin probabilities for time-correlated claims in the compound binomial model, Insurance Math. Econom. 29 (2001), no. 1, 47-57.

14.
K. C. Yuen, J. Y. Guo, and K. W. Ng, On ultimate ruin in a delayed-claims risk model, J. Appl. Probab. 42 (2005), no. 1, 163-174.

15.
Z. M. Zhang and H. Yang, On a risk model with stochastic premiums income and dependence between income and loss, J. Comput. Appl. Math. 234 (2010), no. 1, 44-57.

16.
Z. M. Zhang and H. Yang, Gerber-Shiu analysis in a perturbed risk model with dependence between claim sizes and interclaim times, J. Comput. Appl. Math. 235 (2011), no. 5, 1189-1204.


text:
# Automatically generating a dependency graph of an arbitrary Mathematica function?

Has anyone written a function to pull the function dependencies of a function? That is, it would be nice to have a function that returns a list of function dependencies as a set of rules, terminating with built-in functions, which could then be passed straight to GraphPlot or LayeredGraphPlot. I am kind of surprised that the such a dependencies function isn't already built in.

Edit: Alright, in an attempt to contribute a little value of my own to the discussion, let me modify Szabolcs' functions:

SetAttributes[functionQ, HoldAll]
functionQ[
sym_Symbol] := (DownValues[sym] =!= {}) && (OwnValues[sym] === {})

SetAttributes[terminalQ, HoldAll]
terminalQ[sym_Symbol] := MemberQ[Attributes[sym], Protected]

SetAttributes[dependencies, HoldAll]
dependencies[sym_Symbol] :=
List @@ Select[
Union@Level[(Hold @@ DownValues[sym])[[All, 2]], {-1}, Hold,
Heads -> True], functionQ[#] || terminalQ[#] &]

SetAttributes[dependencyGraphB, HoldAll]
dependencyGraphB[sym_Symbol] :=
Module[{vertices, edges},
vertices =
FixedPoint[Union@Flatten@Join[#, dependencies /@ #] &, {sym}];
edges = Flatten[Thread[Rule[#, dependencies[#]]] & /@ vertices];
GraphPlot[edges,
VertexRenderingFunction -> (If[MemberQ[Attributes[#2], Protected],
StyleForm[Framed[#2, FrameMargins -> 1, Background -> Pink],
FontSize -> 7], "paclet:ref/" <> ToString[#2]], #1],
Text[Framed[Style[DisplayForm[#2], Black, 8],
Background -> LightBlue, FrameStyle -> Gray,
FrameMargins -> 3], #1]] &)]]

Now that I think about it, there should be precisely this sort of dependency function built in to all of the Parallel functions, so that MMA knows what definitions to send to the kernels. Unfortunately I think they avoid this more elegant method and just send every darned thing that is in the Context, which is probably overkill.

-

## migrated from stackoverflow.comApr 17 '12 at 2:04

This question came from our site for professional and enthusiast programmers.

This should be relatively easy to do. Once I made a half-working implementation inspired by this blog post. I'll try to dig up the code later and will show you how to get started. If you implement it, do come back by all means and post the full code. I'm sure many would like to try it. –  Szabolcs Jan 15 '12 at 8:02
Agree with @NasserM.Abbasi . It will be very hard to deal with something like ToExpression["boo"]. The only way gets into my mind is to actually run the code and to trace it. –  Silvia Jan 15 '12 at 9:33
@szabolcs: yes, thanks, this is what I was getting at. I'd be interested in the code; I am certainly too lazy to write it myself. –  berniethejet Jan 15 '12 at 16:01
@Nasser Your example with ToExpression is one of the reasons why I think that ToExpression and related things (which lead to parsing at run-time) must be avoided whenever possible - they reduce the power of introspective features in Mathematica. There are cases when they may be necessary, but at least these things must be then isolated so that not many functions use them. In most cases however, creating functions at run-time is possible within the fully parsed Mathematica code. The code-analysis problem is still well-formulated though, even counting ToExpression and friends. –  Leonid Shifrin Jan 15 '12 at 16:51
Nice. If you use instead of GraphPlot this LayeredGraphPlot[edges,Left, AspectRatio -> 1, ImageSize ->...,rest of your options] you may get something more visually comprehensive if you play with ImageSize and AspectRatio . "Left" right after the "edges" is important because your labels are horizontal. –  Vitaliy Kaurov Jan 15 '12 at 20:30

### Preamble

The problem is not as trivial as it may seem on the first glance. The main problem is that many symbols are localized by (lexical) scoping constructs and should not be counted. To fully solve this, we need a parser for Mathematica code, that would take scoping into account.

One of the most complete treatments of this problem was given by David Wagner in his Mathematica Journal article, and replicated partially in his book. I will follow his ideas but show my own implementation. I will implement a sort of a simplistic recusrive descent parser which would take scoping into account. This is not a complete thing, but it will illustrate certain subtleties involved (in particular, we should prevent premature evaluation of pieces of code during the analysis, so this is a good excercise in working with held/unevaluated expressions).

### Implementation (for illustration only, does not pretend to be complete)

Here is the code:

ClearAll[getDeclaredSymbols, getDependenciesInDeclarations, $OneStepDependencies, getSymbolDependencies, getPatternSymbols,inSymbolDependencies,$inDepends];

SetAttributes[{getDeclaredSymbols, getDependenciesInDeclarations,
getSymbolDependencies, getPatternSymbols,inSymbolDependencies}, HoldAll];

$OneStepDependencies = False; inSymbolDependencies[_] = False; globalProperties[] = {DownValues, UpValues, OwnValues, SubValues, FormatValues, NValues, Options, DefaultValues}; getDeclaredSymbols[{decs___}] := Thread@Replace[HoldComplete[{decs}], HoldPattern[a_ = rhs_] :> a, {2}]; getDependenciesInDeclarations[{decs___}, dependsF_] := Flatten@Cases[Unevaluated[{decs}], HoldPattern[Set[a_, rhs_]] :> dependsF[rhs]]; getPatternSymbols[expr_] := Cases[ Unevaluated[expr], Verbatim[Pattern][ss_, _] :> HoldComplete[ss], {0, Infinity}, Heads -> True]; getSymbolDependencies[s_Symbol, dependsF_] := Module[{result}, inSymbolDependencies[s] = True; result = Append[ Replace[ Flatten[Function[prop, prop[s]] /@ globalProperties[]], { (HoldPattern[lhs_] :> rhs_) :> With[{excl = getPatternSymbols[lhs]}, Complement[ Join[ withExcludedSymbols[dependsF[rhs], excl], Module[{res}, (* To avoid infinite recursion *) depends[s] = {HoldComplete[s]}; res = withExcludedSymbols[dependsF[lhs], excl]; depends[s] =.; res ] ], excl] ], x_ :> dependsF[x] }, {1} ], HoldComplete[s] ]; inSymbolDependencies[s] =.; result] /; ! TrueQ[inSymbolDependencies[s]]; getSymbolDependencies[s_Symbol, dependsF_] := {}; (* This function prevents leaking symbols on which global symbols colliding with ** the pattern names (symbols) may depend *) ClearAll[withExcludedSymbols]; SetAttributes[withExcludedSymbols, HoldFirst]; withExcludedSymbols[code_, syms : {___HoldComplete}] := Module[{result, alreadyDisabled }, SetAttributes[alreadyDisabled, HoldAllComplete]; alreadyDisabled[_] = False; Replace[syms, HoldComplete[s_] :> If[! inSymbolDependencies[s], inSymbolDependencies[s] = True, (* else *) alreadyDisabled[s] = True ], {1}]; result = code; Replace[syms, HoldComplete[s_] :> If[! alreadyDisabled[s], inSymbolDependencies[s] =.], {1} ]; ClearAll[alreadyDisabled]; result ]; (* The main function *) ClearAll[depends]; SetAttributes[depends, HoldAll]; depends[(RuleDelayed | SetDelayed)[lhs_, rhs_]] := With[{pts = getPatternSymbols[lhs]}, Complement[ Join[ withExcludedSymbols[depends[lhs], pts], withExcludedSymbols[depends[rhs], pts] ], pts] ]; depends[Function[Null, body_, atts_]] := depends[body]; depends[Function[body_]] := depends[body]; depends[Function[var_, body_]] := depends[Function[{var}, body]]; depends[Function[{vars__}, body_]] := Complement[depends[body], Thread[HoldComplete[{vars}]]]; depends[(With | Module)[decs_, body_]] := Complement[ Join[ depends[body], getDependenciesInDeclarations[decs, depends] ], getDeclaredSymbols[decs] ]; depends[f_[elems___]] := Union[depends[Unevaluated[f]], Sequence @@ Map[depends, Unevaluated[{elems}]]]; depends[s_Symbol /; Context[s] === "System"] := {}; depends[s_Symbol] /; !$OneStepDependencies || ! TrueQ[$inDepends] := Block[{$inDepends = True},
Union@Flatten@getSymbolDependencies[s, depends ]
];
depends[s_Symbol] := {HoldComplete[s]};
depends[a_ /; AtomQ[Unevaluated[a]]] := {};

### Illustration

First, a few simple examples:

In[100]:= depends[Function[{a,b,c},a+b+c+d]]
Out[100]= {HoldComplete[d]}

In[101]:= depends[With[{d=e},Function[{a,b,c},a+b+c+d]]]
Out[101]= {HoldComplete[e]}

In[102]:= depends[p:{a_Integer,b_Integer}:>Total[p]]
Out[102]= {}

In[103]:= depends[p:{a_Integer,b_Integer}:>Total[p]*(a+b)^c]
Out[103]= {HoldComplete[c]}

Now, a power example:

In[223]:= depends[depends]
Out[223]=
{HoldComplete[depends],HoldComplete[getDeclaredSymbols],
HoldComplete[getDependenciesInDeclarations],HoldComplete[getPatternSymbols],
HoldComplete[getSymbolDependencies],HoldComplete[globalProperties],
HoldComplete[inSymbolDependencies],HoldComplete[withExcludedSymbols],
HoldComplete[$inDepends],HoldComplete[$OneStepDependencies]}

As you can see, my code can handle recursive functions. The code of depends has many more symbols, but we only found those which are global (not localized by any of the scoping constructs).

Note that by default, all dependent symbols on all levels are included. To only get the "first-level" functions / symbols on which a given symbol depends, one has to set the variabe $OneStepDependencies to True: In[224]:=$OneStepDependencies =True;
depends[depends]

Out[225]= {HoldComplete[depends],HoldComplete[getDeclaredSymbols],
HoldComplete[getDependenciesInDeclarations],HoldComplete[getPatternSymbols],
HoldComplete[getSymbolDependencies],HoldComplete[withExcludedSymbols],
HoldComplete[$inDepends],HoldComplete[$OneStepDependencies]}

This last regime can be used to reconstruct the dependency tree, as for example suggested in the answer by @Szabolcs.

### Applicability

This answer is considerably more complex than the one by @Szabolcs, and probably also (considerably) slower, at least in some cases. When should one use it? The answer I think depends on how critical it is to find all dependencies. If one just needs to have a rough visual picture for the dependencies, then @Szabolcs's suggestion should work well in most cases. The present asnwer may have advantages when:

• You want to analyze dependencies in an arbitrary piece of code, not necessarily placed in a function (this one is easily if not super-conveniently circumvented in @Szabolcs's approach by first creating a dummy zero-argument function with your code and then analyzing that)

• It is critical for you to find all dependencies.

Things like

$functionDoingSomething = Function[var,If[test[var],f[var],g[var]]] myFunction[x_,y_]:= x+$functionDoingSomething [y]

will escape from the dependencies found by the @Szabolcs's code (as he mentioned himself in the comments), and can therefore cut away whole dependency sub-branches (for f, g and test here). There are other cases, for example related to UpValues, dependencies through Options and Defaults, and perhaps other possibilities as well.

There may be several situations when finding all dependencies correctly is critical. One is when you are using introspection programmatically, as one of the meta-programming tools - in such case you must be sure everything is correct, since you are building on top of this functionality. To generalize, you might need to use something like what I suggested (bug-free though :)), every time when the end user of this functionality will be someone (or something, like other function) other than yourself.

It may also be that you need the precise dependency picture for yourself, even if you don't intend to use it programmatically further.

In many cases however, all this is not very critical, and the suggestion by @Szabolcs may represent a better and easier alternative. The question is basically - do you want to create user-level or system-level tools.

### Limitations, flaws and subtleties

EDIT

The current version of the code certainly contains bugs. For example, it can not handle the GraphEdit example from the answer of @Szabolcs without errors. While I hope to get these bugs fixed soon, I invite anyone interested to help me debugging the code. Feel free to update the answer, once you are sure that you correctly identified and truly fixed some bugs.

END EDIT

I did not intend this to be complete, so things like UpSetDelayed and TagSetDelayed are not covered, as well as probably some others. I did not also cover dynamic scoping (Block, Table, Do, etc), because in most cases dynamic scoping still means dependencies. The code above can however be straightforwardly extended to cover the cases missed here (and I might do that soon).

The code can be refactored further to have a more readable / nicer form. I intend to do this soon.

-
This is a lot more general than what I was trying to do. (I didn't try to handle generic symbols, only "functions", whatever that may mean. My approach doesn't even handle things like f = Function[...].) LanguageExtendedDefinition and LanguageExtendedFullDefinition might be useful here. Note that even LanguageExtendedFullDefinition doesn't attempt to identify localized symbols. The intended use of these functions is described here. –  Szabolcs Jan 15 '12 at 13:56
@Szabolcs I just fixed several bugs in the process. You can look at revision history, or just the latest code. I also added the possibility to have one-step dependencies only, rather than a full list of all symbols on which a given one depends, arbitrarily deep in the def. tree (which is what my code was initially doing). As to the generality - I find this to be absolutely essential for this problem, since otherwise you either get meaningless symbols, or run into a possibility of missing some, since people may define things like f:=.... Functions may also be defined through SubValues etc. –  Leonid Shifrin Jan 15 '12 at 14:01
@Szabolcs I was using some simple version similar to what you suggested, in the past (about 3 years ago, I attempted to implement a FE-based mma IDE, but had to cancel the project due to time limitations. I used this to track dependent functions there). It was working reasonably well, so I guess in many cases the approach you suggested will suffice. You just never know :) –  Leonid Shifrin Jan 15 '12 at 14:04
@Leonid, Jeezus K Kryste, Leonid, you take these questions seriously. This looks like (much more than) what I was thinking of, certainly. Let me play with it a bit and get back later... –  berniethejet Jan 15 '12 at 16:11
@berniethejet This is a very important question, and I was using this as a pretext to return some old debt to myself :). Beware that this contains bugs and is not complete yet (I hope to fix bugs and make it more complete soon, this is an important tool). Thanks for asking this, by the way. –  Leonid Shifrin Jan 15 '12 at 16:15

The answers from @LeonidShifrin and @Szabolcs are great, so I just want to share some incomplete thing I wrote for analyzing and visualizing Compiled "WVM" code. It's for compiler of Mathematica 7.0.1. Sorry if the code looks messy, it has been abandoned long ago.. (for the compiler version always got updated before I could figure out all the codes meaning..) If someone feel interested in it, please feel free to modify it.

(testCode = Compile[{{data, _Real, 1}, {y, _Real, 1}},
Module[{n, z, testdata},
n = Length[data];
z = (data - y)/Sqrt[Abs[y]];
testdata = 1/2 (Erf[#/Sqrt[2]] + 1) & /@ z;
(Sqrt[n] + .12 + .11/Sqrt[n]) Max[
Abs[Range[n]/n - Sort[testdata]]]
]
]) // CodeShow

btw I'm still wondering if it would be convenient to analyze the code by simulatively running and tracing it.

-
Whoah, dude! That is very impressive. Am I right that you had difficulty controlling the placement of your 'Input' node in the LayeredGraphPlot so that it would stay at the top of the diagram? –  berniethejet Jan 16 '12 at 15:01
@berniethejet while my answer is a little off topic, I'm glad you like its appearance.^^ In fact I just leave the layout being automatically decided by LayeredGraphPlot because guessing the code made me tired of it.. But I guess there are well developed algorithms for better arrangement of the layout. –  Silvia Jan 17 '12 at 21:03
Yeah, I am totally surprised that LayeredGraphPlot gives such good results out of the box. I have used it to plot some flowcharts but they inevitably have the 'Start' somewhere in the middle of the damned page. –  berniethejet Jan 18 '12 at 1:46
@berniethejet The curves generated by LayeredGraphPlot are too arbitrary, and they're not spline! So I think a totally user-defined Graph plot function specified for flowchats will be great. –  Silvia Jan 19 '12 at 1:08

I didn't find my original code, but here's a start for implementing this:

First, let's say that a "function" is a symbol that has DownValues but no OwnValues (this latter requirement is just for safety now). This needs a lot more work to get right: for example, many built-ins have no visible DownValues at all, yet they are not inert (e.g. check that DownValues[Table] === {}). I am completely ignoring any SubValues (f[a][b] := ... type definitions) for now, which should probably be considered, and I didn't even think about how UpValues can cause any trouble. Also, I didn't verify whether it causes stubs to be loaded or not.

SetAttributes[functionQ, HoldAll]
functionQ[
sym_Symbol] := (DownValues[sym] =!= {}) && (OwnValues[sym] === {})

This function will find all dependencies of the function passed to it.

SetAttributes[dependencies, HoldAll]
dependencies[sym_Symbol] := List @@ Select[
Union@Level[(Hold @@ DownValues[sym])[[All, 2]], {-1}, Hold,
functionQ
]

This one will build a graph using a very-inefficient algorithm (memoization in dependencies[] could help a lot in speeding this up, but then I'd make dependencies a localized symbol in Module below):

SetAttributes[dependencyGraph, HoldAll]
dependencyGraph[sym_Symbol] :=
Module[{vertices, edges},
vertices =
FixedPoint[Union@Flatten@Join[#, dependencies /@ #] &, {sym}];
edges =
Flatten[Thread[# \[DirectedEdge] dependencies[#]] & /@ vertices];
Graph[Tooltip[#, #] & /@ ToString /@ vertices,
Map[ToString, edges, {2}]]
]

Let's try it on some package functions. Hover the nodes to see function names as tooltips.

<< GraphUtilities

dependencyGraph[MinCut]

dependencyGraph[WeakComponents]

Or on itself:

dependencyGraph[dependecyGraph]

Show@HighlightGraph[
dependencyGraph[dependencyGraph], {"dependencyGraph"},
VertexLabels -> "Name"]

(Show here is a workaround for cutting off vertex labels)

This is just a starting point and needs a lot more work to make it useful. functionQ needs a lot more improvement, and there should be a way to limit how many dependencies are being followed (this could be implemented by checking symbol contexts: the dependency walker should stop as soon as it reaches a System or perhaps non-Global symbol. I'd make it possible to pass the dependency walker function a list of either blacklisted or whitelisted contexts, and specify a default.)

Note: Please feel free to build on this code and post an improved version as an answer.

Warning: Be careful with this function because it won't stop when it sees a System symbol and it might produce a huge graph that's slow to lay out and show:

Several people have commented above that what the OP is asking for is impossible or too difficult. I strongly disagree. These arguments could be brought up for any dynamic language (or in fact even for C itself, as it has a preprocessor and macros). You could say we shouldn't even have any code analysis in e.g. a Python IDE because it can't easily be done perfectly. Does that really mean we shouldn't do it at all, even if in the vast majority of cases a simple approach works and gives useful results?

I believe even a simple and imperfect approach can often prove very useful in practice.

-
I completely agree with your last sentence (that an imperfect approach is not hard in this case, and practically useful). Perfect is the enemy of the good. –  acl Jan 15 '12 at 13:53
I agree with you all also, I wasn't thinking of something perfect either. –  berniethejet Jan 15 '12 at 16:05
Thanks Szabolcs, this is what I was thinking of, a nice graphic representation of the dependency network. –  berniethejet Jan 15 '12 at 17:25
This will be of much help... thanks! –  CHM Apr 17 '12 at 2:35


text:
## Elementary Algebra

$-16$
$-4^2 = -(4^2)$ The exponent is 2, which means that 4 will be multiplied by itself 2 times. Thus, $-4^2=-(4^2) = -(4 \cdot 4) = -16$


text:
# A density bottle contains 104.5 g of a liquid at 34^oC on heating it to 100^oC, the mass of the...

## Question:

A density bottle contains 104.5 g of a liquid at 34{eq}^o {/eq}C on heating it to 100{eq}^o {/eq}C, the mass of the liquid expelled is 4.5 g. Find the coefficient of apparent expansion of liquid.

## Thermal Expansion:

The thermal expansion is property of a material by virtue of which it changes its apparent figure corresponding to the temperature variation. Generally, it is represented in the form of per Kelvin. This phenomenon occurs due to the variation in the molecular energy of the material.

Given data

• The mass of liquid in bottle is {eq}m = 104.5\;{\rm{g}} {/eq}.
• The initial temperature is {eq}{T_1} = 34^\circ {\rm{C}} {/eq}.
• The final temperature is {eq}{T_2} = 100^\circ {\rm{C}} {/eq}.
• The mass of expelled liquid is {eq}\Delta m = 4.5\;{\rm{g}} {/eq}.

The expression for the coefficient of apparent expansion is,

{eq}\alpha = \dfrac{{\Delta m}}{{m\left( {{T_2} - {T_1}} \right)}} {/eq}

Substitute values.

{eq}\begin{align*} \alpha &= \dfrac{{4.5\;{\rm{g}}}}{{\left( {104.5\;{\rm{g}}} \right)\left( {100^\circ {\rm{C}} - 34^\circ {\rm{C}}} \right)}}\\ &= \dfrac{{4.5\;{\rm{g}}}}{{\left( {104.5\;{\rm{g}}} \right)\left( {66^\circ {\rm{C}}} \right)}}\\ &= 6.52 \times {10^{ - 4}}\;^\circ {{\rm{C}}^{ - 1}} \end{align*} {/eq}

Thus, the coefficient of apparent expansion is {eq}6.52 \times {10^{ - 4}}\;^\circ {{\rm{C}}^{ - 1}} {/eq}.


text:
Search by Topic

Resources tagged with Working systematically similar to Quadrilaterals Game:

Filter by: Content type:
Stage:
Challenge level:

There are 121 results

Broad Topics > Using, Applying and Reasoning about Mathematics > Working systematically

Summing Consecutive Numbers

Stage: 3 Challenge Level:

Many numbers can be expressed as the sum of two or more consecutive integers. For example, 15=7+8 and 10=1+2+3+4. Can you say which numbers can be expressed in this way?

Weights

Stage: 3 Challenge Level:

Different combinations of the weights available allow you to make different totals. Which totals can you make?

Two and Two

Stage: 2 and 3 Challenge Level:

How many solutions can you find to this sum? Each of the different letters stands for a different number.

Number Daisy

Stage: 3 Challenge Level:

Can you find six numbers to go in the Daisy from which you can make all the numbers from 1 to a number bigger than 25?

More Magic Potting Sheds

Stage: 3 Challenge Level:

The number of plants in Mr McGregor's magic potting shed increases overnight. He'd like to put the same number of plants in each of his gardens, planting one garden each day. How can he do it?

Maths Trails

Stage: 2 and 3

The NRICH team are always looking for new ways to engage teachers and pupils in problem solving. Here we explain the thinking behind maths trails.

Ben's Game

Stage: 3 Challenge Level:

Ben passed a third of his counters to Jack, Jack passed a quarter of his counters to Emma and Emma passed a fifth of her counters to Ben. After this they all had the same number of counters.

American Billions

Stage: 3 Challenge Level:

Play the divisibility game to create numbers in which the first two digits make a number divisible by 2, the first three digits make a number divisible by 3...

Where Can We Visit?

Stage: 3 Challenge Level:

Charlie and Abi put a counter on 42. They wondered if they could visit all the other numbers on their 1-100 board, moving the counter using just these two operations: x2 and -5. What do you think?

Consecutive Negative Numbers

Stage: 3 Challenge Level:

Do you notice anything about the solutions when you add and/or subtract consecutive negative numbers?

First Connect Three

Stage: 2 and 3 Challenge Level:

The idea of this game is to add or subtract the two numbers on the dice and cover the result on the grid, trying to get a line of three. Are there some numbers that are good to aim for?

Special Numbers

Stage: 3 Challenge Level:

My two digit number is special because adding the sum of its digits to the product of its digits gives me my original number. What could my number be?

Ones Only

Stage: 3 Challenge Level:

Find the smallest whole number which, when mutiplied by 7, gives a product consisting entirely of ones.

Cuboids

Stage: 3 Challenge Level:

Find a cuboid (with edges of integer values) that has a surface area of exactly 100 square units. Is there more than one? Can you find them all?

Sticky Numbers

Stage: 3 Challenge Level:

Can you arrange the numbers 1 to 17 in a row so that each adjacent pair adds up to a square number?

9 Weights

Stage: 3 Challenge Level:

You have been given nine weights, one of which is slightly heavier than the rest. Can you work out which weight is heavier in just two weighings of the balance?

M, M and M

Stage: 3 Challenge Level:

If you are given the mean, median and mode of five positive whole numbers, can you find the numbers?

Squares in Rectangles

Stage: 3 Challenge Level:

A 2 by 3 rectangle contains 8 squares and a 3 by 4 rectangle contains 20 squares. What size rectangle(s) contain(s) exactly 100 squares? Can you find them all?

Fence It

Stage: 3 Challenge Level:

If you have only 40 metres of fencing available, what is the maximum area of land you can fence off?

Isosceles Triangles

Stage: 3 Challenge Level:

Draw some isosceles triangles with an area of $9$cm$^2$ and a vertex at (20,20). If all the vertices must have whole number coordinates, how many is it possible to draw?

Stage: 3 Challenge Level:

A few extra challenges set by some young NRICH members.

Stage: 3 Challenge Level:

How many different symmetrical shapes can you make by shading triangles or squares?

More on Mazes

Stage: 2 and 3

There is a long tradition of creating mazes throughout history and across the world. This article gives details of mazes you can visit and those that you can tackle on paper.

Triangles to Tetrahedra

Stage: 3 Challenge Level:

Starting with four different triangles, imagine you have an unlimited number of each type. How many different tetrahedra can you make? Convince us you have found them all.

Crossing the Town Square

Stage: 2 and 3 Challenge Level:

This tricky challenge asks you to find ways of going across rectangles, going through exactly ten squares.

Inky Cube

Stage: 2 and 3 Challenge Level:

This cube has ink on each face which leaves marks on paper as it is rolled. Can you work out what is on each face and the route it has taken?

Product Sudoku 2

Stage: 3 and 4 Challenge Level:

Given the products of diagonally opposite cells - can you complete this Sudoku?

Stage: 3 Challenge Level:

Rather than using the numbers 1-9, this sudoku uses the nine different letters used to make the words "Advent Calendar".

Colour Islands Sudoku

Stage: 3 Challenge Level:

An extra constraint means this Sudoku requires you to think in diagonals as well as horizontal and vertical lines and boxes of nine.

Factors and Multiple Challenges

Stage: 3 Challenge Level:

This package contains a collection of problems from the NRICH website that could be suitable for students who have a good understanding of Factors and Multiples and who feel ready to take on some. . . .

You Owe Me Five Farthings, Say the Bells of St Martin's

Stage: 3 Challenge Level:

Use the interactivity to listen to the bells ringing a pattern. Now it's your turn! Play one of the bells yourself. How do you know when it is your turn to ring?

Games Related to Nim

Stage: 1, 2, 3 and 4

This article for teachers describes several games, found on the site, all of which have a related structure that can be used to develop the skills of strategic planning.

Masterclass Ideas: Working Systematically

Stage: 2 and 3 Challenge Level:

A package contains a set of resources designed to develop students’ mathematical thinking. This package places a particular emphasis on “being systematic” and is designed to meet. . . .

Counting on Letters

Stage: 3 Challenge Level:

The letters of the word ABACUS have been arranged in the shape of a triangle. How many different ways can you find to read the word ABACUS from this triangular pattern?

A First Product Sudoku

Stage: 3 Challenge Level:

Given the products of adjacent cells, can you complete this Sudoku?

Medal Muddle

Stage: 3 Challenge Level:

Countries from across the world competed in a sports tournament. Can you devise an efficient strategy to work out the order in which they finished?

Warmsnug Double Glazing

Stage: 3 Challenge Level:

How have "Warmsnug" arrived at the prices shown on their windows? Which window has been given an incorrect price?

Magic Potting Sheds

Stage: 3 Challenge Level:

Mr McGregor has a magic potting shed. Overnight, the number of plants in it doubles. He'd like to put the same number of plants in each of three gardens, planting one garden each day. Can he do it?

How Old Are the Children?

Stage: 3 Challenge Level:

A student in a maths class was trying to get some information from her teacher. She was given some clues and then the teacher ended by saying, "Well, how old are they?"

When Will You Pay Me? Say the Bells of Old Bailey

Stage: 3 Challenge Level:

Use the interactivity to play two of the bells in a pattern. How do you know when it is your turn to ring, and how do you know which bell to ring?

Tetrahedra Tester

Stage: 3 Challenge Level:

An irregular tetrahedron is composed of four different triangles. Can such a tetrahedron be constructed where the side lengths are 4, 5, 6, 7, 8 and 9 units of length?

Seasonal Twin Sudokus

Stage: 3 and 4 Challenge Level:

This pair of linked Sudokus matches letters with numbers and hides a seasonal greeting. Can you find it?

Stage: 3 Challenge Level:

A mathematician goes into a supermarket and buys four items. Using a calculator she multiplies the cost instead of adding them. How can her answer be the same as the total at the till?

Cinema Problem

Stage: 3 Challenge Level:

A cinema has 100 seats. Show how it is possible to sell exactly 100 tickets and take exactly £100 if the prices are £10 for adults, 50p for pensioners and 10p for children.

More Children and Plants

Stage: 2 and 3 Challenge Level:

This challenge extends the Plants investigation so now four or more children are involved.

Football Sum

Stage: 3 Challenge Level:

Find the values of the nine letters in the sum: FOOT + BALL = GAME

Intersection Sudoku 2

Stage: 3 and 4 Challenge Level:

A Sudoku with a twist.

Making Maths: Double-sided Magic Square

Stage: 2 and 3 Challenge Level:

Make your own double-sided magic square. But can you complete both sides once you've made the pieces?

Intersection Sudoku 1

Stage: 3 and 4 Challenge Level:

A Sudoku with a twist.

Ratio Sudoku 2

Stage: 3 and 4 Challenge Level:

A Sudoku with clues as ratios.


text:
Is it possible to identify different queries/questions in sentence?

I want to identifies different queries in sentences.

Like - Who is Bill Gates and where he was born? or Who is Bill Gates, where he was born? contains two queries

1. Who is Bill Gates?
2. Where Bill Gates was born

I worked on Coreference resolution, so I can identify that he points to Bill Gates so resolved sentence is "Who is Bill Gates, where Bill Gates was born"

Like wise

MGandhi is good guys, Where he was born?
single query
who is MGandhi and where was he born?
2 queries
who is MGandhi, where he was born and died?
3 quries
India won world cup against Australia, when?
1 query (when India won WC against Auz)

I can perform Coreference resolution (Identifying and converting he to Gandhi) but not getting how can I distinguish queries in it.

How to do this?

I checked various sentence parser, but as this is pure nlp stuff, sentence parser does not identify it.

I tried to find "Sentence disambiguation" like "word sense disambiguation", but nothing exist like that.

Any help or suggestion would be much appreciable.

• "Where he was born?" is not a question. "Where was he born?" is. Are you trying to parse poor English? Feb 18 '15 at 18:02

1 Answer

The basic thing, you can do in that situation, is to split your query into N simple sentences each of which should be processed in order to receive YES/NO answer considering if the sentence is a query. That way you will receive following results:

Input: Gandhi is good guys, Where he was born?
->
Gandhi is good guys - not query
Where he was born?  - query
===
1 query

Input: who is MGandhi and where was he born?
->
who is MGandhi     - query
where was he born? - query
===
2 queries

This approach will require anaphora resolution (in order to convert he into Gandhi in first example) and a parser to correctly divide complex sentence into simple ones.

• thanks for this. But already have completed anaphora resolution part. I already added it in question description Oct 16 '14 at 9:25
• OvisAmmon: also , and and will not be sentence boundary in all case Oct 16 '14 at 10:03
• I'm not sure, that your last comment makes grammatical sense. In both examples comma and conjunction and are exactly sentence boundary markers as they split a complex sentence into two simple ones. More of that, Stanford NLP assigns POS tag CC to the conjunction and (you can try it online @ their site). So even with anaphora present as a prerequisite, basic thing you need to learn how to do is simple sentence borders. After that your task is simplified to binary classification query/not_query. Oct 17 '14 at 13:24


text:
# latex multicolumn formatting error

Essentially I would like the word 'likelihood' to be in the fifth column of the fifth row. With the fourth column of the fifth row having no border except on it's right edge. How would i go about achieving that?

\begin{center}
\begin{tabular}{ | p{2.5cm} | p{2.5cm} | p{2.5cm} | p{2.5cm} | p{2.5cm} |  }
\hline
Impact & High & Medium & High & Critical\\
\hline

\multicolumn{1}{c|}{}  & Medium & Low &  Medium & High\\
\cline{2-5}

\multicolumn{1}{c|}{} & Low & Low & Low & Medium \\
\cline{2-5}

\multicolumn{2}{c|}{} & Low & Medium & High \\
\cline{3-5}

\multicolumn{2}{c|} Likelihood & & \\
\cline{3-5}

\end{tabular}
\end{center}

Just change the lines

\multicolumn{2}{c|} Likelihood & & \\
\cline{3-5}

to

\multicolumn{4}{c|}{} & Likelihood\\
\cline{5-5}

A full MWE (minimum working example):

\documentclass{article}
\begin{document}

\noindent
\begin{tabular}{ | *{5}{p{2cm}|}  }
\hline
Impact & High & Medium & High & Critical\\
\hline
\multicolumn{1}{c|}{}  & Medium & Low &  Medium & High\\
\cline{2-5}
\multicolumn{1}{c|}{} & Low & Low & Low & Medium \\
\cline{2-5}
\multicolumn{2}{c|}{} & Low & Medium & High \\
\cline{3-5}
\multicolumn{4}{c|}{} & Likelihood\\
\cline{5-5}
\end{tabular}

\end{document}

• Great answer, worked. Have a merry christmas my dude. – dipl0 Dec 25 '17 at 1:48


text:
If the rate of interest be 4% per annum for first year, 5% per annum for second year and 6% per annum for third year, then the compound interest of 10000 Rs. for 3 years will be :
[A] 1575.20 Rs.
[B] 1600 Rs
[C] 1625 Rs
[D] 2000 Rs


text:
# Quantum Entanglement - assumptions about entanglement across universe

Can entanglement occur in one to many relationship, or many to many? If so, are there entangled particles occurring across the universe that have persisted since the big bang, or does entanglement decay and become a local phenomenon as entropy increases?

What is usually called entanglement is by definition a 1:1 relationship. And it is not a relationship between particles, because there are no particles. In quantum theory there are mathematical objects like vectors and linear operators. First of all there is a space where the math. objects live in, the Hilbert space. Depending on the world you want to model (and how accurate you want to do this) the Hilbert space has more or less dimensions. A quantum model of classical particles usually will have an infinite number of dimensions because you want to model continuous particle positions, i.e. any vector in the space is in general not a sum but an integral of continuous (="Dirac") base vectors. Simpler spaces have a finite number of dimensions. The most simple space has 2 dimensions and is also called "qubit".

Entanglement is a property of

1. a vector (a state vector with length 1) in combination with
2. a split of the Hilbert space where the vector lives.

A Hilbert space can be split into subspaces if its dimension is infinite or finite and not a prime number. This is because if the subspaces have dimensions $$n_1$$ and $$n_2$$ the combined space is a product space with dimension $$n_1 \cdot n_2$$. A qubit has a dimension of 2 (a prime number) and therefore it is the smallest Hilbert space and cannot be split any more, and no 1-qubit-vector can appear entangled in any view.

If a Hilbert space can be split in 2 parts, there are always an infinite number of ways how you can do this. When combining 2 smaller spaces you build a larger product space, and the original 2 parts are lost in some sense: You can split the product space into the original parts, but you can split it into an infinite number of equivalent pairs, too.

Depending on how you split, a given vector will show more or less entanglement. A natural measure of the entanglement is the von Neumann entropy.

The answer to the 2nd question is: probably yes. There can be planes that split the Hilbert space and across these planes there has always been entanglement since the big bang though the world state vector changed all the time. There may be other split planes that had no entanglement at the beginning and now have significant entanglement, and also the other way around.

Last question: this is now my personal opinion... I see no room for classical entropy in a quantum world. I.e. every classical entropy must be explained as entanglement entropy somehow. So if entropy grows (at the split plane you defined), entanglement will grow, too.

Whether entropy of the universe grows is an open question and related to the arrow of time which is currently not understood. For a discussion of this difficult topic see The Physical Basis of The Direction of Time Authors: Zeh, H. Dieter or Quanta Magazine.

• "What is usually called entanglement is by definition a 1:1 relationship" - that's just wrong. Multipartite entanglement is a perfectly standard concept, best exemplified by the tripartite entanglement of GHZ states, which have zero pairwise entanglement but maximal tripartite entanglement. – Emilio Pisanty Aug 15 '18 at 19:54
• A GHZ state is not a special state at all and therefore not worth an own expression. What you name "GHZ state" is a ordinary state vector like all others together with the subjective notion that you split the Hilbert space into 3 parts. I.e. you define 2 split planes (that do not intersect) and therefore get 3 parts. Of course you may define mathematical functions (entanglement measures) on more than 1 split positions if you like. The question is what you learn from them that you can't already learn from 1:1 entanglement measures. – Harald Rieder Aug 15 '18 at 20:03
• And the usual meaning of entanglement is 1:1 entanglement. If you want to talk about a GHZ split, you explicitly must say that. Sorry, I don't understand at all why you voted down. – Harald Rieder Aug 15 '18 at 20:09
• I didn't vote down at all. I voted you up, actually. Sorry for the delay, I was locked out of my account. I have to take some time to consider your answer. – Joe Nov 29 '18 at 20:58
• Yes, I think Emilio Pisanty voted down and my further comments were addressed to him. The belief of the mainstream is, that enganglement is objective, but see here. – Harald Rieder Nov 30 '18 at 7:00


text:
## Friday, December 11, 2009

### Massively collaborative mathematics!

When I was a kid, I never imagined math as a collaborative activity. I imagined mathematicians as lonely hermits, working in isolation. It was only after I became an adult that I started to realize how completely wrong-headed those beliefs were.

Next Thursday evening, I'll be giving a talk to middle school math circle parents at the Guilderland Public Library at 6:30 p.m. about things they can do to support their students' development of problem-solving. One of the things I'll be talking about a good deal is the importance of mathematical communities and collaboration.

My favorite idea on the NYT annual "Year in Ideas" list is a great illustration of the power of collaboration in mathematics:

Massively Collaborative Mathematics

In January, Timothy Gowers, a professor of mathematics at Cambridge and a holder of the Fields Medal, math's highest honor, decided to see if the comment section of his blog could prove a theorem he could not.

In two blog posts — one titled "Is Massively Collaborative Mathematics Possible?" — he proposed an attack on a stubborn math problem called the Density Hales-Jewett Theorem. He encouraged the thousands of readers of his blog to jump in and start proving. Mathematics is a process of generating vast quantities of ideas and rejecting the majority that don't work; maybe, Gowers reasoned, the participation of so many people would speed the sifting.

The resulting comment thread spanned hundreds of thousands of words and drew in dozens of contributors, including Terry Tao, a fellow Fields Medalist, and Jason Dyer, a high-school teacher.

It makes fascinating, if forbiddingly technical, reading. Gowers's goals for the so-called Polymath Project were modest. "I will regard the experiment as a success," he wrote, "if it leads to anything that could count as genuine progress toward an understanding of the problem." Six weeks later, the theorem was proved. The plan is to submit the resulting paper to a top journal, attributed to one D.H.J. Polymath.

By now we're used to the idea that gigantic aggregates of human brains — especially when allowed to communicate nearly instantaneously via the Internet — can carry out fantastically difficult cognitive tasks, like writing an encyclopedia or mapping a social network. But some problems we still jealously guard as the province of individual beautiful minds: writing a novel, choosing a spouse, creating a new mathematical theorem. The Polymath experiment suggests this prejudice may need to be rethought. In the near future, we might talk not only about the wisdom of crowds but also of their genius. JORDAN ELLENBERG

Hat tip: Mrs. Ardito!


text:
# Integral Sin4x Dx

Integral Sin4x Dx.

## Integral of Sin 2x and Sin^2x

The integral of sin 2x and the integral of sinii10 have unlike values. To find the integral of sin2ten, we use the cos 2x formula and the substitution method whereas we apply just the substitution method to find the integral of sin 2x.

Allow us identify the deviation between the integral of sin 2x and the integral of sin2x by finding their values using appropriate methods and also we volition solve some issues related to these integrals.

 1. What is the Integral of sin 2x dx? 2. Definite Integral of sin 2x three. What is the Integral of sin^2x dx? four. Definite Integral of sin^2x 5. FAQs on Integral of sin 2x and sin^2x

## What is the Integral of Sin 2x dx?

The
integral of sin 2x is denoted by ∫ sin 2x dx and its value is -(cos 2x) / two + C,
where ‘C’ is the integration constant. For proving this, we use the integration by substitution method. For this, we assume that 2x = u. And then 2 dx = du (or) dx = du/2. Substituting these values in the integral ∫ sin 2x dx,

∫ sin 2x dx = ∫ sin u (du/ii)

= (1/two) ∫ sin u du

We know that the integral of sin x is -cos ten + C. So,

= (one/two) (-cos u) + C

Substituting u = 2x back here,

∫ sin 2x dx = -(cos 2x) / 2 + C

This is the integral of sin 2x formula.

## Definite Integral of Sin 2x

A definite integral is an indefinite integral with some lower and upper bounds. By the fundamental theorem of Calculus, to evaluate a definite integral, we substitute the upper jump and the lower bound in the value of the indefinite integral and then subtract them in the aforementioned social club. While evaluating a definite integral, nosotros can ignore the integration constant. Allow us calculate some definite integrals of integral sin 2x dx here.

Baca :   Contoh Soal Menyederhanakan Eksponen Dan Penyelesaiannya

### Integral of Sin 2x From 0 to pi/2

∫$$_0^{\pi/2}$$ sin 2x dx = (-1/two) cos (2x) $$\left. \right|_0^{\pi/2}$$

= (-1/two) [cos two(π/ii) – cos 2(0)]

= (-1/2) (-1 – 1)

= (-ane/2) (-2)

= i

Therefore, the integral of sin 2x from 0 to pi/2 is ane.

### Integral of Sin 2x From 0 to pi

∫$$_0^{\pi}$$ sin 2x dx = (-1/ii) cos (2x) $$\left. \right|_0^{\pi}$$

= (-1/2) [cos 2(π) – cos ii(0)]

= (-ane/2) (1 – one)

= 0

Therefore, the integral of sin 2x from 0 to pi is 0.

## What is the Integral of Sin^2x dx?

The
integral of sin2x
is denoted by ∫ sintwoten dx and its value is (x/2) – (sin 2x)/4 + C. We tin can testify this in the following two methods.

• By using the cos 2x formula
• By using the integration by parts

### Method i: Integral of Sin^2x Using Double Bending Formula of Cos

To detect the integral of sin2x, we use the double angle formula of cos. One of the cos 2x formulas is cos 2x = 1 – 2 sintwox. By solving this for sin2x, we become sintwoten = (1 – cos 2x) / 2. We use this to observe ∫ siniix dx. And so we get

∫ sin210 dx = ∫ (ane – cos 2x) / 2 dx

= (ane/ii) ∫ (1 – cos 2x) dx

= (1/2) ∫ one dx – (1/2) ∫ cos 2x dx

We know that ∫ cos 2x dx = (sin 2x)/two + C. Then

∫ sin2ten dx = (1/2) x – (one/2) (sin 2x)/2 + C (or)

∫ siniix dx = x/2 – (sin 2x)/four + C

This is the integral of sin^2 x formula.
Permit u.s. evidence the aforementioned formula in another method.

### Method 2: Integral of Sin^2x Using Integration by Parts

Nosotros know that we can write siniix as sin x · sin x. To discover the integral of a product, we can employ the integration by parts.

∫ sin2x dx = ∫ sin x · sin ten dx = ∫ u dv

Here, u = sin ten and dv = sin x dx.

Then du = cos ten dx and v = -cos 10.

By integration by parts formula,

∫ u dv = uv – ∫ five du

∫ sin x · sin x dx = (sin ten) (-cos ten) – ∫ (-cos x)(cos x) dx

∫ siniix dx = (-1/2) (2 sin x cos 10) + ∫ cosiix dx

By the double angle formula of sin, 2 sin x cos 10 = sin 2x and by a trigonometric identity, cos2ten = ane – siniix. And then

∫ siniix dx = (-ane/2) sin 2x + ∫ (1 – sintwox) dx

∫ sin2x dx = (-1/2) sin 2x + ∫ one dx – ∫ siniix dx

Baca :   Pertanyaan Sulit Tentang Sistem Reproduksi

∫ sin2ten dx + ∫ sintwoten dx = (-1/2) sin 2x + x + C₁

2 ∫ siniix dx = ten – (ane/2) sin 2x + C₁

∫ sin2x dx = ten/2 – (sin 2x)/four + C
(where C = C₁/2)

Hence proved.

## Definite Integral of Sin^2x

To evaluate the definite integral of sin2x, we only substitute the upper and lower bounds in the value of the integral of sin2ten and subtract the resultant values. Let u.s.a. evaluate some definite integrals of integral siniix dx here.

### Integral of Sin^2x From 0 to 2pi

∫$$_0^{2\pi}$$ sin2x dx = [10/2 – (sin 2x)/4] $$\left. \right|_0^{2\pi}$$

= [2π/2 – (sin 4π)/4] – [0 – (sin 0)/4]

= π – 0/4

= π

Therefore, the integral of sin210 from 0 to 2π is π.

### Integral of Sin^2x From 0 to pi

∫$$_0^{\pi}$$ sintwoten dx = [x/2 – (sin 2x)/iv] $$\left. \correct|_0^{\pi}$$

= [π/2 – (sin 2π)/4] – [0 – (sin 0)/four]

= π/2 – 0/iv

= π/2

Therefore, the integral of sin2x from 0 to π is π/ii.

Important Notes Related to Integral of Sin 2x and Integral of Sin2x:

• ∫ sin 2x dx = -(cos 2x)/2 + C
• ∫ sintwox dx = x/2 – (sin 2x)/4 + C

Topics Related to Integral of Sin2x and Integral of Sin 2x:

• Indefinite Integral
• Integral Calculator
• Indefinite Integral Calculator
• Definite Integral Calculator
• Applications of Integrals

Great learning in loftier school using simple cues

Indulging in rote learning, you are likely to forget concepts. With Cuemath, you volition learn visually and be surprised by the outcomes.

Volume a Free Trial Class

## FAQs on Integral of Sin 2x and Sin^2x

### What is the Integral of Sin 2x dx?

The
integral of sin 2x dx
is written as ∫ sin 2x dx and ∫ sin 2x dx = -(cos 2x)/2 + C, where C is the integration abiding.

### What is the Integral of Sin^2x dx?

The integral of sin^2x dx is written equally ∫ sintwox dx and ∫ sintwodx = ten/2 – (sin 2x)/4 + C. Hither, C is the integration abiding.

### How to Find the Definite Integral of Sin 2x from 0 to Pi/4?

Nosotros know that ∫ sin 2x dx = -(cos 2x)/2. Substituting the limits 0 and π/4, we get (-1/2) cos two(π/4) – (-one/2) cos two(0) = (1/2) 0 + (1/2) (1) = 1/2.

### What is the Integral of Sin^3x dx?

∫ sin3x dx = ∫ sin2x sin 10 dx = ∫ (1 – costwox) sin x dx. Let us substitute cos x = u. Then -sin x dx = du. So the to a higher place integral becomes, ∫ (one – u2) (- du) = -u + uiii/3 + C. Substituting u = sin ten back here, ∫ sin3x dx = -cos x + costhreex/3 + C.

### What is the Integral of Sin 3x dx?

To find the ∫ sin 3x dx, let that 3x = u. And so 3 dx = du. From this, dx = du/three. Then the above integral becomes, ∫ sin u (1/3) du = (ane/3) (-cos u) + C = (-1/three) cos (3x) + C.

### How to Find the Definite Integral of sin^2x from 0 to Pi/4?

We know that ∫ sin2dx = ten/2 – (sin 2x)/iv + C. Substituting the limits here, nosotros get [π/viii – (sin π/2)/4] – [0 – (sin 0)/4] = π/8 – 1/4.

### Is the Integral sin 2x dx Same as Integral sin^2x dx?

No, the values of these ii integrals are Non same. We have

• ∫ sin2dx = x/2 – (sin 2x)/four + C
• ∫ sin 2x dx = (-cos 2x)/2 + C

## Integral Sin4x Dx

Source: https://www.cuemath.com/calculus/integral-of-sin-2x/

## Contoh Soal Perkalian Vektor

Contoh Soal Perkalian Vektor. Web log Koma – Setelah mempelajari beberapa operasi hitung pada vektor …


text:
# Math Help - A nice quadratic ^^

1. ## A nice quadratic ^^

Hello,

$P_m(x)=(m-3)x^2+(2m-1)x+(m+2)$, $m \in \mathbb{R}$

The discriminant is $\Delta=(2m-1)^2-4(m-3)(m+2)=4m^2-4m+1-4(m^2-m-6)=\boxed{25}$

One can see that the discriminant is independent from m !

The solutions are :

$x_1=\frac{-(2m-1)-5}{2(m-3)}$ and $x_2=\frac{-(2m-1)+5}{2(m-3)}$

Hey, what else ??
Let's see $x_1$ :

$x_1=\frac{-2m+2-5}{2(m-3)}=\frac{-2(m-3)}{2(m-3)}=\boxed{-1}$ !!!

So $-1$ is always a root of this quadratic polynomial, whatever m is

This, however, can be explained : $(2m-1)-\bigg[(m-3)+(m+2)\bigg]=0$, so -1 is a root.

Isn't it nice ?

2. Originally Posted by Moo
Hey, what else ??
Hey

Let's see $x_1$ :

$x_1=\frac{-2m+2-5}{2(m-3)}=\frac{-2(m-3)}{2(m-3)}=\boxed{-1}$ !!!
Why?
---
By the way, $m\not = 3$


text:
Create layouts for longitudinal networks.

layout_as_dynamic(gList, weights = NA, alpha = 0.5, iter = 500, tol = 1e-04)

## Arguments

gList

list of igraph objects. Each network must contain the same set of nodes.

weights

possibly a numeric vector with edge weights. If this is NULL and the graph has a weight edge attribute, then the attribute is used. If this is NA then no weights are used (even if the graph has a weight attribute). By default, weights are ignored. See details for more.

alpha

weighting of reference layout. See details.

iter

number of iterations during stress optimization

tol

stopping criterion for stress optimization

## Value

list of coordinates for each graph

## Details

The reference layout is calculated based on the union of all graphs. The parameter alpha controls the influence of the reference layout. For alpha=1, only the reference layout is used and all graphs have the same layout. For alpha=0, the stress layout of each individual graph is used. Values in-between interpolate between the two layouts.

Be careful when using weights. In most cases, the inverse of the edge weights should be used to ensure that the endpoints of an edges with higher weights are closer together (weights=1/E(g)\$weight).

## References

Brandes, U. and Indlekofer, N. and Mader, M. (2012). Visualization methods for longitudinal social networks and stochastic actor-oriented modeling. Social Networks 34 (3) 291-308

## Examples

library(igraph)
g1 <- sample_gnp(20,0.2)
g2 <- sample_gnp(20,0.2)
g3 <- sample_gnp(20,0.2)

xy <- layout_as_dynamic(list(g1,g2,g3))

# layout for first network
xy[[1]]
#>              [,1]        [,2]
#>  [1,]  0.63499545 -1.60105275
#>  [2,]  1.31912197  1.39604692
#>  [3,] -0.49840208  0.90572748
#>  [4,]  0.40380703  1.46454610
#>  [5,]  1.39873029 -0.92957223
#>  [6,] -0.96413636 -0.48972103
#>  [7,]  0.41649872  0.98732712
#>  [8,] -0.71376482 -1.03436710
#>  [9,]  0.24627933  0.15937700
#> [10,] -1.57192694  0.70869851
#> [11,]  1.89540482 -0.22159264
#> [12,] -0.05346289  1.22831217
#> [13,]  0.48313228  0.26443266
#> [14,] -0.18743568  1.94941667
#> [15,] -0.19762508 -0.18296778
#> [16,]  0.41693329 -1.00725754
#> [17,] -0.07786289 -2.42286599
#> [18,]  0.54943299 -0.70412002
#> [19,] -1.95510118 -0.08965390
#> [20,] -0.64773866 -0.01406314


text:
This function allows users to make the changes to their data that occur in wbm() without having to fit the model.

make_wb_data(
formula,
data,
id = NULL,
wave = NULL,
model = "w-b",
detrend = FALSE,
use.wave = FALSE,
wave.factor = FALSE,
min.waves = 2,
balance.correction = FALSE,
dt.random = TRUE,
dt.order = 1,
weights = NULL,
offset = NULL,
interaction.style = c("double-demean", "demean", "raw"),
...
)

## Arguments

formula Model formula. See details for crucial info on panelr's formula syntax. The data, either a panel_data object or data.frame. If data is not a panel_data object, then the name of the individual id column as a string. Otherwise, leave as NULL, the default. If data is not a panel_data object, then the name of the panel wave column as a string. Otherwise, leave as NULL, the default. One of "w-b", "within", "between", "contextual". See details for more on these options. Adjust within-subject effects for trends in the predictors? Default is FALSE, but some research suggests this is a better idea (see Curran and Bauer (2011) reference). Should the wave be included as a predictor? Default is FALSE. Should the wave variable be treated as an unordered factor instead of continuous? Default is FALSE. What is the minimum number of waves an individual must have participated in to be included in the analysis? Default is 2 and any valid number is accepted. "all" is also acceptable if you want to include only complete panelists. Correct between-subject effects for unbalanced panels following the procedure in Curran and Bauer (2011)? Default is FALSE. Should the detrending procedure be performed with a random slope for each entity? Default is TRUE but for short panels FALSE may be better, fitting a trend for all entities. If detrending using detrend, what order polynomial would you like to specify for the relationship between time and the predictors? Default is 1, a linear model. If using weights, either the name of the column in the data that contains the weights or a vector of the weights. this can be used to specify an a priori known component to be included in the linear predictor during fitting. This should be NULL or a numeric vector of length equal to the number of cases. One or more offset terms can be included in the formula instead or as well, and if more than one is specified their sum is used. See model.offset. The best way to calculate interactions in within models is in some dispute. The conventional way ("demean") is to first calculate the product of the variables involved in the interaction before those variables have their means subtracted and then subtract the mean of the product from the product term (see Schunk and Perales (2017)). Giesselmann and Schmidt-Catran (2020) show this method carries between-entity differences that within models are designed to model out. They suggest an alternate method ("double-demean") in which the product term is first calculated using the de-meaned lower-order variables and then the subject means are subtracted from this product term. Another option is to simply use the product term of the de-meaned variables ("raw"), but Giesselmann and Schmidt-Catran (2020) show this method biases the results towards zero effect. The default is "double-demean" but if emulating other software is the goal, "demean" might be preferred. Additional arguments provided to lme4::lmer(), lme4::glmer(), or lme4::glmer.nb().

## Value

A panel_data object with the requested specification.

## Examples

data("WageData")
wages <- panel_data(WageData, id = id, wave = t)
make_wb_data(lwage ~ wks + union | fem, data = wages)#> # Panel data:    4,165 x 8
#> # entities:      id [595]
#> # wave variable: t [1, 2, 3, ... (7 waves)]
#>    id        t lwage   wks  union   fem imean(wks) imean(union)
#>    <fct> <dbl> <dbl> <dbl>  <dbl> <dbl>        <dbl>          <dbl>
#>  1 1         1  5.56 -5.57  0         0         37.6          0
#>  2 1         2  5.72  5.43  0         0         37.6          0
#>  3 1         3  6.00  2.43  0         0         37.6          0
#>  4 1         4  6.00  1.43  0         0         37.6          0
#>  5 1         5  6.06  4.43  0         0         37.6          0
#>  6 1         6  6.17 -2.57  0         0         37.6          0
#>  7 1         7  6.24 -5.57  0         0         37.6          0
#>  8 2         1  6.16  2.43 -0.143     0         31.6          0.143
#>  9 2         2  6.21 -4.57 -0.143     0         31.6          0.143
#> 10 2         3  6.26  1.43  0.857     0         31.6          0.143
#> # ... with 4,155 more rows


text:
# Morita equivalence of the invariant uniform Roe algebra and the reduced group C*-algebra

In his paper “Comparing analytic assemby maps”, J. Roe considers a proper and cocompact action of a countable group $$\Gamma$$ on a metric space $$X$$. He constructs the Hilbert $$C^*_r(\Gamma)$$-module $$L^2_\Gamma(X)$$ as the simultaneous completion of the $$\mathbb C\Gamma$$-module $$C_c(X)$$ under the $$\mathbb C\Gamma$$-valued inner product given by the formula $$\langle\psi\mid\psi’\rangle_\Gamma=\sum_{\gamma\in\Gamma}\langle\psi\cdot g\mid\psi’\rangle\,\gamma.$$ He shows (Lemmas 2.1-3) that the C$$^*$$-algebra of $$C^*_r(\Gamma)$$-compact operators $$\mathbb K_{C^*_r(\Gamma)}(L^2_\Gamma(X))$$ is isomorphic to $$C^*_\Gamma(X)$$, the $$\Gamma$$-invariant uniform Roe algebra.

All of this is fine, but there seems to be a problem with the following claims, and this is what my question is about.

Roe claims that $$\mathbb K_{C^*(\Gamma)}(L^2_\Gamma(X))$$ (and hence $$C^*_\Gamma(X)$$) is Morita equivalent to $$C^*_r(\Gamma)$$. I fail to see this and my question is: Is this true? If so, how to prove it? If not, how to disprove it?

Looking at Roe’s arguments, he deduces the above statement from the more general claim that for any (countably generated) Hilbert $$C^*_r(\Gamma)$$-module $$E$$, $$\mathbb K_{C^*(\Gamma)}(E)$$ is Morita equivalent to $$C^*_r(\Gamma)$$. What is true is that it is Morita equivalent to $$\langle E\mid E\rangle$$ (with $$E$$ setting up the equivalence), that is immediate. The general statement that Roe makes however seems to be false unless $$E$$ is (right-) full.

Indeed, let $$X=\mathbb Z$$ with the obvious action of $$\Gamma=\mathbb Z\rtimes\mathbb Z/2$$. Then the non-trivial character of $$\mathbb Z/2=\Gamma/\mathbb Z$$ defines a Hilbert $$C^*_r(\Gamma)$$ module whose compact operators are $$\mathbb C$$ with $$K_0(\mathbb C)=\mathbb Z$$. On the other hand, $$K_0(C^*_r(\Gamma))=\mathbb Z^3$$. (See, for instance, the paper “The structure of crossed products of irrational rotation algebras by finite subgroups of $$\mathrm{SL}_2(\mathbb Z)$$” by Echterhoff, Lück, Phillips, and Walters.) This contradicts the claimed Morita equivalence for an arbitrary Hilbert C$$^*$$-module $$E$$.

Concerning the particular case of $$E=L^2_\Gamma(X)$$, it would be great see that this is in fact a full HIlbert $$C^*_r(\Gamma)$$-module. I fail to see this, however. One computes in case of the above example: $$\langle\delta_m\mid\delta_n\rangle=(m-n,+)+(m+n,-),$$ so the impression is that perhaps the closed ideal generator by the inner products is not the entire algebra.

It would be already helpful I someone could shed shome light on this special case.


text:
# Lesson 04-13: main functions¶

Learning Target: I can incorporate main functions into my code.

## What is a main function?¶

Previously, when working with functions, any code that was not a part of a function would be called the “main body” of the code - the code that gets run first (and uses the functions that you’ve created). However, this is not best practice. We should have a separate function for the main body of our code, and this is typically put inside of a function called main.

For example, if my code looked something like this:

  1 2 3 4 5 6 7 8 9 10 11 12 def function1(): #stuff def function2(): #stuff def function3(): #stuff function1() function2() function3()

Lines 10-12 would be the main body of my code, as it is what gets run first. However, after moving everything into a main function, it will look like this:

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 def function1(): #stuff def function2(): #stuff def function3(): #stuff def main(): function1() function2() function3() main()

Notice how we have an additional function call on line 15, which just calls main(), which executes our functions. This code does the same thing as above.

## The __name__ attribute¶

So why do we want to use a main function? Well, the problem arises when we start to import functions from other python files, some of which you will be creating.

For example, when you run import random to access to random library, you are getting access to all the useful functions in random, such as random.randint(). However, if that random.py file had code that didn’t belong in any function, that code would be executed whenever someone imported the file!

We will be eventually creating libraries/modules, which is a collection of useful code bundled together for other programs to use. Note that this is a general definition, and there are differences between python modules, libraries, and collections. Because of this, it’s important that none of our main code gets run when we are just importing it as a file.

To get it to run, we just include this snippet in our files, at the bottom:

if __name__ == "__main__":
main()

The __name__ variable is a special variable set by the python interpreter. If we are running a program directly, it will set __name__ to "__main__". But if we import it from another file, __name__ will be set to that importing file’s name instead.

So if we are only running the main() function when __name__ is "__main__", we are only running the main code when we are not importing it as a function, which is a best practice when writing python code.

Next Section - Unit 4 Pre-Lab Check


text:
Visnyk of the Lviv University. Series Physics 58 (2021) ñ. 39-49
DOI: https://doi.org/10.30970/vph.58.2021.39

## THE DEPRESSION EFFECT IN SOLAR AND STELLAR CONTINUOUS SPECTRA

M. Vavrukh, O. Stelmakh, D. Dzikovskyi

In this paper we outline the main relations of quantum mechanical approach to description of collision processes of photons with microparticles of solar-type stellar atmospheres. Here, the main process of continuous absorption coefficient formation is the process of photoionization of negative hydrogen ions H-. We have proposed hypothesis, which generalize Wildt's hypothesis \cite{wildt_1939, wildt_1941}, in order to obtain the agreement of the results of a laboratory experiment with theoretical calculation. We assumed that authors of work\cite{smit_burch_1959} measured not the partial cross section of ion H- photoionization, but some effective cross section \sigmaeff(\lambda), formed by three low-energy processes: photoionization of ion H-, photoionization of neutral hydrogen atoms excited to the level with the main quantum number n\geq3, and photon absorption by free'' electrons. In the region \lambda\lambda (6500 -- 8200) \AA the effect of photon absorption by free'' electrons is negligible. The effective cross section \sigmaeff(\lambda) calculated for the model, which takes into account the photoionization of ions H- and hydrogen atoms from states n=3 and 4, agree with the results of the work of Smith and Burch. In the model of the one-dimensional Aller atmosphere it was investigated spectral properties of absorption continuous coefficient and radiation intensity of the center of solar disk. The calculation results with high accuracy coincide with the observation results from works \cite{Burlov1998, Labs1968}. Large-scale depression of intensity was revealed in the region \lambda\lambda (6500 -- 8200) \AA which is determined by the difference between the radiation intensity for a completely black body and the calculated / measured intensity of the center of the solar disk. The relative value of depression has order 2\div2.5\% in the middle of the specified wavelength interval. It was substantiated the possibility of manifestation of depression effect in radiation of other stars, in particular those belonging to the spectral classes A-G. Based on data on the spectral intensity of stars from the catalog \cite{Komarova_1995} the effect of depression was revealed in some stars of classes A, F, G, belonging to the main sequence, sub-giants and giants. The perspective of expanding the search for the effect of depression in the spectra of stars seems to be an urgent task for observers and theorists. %

References
1. O. M. Stelmakh, N. L. Tyshko, Odessa Astronomical Publication. 28, 5 (2015).
2. M. V. Vavrukh, I. E. Vasil’eva, O. M. Stelmakh, N. L. Tyshko, Kinematics and Physics of Celestial Bodies. 32, 129 (2016). DOI: 10.3103/S0884591316030053.
3. E. Milne, Philos. Trans. Roy. Soc. London. 223, 1 (1923).
4. R. Wildt, Astrophys. J. 89, 295 and 90, 611 (1939). DOI:10.1086/144125
5. R. Wildt, Astrophys. J. 93, 47 (1941). DOI:10.1086/144242
6. H. Massey, Negative ions. Cambridge, London, 1976. -- 754 ñ.
7. L. M. Branscomb, S. J. Smith, J. Research Natl. Bur. Standards. 1955, 165 (1955).
8. O. Weber, Z. Phys. 152, 281 (1958).
9. S. J. Smith, D. S. Burch, Phys. Rev. 116, 5 (1959). DOI:https://doi.org/10.1103/PhysRev.116.1125
10. S. Geltman, Phys. Rev. 136, 935 (1962). DOI:10.1086/147447
11. A. W. Wishart, J.Phys. B: Atom. Molec. Phys. 12, 3511 (1979).
12. A. L. Stewart, J.Phys. B: Atom. Molec. Phys. 11, 3851 (1978).
13. M. V. Vavrukh, D. V.Dzikovskyi, O. M. Stelmakh, V. B. Solovyan, Mathem. Model. and Computing. 7, 125 (2020). DOI:10.23939/mmc2020.01.125
14. ². Î. Âàêàð÷óê, Òåîð³ÿ çîðÿíèõ ñïåêòð³â. Ëüâ³â: ËÍÓ ³ìåí³ ²âàíà Ôðàíêà, 2002. -- 356ñ.
15. Ë. Àëëåð Àòîìû, çâåçäû è òóìàííîñòè. Ìîñêâà: Ìèð, 1976. -- 352 ñ.
16. K. A. Burlov-Vasiljev, I. E. Vasiljeva, Yu. B. Matvejev, Solar Phys. 177, 25 (1998). DOI:10.1023/a:1004953725155
17. D. Labs, H. Neckel, Zeitschrift fur Astrophysik. 69, 1 (1968).
18. N. S. Komarov, A. V. Dragunova et al., Odessa Astronomical Publication 8, 3 (1995).
19. M. V. Vavrukh, O. M. Stelmalh, S. V. Smerechynskyi // Journal of physical studies 13, 3902-14 (2009).


text:
# What is a power function?

Dec 17, 2014

A power function is a function of the form $f \left(x\right) = a {x}^{b}$.

It is called a power function because it is simply a constant times a variable base to a certain power.


text:
# Running Octopus

### Input

In order to run, Octopus requires an input file that ‘‘must’’ be called inp . Depending on your input file there are other files that you might need, like pseudopotentials or coordinate files (we will discuss this later in this manual).

The rest of the files that are required are part of the Octopus installation; if Octopus is correctly installed they should be available and Octopus should know where to find them. With Octopus you can’t just copy the binary between systems and expect it to work.

### Executing

To run Octopus you just have to give the octopus command in the directory where you have your input file. While running, Octopus will display information on the screen. If you want to capture this information you can send the output to a file, let’s say out.log , by executing it like this:

octopus > out.log

This captures only the normal output. If there is a warning or an error, it will be still printed on the screen. To capture everything to a file, run

octopus >& out.log

If you want to run Octopus in the background, append & to the last command.

### Output

While running, Octopus will create several output files, all of them inside subdirectories in the same directory where it was run. The files that contain the physical information depend on what Octopus is doing and they will be discussed in the next chapter.

One directory that is always created is exec/ , this file contains information about the Octopus run. Here you will find the parser.log file, a text file that contains all the input variables that were read by Octopus, both the variables that are in the input file and the variables that took default values; in the second case they are marked by a comment as -default. This file is very useful if you want to check that Octopus is correctly parsing a variable or what are the default values that it is taking.

### Clean Stop

Octopus allows to stop the code gracefully after finishing the current iteration. These may not work for gcm, invert_ks, casida run modes. You can use this to prevent possible corruption of restart information when your job is killed by a scheduler, by preemptively asking Octopus to quit automatically in a job script like this:

This can be done by creating a file called stop in the running directory:

 -PBS -l walltime=4:10:00
mpirun $HOME/octopus/bin/octopus &> output & sleep 4h touch stop wait  or more sophisticatedly like this:  MIN=qstat -a$PBS_JOBID | awk '{wall=$9} END {print$9}' | awk -F: '{min=($1*60)+$2; print min}'
sh ~/sleep_stop.sh stop $((MIN-10))m > sleepy & mpirun$HOME/octopus/bin/octopus &> output

with auxiliary script sleep_stop.sh:

 -!/bin/bash
if [ $- -ne 2 ]; then echo "Usage: sleep_stop.sh FILENAME TIME" else echo "Time until$1 created: $2" rm -f$1
sleep $2 touch$1
fi

### Restarting

Another directory that will created is restart/ ; in this directory Octopus saves the information from the calculation that it is doing. This information can be used in the following cases:

• If Octopus is stopped without finishing by some reason, it can restart from where it was without having to do all work again.
• If after the calculation is done (or even if it was stopped), the user wants to do the same simulation with some different parameters, Octopus can save some work by starting from the restart information.
• There are some calculations that require the results of other type of calculation as an input; in this case it uses the files written in restart/ by the previous calculation (we will discuss this case later, when we talk about the different calculation modes).

Sometimes it’s not desired to restart a calculation, but to start it from the very beginning. Octopus can be instructed to do so by setting the input variable fromScratch to yes.


text:
# Bayesian inference on noncentrality parameters of t- and F-distributions

Suppose I observe a random variable $x$ drawn from a non-central t- or F- distribution, and would like to perform inference on the non-centrality parameter. How would a Bayesian approach this problem? Are there known conjugate priors for these?

For the t-distribution I have seen some reference to LeCoutre's 'lambda-prime' distribution, but I believe this is for a non-informative prior (and I know very little about Bayesian analysis). Is there a parallel result for the F-distribution? How are these used?

• Are you desiring a closed-form solution, or would you be willing to use MCMC techniques to generate a (large) sample from the posterior distribution? – jbowman Feb 17 '12 at 13:48
• I am looking for a closed-form solution. I was also curious if there was a well-developed Bayesian view of e.g. the frequentist t- and F-tests for regression, ANOVA, etc. – shabbychef Feb 18 '12 at 6:36

Both $t$ and $F$ distributions being outside exponential families, there is no conjugate distribution even in the central case (see Bayesian Choice, Chap. 3). You thus need to use non-conjugate priors and numerical methods like MCMC. For instance, using a flat prior on the non-centrality parameter.
• @probabilityislogic: truly, the hidden variable representations of the $t$ and $F$ distributions can rescind an exponential family setting. (I called this approach hidden mixtures in the early 90's.) For someone with little knowledge of Bayesian analysis, this may be too involved, though. – Xi'an Feb 18 '12 at 17:27


text:
# Chapter 5 - Section 5.1 - Introduction to Polynomials and Polynomial Functions - Exercise Set - Page 325: 43

$22y^5+9y^4+7y^3-13y^2+3y-11$

#### Work Step by Step

Consider the given polynomial $(13y^5+9y^4-5y^2+3y+6)-(-9y^5-7y^3+8y^2+11)$ Need to drop the parentheses and will have to change the sign of each term of the second polynomial because of the presence of the negative outside. Thus, $(13y^5+9y^4-5y^2+3y+6)-(-9y^5-7y^3+8y^2+11)=13y^5+9y^4-5y^2+3y+6+9y^5+7y^3-8y^2-11$ or, $=13y^5+9y^5+9y^4+7y^3-5y^2+3y+6-8y^2-11$ or, $=22y^5+9y^4+7y^3-13y^2+3y-11$

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.


text:
Variant Calling - Ion Torrent
0
0
Entering edit mode
10 months ago
AndreaSibi • 0

Hello to everyone,

It is probably a stupid question but starting now with the bioinformatics domain, I would like to ask.

I already performed some variant calling experiments on Illumina data, by starting from .fastq files and going through the variant calling phase.

Now, for the first time, I have a dataset of Ion Torrent data..here I don't have fastq files but rather I have .bam files (aligned files).

The question is..can i go directly through the variant calling step? Or do I need to transform these .bam files into .fastq file and perform the quality control and again the alignment on these ones? (in this second case, i want to ask you if there is a loss of information by passing from .bam files to the .fastq)

Thank you for the attention.

variant calling iontorrent bam • 277 views
1
Entering edit mode

Ion Torrent workflow is a bit unconventional compared to what you're probably used to with Illumina data. When I had to deal with such data in the past, I found some help in a previous Biostars post here, specifically the part where it talks about how .bam files generated from Ion Torrent stores additional information which TVC (Torrent Variant Caller) uses to perform variant calling.


text:
# Homework Help: Back with more questions

1. Dec 15, 2004

### Kimorto

Thanx for everyone who has helped so far.
(This is not homework, I'm doing problems to study for my final that is in less than 3 hours).
This next question i'm having a hard time with is...

A 2150-kg truck is traveling along a straight,level road at a constant speed of 55.0km/h (15.8m/s) when the driver removes his foot from the accelerator. After 21.0 seconds, the truck's speed is 33.0 km/h (9.2m/s). What is the magnitude of the average net force acting on the truck during the 21.0 second interval?

The answer is 626 N but I have no idea on how to get to it.

2. Dec 15, 2004

### marlon

This is one dimensional movement along a straight line...

$$v_f = v_i - a * t$$. where i and f denote initian and final...

just try it and multiply with m to find the force...

regards
marlon

3. Dec 15, 2004

### Kimorto

Marlon, that doesn't seem right, I keep getting 675 and the answer says its 626 (multiple choice question, closest answer is 626, and teacher said answer is 626)

4. Dec 15, 2004

### marlon

yes, i see your point though i am quite certain of this...

regards
marlon...

perhaps someone else can help...

5. Dec 15, 2004

### cyby

F = dp/dt = m(v_2 - v_1)/ t = 2150kg(9.2m/s - 15.8m/s)/21s ~ 675

675 has to be right. Your book/teacher is wrong :P

6. May 19, 2010

### poopyphysics

you have your conversions wrong.. 55 km/h is 15.3 m/s not 15.8 m/s. The rest is correct.


text:
# Parallelogram Law of Vectors

Parallelogram law of vectors: It states that, “If two vector quantities acting simultaneously on a body are represented in both magnitude and direction by two adjacent sides of a parallelogram drawn from a point, their resultant is given by the diagonal passing through the same point.”

To find the magnitude and direction of the resultant of the vector P and Q, a line OA is produced.

Parallelogram law of vectors

In triangle OBN,

OB2 = ON2 + BN2

or, R2 = (OA + AN)2 + BN2

or, R2 = OA2 + 2OA · AN + AN2 + BN2……… (i)

From right angled triangle ABN,

$$cos \theta = \frac{AN}{AB}$$
$$\therefore AN = ABCos \theta$$

Substituting the value of AN and OC in equation (i), we get:

R2 = OA2 + AB2 + 2OA . AB .ABCosθ

or, R2 = OA2 + AB2 + 2OA .OC.ABCosθ (Since, AB = OC)

or, R2 = P2 + 2PQCosθ  + Q2

$$\therefore R= \sqrt{P^2 + 2PQcos \theta + Q^2}$$

The above expression gives the magnitude of resultant of P and Q.

To find the direction of R, let β be the angle made by the resultant R with direction of P.

Now, In triangle OBN,$$Tan\beta = \frac{BN}{ON} = \frac{BN}{OA + AN}…….(ii)$$

In triangle ABN,
$$Sin \theta = \frac{BN}{OB}$$
$$or, BN = ABSin \theta$$

Putting the value of BN in equation (ii), we get:

$$Tan\beta = \frac{AB . sin \theta }{OA + ABCos \theta }$$
$$or, Tan\beta = \frac{OC .sin \theta }{OA + OC.Cos \theta }$$

$$or, Tan \beta = \frac{Q.Sin \theta}{P + Q.Cos \theta }$$
$$\therefore \beta = Tan^{-1}( \frac{Q.Sin \theta}{P + Q.Cos \theta })$$

The above expression gives the direction of resultant R.

Do you like this article ? If yes then like otherwise dislike :


text:
# lsmeans() to infer if a mean is different from 0 after using mixed-model

my data:

values:
[1]  0.69  0.99  0.49  1.10 -0.34  0.76  0.88  1.98 -0.14 -3.96 -2.73 -0.39  1.72
[14] -5.76 -3.69  0.13  0.42  0.27  1.10  0.87  0.84  0.54 -0.41 -0.36

groups:
[1] "2"  "2"  "2"  "3"  "3"  "3"  "4w" "4w" "4w" "5n" "5n" "5n" "5s" "5s" "5s"
[16] "7"  "7"  "7"  "8"  "8"  "8"  "9n" "9n" "9n"

I fitted a mixed model with the mean as predictor and got an output.

mod<- lmer(values~1 + (1|groups))

Scaled residuals:
Min      1Q  Median      3Q     Max
-2.6092 -0.2184  0.2177  0.4001  2.0879

Random effects:
Groups                  Name        Variance Std.Dev.
DFClay_groups$$B$$D.a.akt (Intercept) 1.215    1.102
Residual                            2.536    1.592
Number of obs: 24, groups:  DFClay_groups$$B$$D.a.akt, 8

Fixed effects:
Estimate Std. Error t value
(Intercept)  -0.2083     0.5075  -0.411

The reason I chose this model (with ~1) is because I want to test if the mean of the data-set is the same as zero while accounting for the random effect governing the values.

To test for H0: mean = 0 I used the lsmeans() function:

lsmeansmod<-lsmeans(mod, ~1) ### In the special case where the mean (or weighted mean) of all the predictions is desired, specify specs as ~ 1 or "1". (R-Handbook)

I wrapped the lsmeansmod into the summary() function.

summary(lsmeansmod, infer = c(TRUE,TRUE))

output:
1       lsmean    SE df lower.CL upper.CL t.ratio p.value
overall -0.208 0.507  7    -1.41    0.992 -0.411  0.6937

Is the p-value now telling me that the mean of the data that have been "corrected" for the random effect is not different from 0?

I think the relevant question is whether the hierarchical structure of the design/data is "meaningful" enough to be modeled. To test this, you need to first run an lmer() model with the grouping structure specified and then run an lm() model without the random effect(s). Once you have both of those, you need to estimate a likelihood ratio (LR) test comparing the two models using exactLRT() from RLRsim(). If the LR test is significant, that indicates that you need to account for the dependency in the data. It doesn't necessarily tell you how to account for such dependency. There are many different ways to do so (e.g., adjust standard errors, use dummy 'fixed effects' for the groups, or use a gee) and it is up to you to decide which is best for your application.


text:
# Redefine command in latex

1. Feb 5, 2013

### Dragonfall

I want to redefine \mathbf to have a different font. I can't seem to make \newcommand work since it says "already defined". Help?

2. Feb 5, 2013

### D H

Staff Emeritus
It's \renewcommand.

Don't use it lightly. It's usually much better to define your own macros as opposed to overriding macros whose definitions have deep meaning.

This looks like an "XY" problem. Underneath the hood you are facing problem X, something about which you haven't told us a single word. You somehow see that approach Y is a solution to your underlying problem, so you ask how to do Y. It's usually much better is to ask us about X directly.

So, what's your real problem, and what is motivating you to want to change \mathbf?

3. Feb 5, 2013

### Dragonfall

I've used \mathbf throughout a very long work, and I want to change the font from what it is to textsf+textbf, which looks less... aggressive. I suppose I could just change every \mathbf instead redefining them.

4. Feb 5, 2013

### jhae2.718

I'd make a custom LaTeX command to get the desired formatting and then use an editor command or sed or something to replace mathbf.

5. Feb 6, 2013

### AlephZero

What jhae said. But if you really want to do this, it would be better to do it the same way that LaTeX sets the default, i.e. override the command
Code (Text):

\DeclareMathAlphabet      {\mathbf}{OT1}{cmr}{bx}{n}


text:
# Rings and ideals parameterized by binary n‐ic forms

@article{Wood2011RingsAI,
title={Rings and ideals parameterized by binary n‐ic forms},
author={Melanie Matchett Wood},
journal={Journal of the London Mathematical Society},
year={2011},
volume={83}
}
• M. Wood
• Published 30 July 2010
• Mathematics
• Journal of the London Mathematical Society
The association of algebraic objects to forms has had many important applications in number theory. Gauss, over two centuries ago, studied composition of binary quadratic forms, which we now understand via Dedekind's association of ideal classes of quadratic rings to integral binary quadratic forms. Delone and Faddeev, in 1940, showed that cubic rings are parameterized by equivalence classes of integral binary cubic forms. Birch, Merriman, Nakagawa, del Corso, Dvornicich, and Simon have all…
A moduli interpretation of untwisted binary cubic forms
• Mathematics
• 2021
We give a moduli interpretation to the quotient of (nondegenerate) binary cubic forms with respect to the natural GL2-action on the variables. In particular, we show that these GL2 orbits are in
Most Integral Odd-Degree Binary Forms Fail to Properly Represent a Square
Let $F \in \mathbb{Z}[x,z]$ be a binary form of degree $2n+1 \geq 5$. A result of Darmon and Granville known as "Faltings plus epsilon" states that when $F$ is separable, the superelliptic equation
Parametrization of ideal classes in rings associated to binary forms
We give a parametrization of the ideal classes of rings associated to integral binary forms by classes of tensors in $\mathbb Z^2\tensor \mathbb Z^n\tensor \mathbb Z^n$. This generalizes Bhargava's
Discriminant Equations in Diophantine Number Theory
• Mathematics
• 2016
Diophantine number theory is an active area that has seen tremendous progress over the past century. An important role in this theory is played by discriminant equations, a class of Diophantine
Parametrizing quartic algebras over an arbitrary base
We parametrize quartic commutative algebras over any base ring or scheme (equivalently finite, flat degree four $S$-schemes), with their cubic resolvents, by pairs of ternary quadratic forms over the
Monogenic fields with odd class number Part II: even degree
In 1801, Gauss proved that there were infinitely many quadratic fields with odd class number. We generalise this result by showing that there are infinitely many Sn-fields of any given even degree
Average $2$-Torsion in Class Groups of Rings Associated to Binary $n$-ic Forms.
Let $n \geq 3$. We prove several theorems concerning the average behavior of the $2$-torsion in class groups of rings defined by integral binary $n$-ic forms having any fixed odd leading coefficient
Monogenic fields with odd class number Part I: odd degree
We bound the average number of $2$-torsion elements in the class group of monogenised fields of odd degree (and compute it precisely conditional on a tail estimate) using an orbit parametrisation of
Hermite equivalence of polynomials
• Mathematics
• 2021
In this paper, we resurrect a long-forgotten notion of equivalence for univariate polynomials with integral coefficients introduced by Hermite in the 1850s. We show that the Hermite equivalence class
Polynomial invariants and moduli of generic two-dimensional commutative algebras
• Mathematics
Linear and Multilinear Algebra
• 2018
ABSTRACT Let V be a two-dimensional vector space over a field of characteristic not 2 or 3. We show there is a surjection ν from the set of ‘generic’ commutative algebra structures on V modulo the

## References

SHOWING 1-10 OF 30 REFERENCES
Moduli Spaces for Rings and Ideals
The association of algebraic objects to forms has had many important applications in number theory. Gauss, over two centuries ago, studied quadratic rings and ideals associated to binary quadratic
Binary forms and orders of algebraic number fields
0.0. The class numbers of binary forms of degree greater than three has been scarcely studied. It seems that the finiteness of class numbers proved by Birch and Merr iman is the only general result.
Higher composition laws III: The parametrization of quartic rings
In the first two articles of this series, we investigated various higher analogues of Gauss composition, and showed how several algebraic objects involving orders in quadratic and cubic fields could
Parametrization of ideal classes in rings associated to binary forms
We give a parametrization of the ideal classes of rings associated to integral binary forms by classes of tensors in $\mathbb Z^2\tensor \mathbb Z^n\tensor \mathbb Z^n$. This generalizes Bhargava's
Finiteness Theorems for Binary Forms with Given Discriminant
• Mathematics, Computer Science
• 1972
It is proved that if Do is a given integer then there are only finitely many GL2(Z)-orbits of binary forms / of given degree n with discriminant D(f) = Do.
Parametrizing quartic algebras over an arbitrary base
We parametrize quartic commutative algebras over any base ring or scheme (equivalently finite, flat degree four $S$-schemes), with their cubic resolvents, by pairs of ternary quadratic forms over the
Decomposition of primes in non-maximal orders
• Mathematics
• 2005
Let R be a Dedekind ring with quotient field K, and let F (x) ∈ R[x] be an irreducible primitive polynomial. Let α be a root of F and L = K(α). If F is monic, then R[α] is a monogenic R-order of L.
Higher composition laws II: On cubic analogues of Gauss composition
In our first article [2] we developed a new view of Gauss composition of binary quadratic forms which led to several new laws of composition on various other spaces of forms. Moreover, we showed that


text:
# Powers of 2014 , 2015 and 2016

Algebra Level 4

If $$x ^ 2 - 3x + 1 = 0$$ has roots $$\alpha, \beta$$, then find the value of the expression below?

$\frac{ \alpha^ {2014} + \beta ^ { 2014 } + \alpha^{2016 } + \beta ^ { 2016 } } { \alpha ^ { 2015 } + \beta ^ { 2015 } }$

×