text:
# Getting started with Julia

Because JuMP is embedded in Julia, knowing some basic Julia is important before you start learning JuMP.

Tip

This tutorial is designed to provide a minimalist crash course in the basics of Julia. You can find resources that provide a more comprehensive introduction to Julia here.

## Installing Julia

Tip

Unless you know otherwise, you probably want the 64-bit version.

Next, you need an IDE to develop in. VS Code is a popular choice, so follow these install instructions.

Julia can also be used with Jupyter notebooks or the reactive notebooks of Pluto.jl.

## The Julia REPL

The main way of interacting with Julia is via its REPL (Read Evaluate Print Loop). To access the REPL, start the Julia executable to arrive at the julia> prompt, and then start coding:

julia> 1 + 12

As your programs become larger, write a script as a text file, and then run that file using:

julia> include("path/to/file.jl")
Warning

Because of Julia's startup latency, running scripts from the command line like the following is slow:

julia> x = 123123julia> println("The value of x is: $(x)")The value of x is: 123 Use triple-quotes for multiline strings: julia> s = """ Here is a multiline string """"Here is\na\nmultiline string\n"julia> println(s)Here is a multiline string ### Symbols Julia Symbols are a data structure from the compiler that represent Julia identifiers (i.e., variable names). julia> println("The value of x is:$(eval(:x))")The value of x is: 123
Warning

We used eval here to demonstrate how Julia links Symbols to variables. However, avoid calling eval in your code. It is usually a sign that your code is doing something that could be more easily achieved a different way. The Community Forum is a good place to ask for advice on alternative approaches.

julia> typeof(:x)Symbol

You can think of a Symbol as a String that takes up less memory, and that can't be modified.

Convert between String and Symbol using their constructors:

julia> String(:abc)"abc"julia> Symbol("abc"):abc
Tip

Symbols are often (ab)used to stand in for a String or an Enum, when one of the latter is likely a better choice. The JuMP Style guide recommends reserving Symbols for identifiers. See @enum vs. Symbol for more.

### Tuples

Julia makes extensive use of a simple data structure called Tuples. Tuples are immutable collections of values. For example:

julia> t = ("hello", 1.2, :foo)("hello", 1.2, :foo)julia> typeof(t)Tuple{String, Float64, Symbol}

Tuples can be accessed by index, similar to arrays:

julia> t[2]1.2

And they can be "unpacked" like so:

julia> a, b, c = t("hello", 1.2, :foo)julia> b1.2

The values can also be given names, which is a convenient way of making light-weight data structures.

julia> t = (word = "hello", num = 1.2, sym = :foo)(word = "hello", num = 1.2, sym = :foo)

Values can be accessed using dot syntax:

julia> t.word"hello"

## Dictionaries

Similar to Python, Julia has native support for dictionaries. Dictionaries provide a very generic way of mapping keys to values. For example, a map of integers to strings:

julia> d1 = Dict(1 => "A", 2 => "B", 4 => "D")Dict{Int64, String} with 3 entries:
4 => "D"
2 => "B"
1 => "A"
Info

Type-stuff again: Dict{Int64,String} is a dictionary with Int64 keys and String values.

Looking up a value uses the bracket syntax:

julia> d1[2]"B"

Dictionaries support non-integer keys and can mix data types:

julia> Dict("A" => 1, "B" => 2.5, "D" => 2 - 3im)Dict{String, Number} with 3 entries:
"B" => 2.5
"A" => 1
"D" => 2-3im
Info

Julia types form a hierarchy. Here the value type of the dictionary is Number, which is a generalization of Int64, Float64, and Complex{Int}. Leaf nodes in this hierarchy are called "concrete" types, and all others are called "Abstract." In general, having variables with abstract types like Number can lead to slower code, so you should try to make sure every element in a dictionary or vector is the same type. For example, in this case we could represent every element as a Complex{Float64}:

julia> Dict("A" => 1.0 + 0.0im, "B" => 2.5 + 0.0im, "D" => 2.0 - 3.0im)Dict{String, ComplexF64} with 3 entries:
"B" => 2.5+0.0im
"A" => 1.0+0.0im
"D" => 2.0-3.0im

Dictionaries can be nested:

julia> d2 = Dict("A" => 1, "B" => 2, "D" => Dict(:foo => 3, :bar => 4))Dict{String, Any} with 3 entries:
"B" => 2
"A" => 1
"D" => Dict(:bar=>4, :foo=>3)julia> d2["B"]2julia> d2["D"][:foo]3

## Structs

You can define custom datastructures with struct:

julia> struct MyStruct
x::Int
y::String
z::Dict{Int,Int}
endjulia> a = MyStruct(1, "a", Dict(2 => 3))Main.MyStruct(1, "a", Dict(2 => 3))julia> a.x1

By default, these are not mutable

julia>     a.x = 2setfield! immutable struct of type MyStruct cannot be changed

However, you can declare a mutable struct which is mutable:

julia> mutable struct MyStructMutable
x::Int
y::String
z::Dict{Int,Int}
endjulia> a = MyStructMutable(1, "a", Dict(2 => 3))Main.MyStructMutable(1, "a", Dict(2 => 3))julia> a.x1julia> a.x = 22julia> aMain.MyStructMutable(2, "a", Dict(2 => 3))

## Loops

Julia has native support for for-each style loops with the syntax for <value> in <collection> end:

julia> for i in 1:5
println(i)
end1
2
3
4
5
Info

Ranges are constructed as start:stop, or start:step:stop.

julia> for i in 1.2:1.1:5.6
println(i)
end1.2
2.3
3.4
4.5
5.6

This for-each loop also works with dictionaries:

julia> for (key, value) in Dict("A" => 1, "B" => 2.5, "D" => 2 - 3im)
println("$(key):$(value)")
endB: 2.5
A: 1
D: 2 - 3im

Note that in contrast to vector languages like Matlab and R, loops do not result in a significant performance degradation in Julia.

## Control flow

Julia control flow is similar to Matlab, using the keywords if-elseif-else-end, and the logical operators || and && for or and and respectively:

julia> for i in 0:5:15
if i < 5
println("$(i) is less than 5") elseif i < 10 println("$(i) is less than 10")
else
if i == 10
println("the value is 10")
else
println("$(i) is bigger than 10") end end end0 is less than 5 5 is less than 10 the value is 10 15 is bigger than 10 ## Comprehensions Similar to languages like Haskell and Python, Julia supports the use of simple loops in the construction of arrays and dictionaries, called comprehensions. A list of increasing integers: julia> [i for i in 1:5]5-element Vector{Int64}: 1 2 3 4 5 Matrices can be built by including multiple indices: julia> [i * j for i in 1:5, j in 5:10]5×6 Matrix{Int64}: 5 6 7 8 9 10 10 12 14 16 18 20 15 18 21 24 27 30 20 24 28 32 36 40 25 30 35 40 45 50 Conditional statements can be used to filter out some values: julia> [i for i in 1:10 if i % 2 == 1]5-element Vector{Int64}: 1 3 5 7 9 A similar syntax can be used for building dictionaries: julia> Dict("$(i)" => i for i in 1:10 if i % 2 == 1)Dict{String, Int64} with 5 entries:
"1" => 1
"5" => 5
"7" => 7
"9" => 9
"3" => 3

## Functions

A simple function is defined as follows:

julia> function print_hello()
return println("hello")
endprint_hello (generic function with 1 method)julia> print_hello()hello

Arguments can be added to a function:

julia> function print_it(x)
return println(x)
endprint_it (generic function with 1 method)julia> print_it("hello")hellojulia> print_it(1.234)1.234julia> print_it(:my_id)my_id

Optional keyword arguments are also possible:

julia> function print_it(x; prefix = "value:")
return println("$(prefix)$(x)")
endprint_it (generic function with 1 method)julia> print_it(1.234)value: 1.234julia> print_it(1.234; prefix = "val:")val: 1.234

The keyword return is used to specify the return values of a function:

julia> function mult(x; y = 2.0)
return x * y
endmult (generic function with 1 method)julia> mult(4.0)8.0julia> mult(4.0; y = 5.0)20.0

### Anonymous functions

The syntax input -> output creates an anonymous function. These are most useful when passed to other functions. For example:

julia> f = x -> x^2#11 (generic function with 1 method)julia> f(2)4julia> map(x -> x^2, 1:4)4-element Vector{Int64}:
1
4
9
16

### Type parameters

We can constrain the inputs to a function using type parameters, which are :: followed by the type of the input we want. For example:

julia> function foo(x::Int)
return x^2
endfoo (generic function with 1 method)julia> function foo(x::Float64)
return exp(x)
endfoo (generic function with 2 methods)julia> function foo(x::Number)
return x + 1
endfoo (generic function with 3 methods)julia> foo(2)4julia> foo(2.0)7.38905609893065julia> foo(1 + 1im)2 + 1im

But what happens if we call foo with something we haven't defined it for?

julia>     foo([1, 2, 3])MethodError: no method matching foo(::Vector{Int64})
Closest candidates are:
foo(!Matched::Int64) at REPL[1]:1
foo(!Matched::Float64) at REPL[2]:1
foo(!Matched::Number) at REPL[3]:1

We get a dreaded MethodError! A MethodError means that you passed a function something that didn't match the type that it was expecting. In this case, the error message says that it doesn't know how to handle an Vector{Int64}, but it does know how to handle Float64, Int64, and Number.

Tip

Read the "Closest candidates" part of the error message carefully to get a hint as to what was expected.

In the example above, we didn't define what to do if f was passed a Vector. Luckily, Julia provides a convenient syntax for mapping f element-wise over arrays! Just add a . between the name of the function and the opening (. This works for any function, including functions with multiple arguments. For example:

julia> f.([1, 2, 3])3-element Vector{Int64}:
1
4
9
Tip

Get a MethodError when calling a function that takes a Vector, Matrix, or Array? Try broadcasting it!

## Mutable vs immutable objects

Some types in Julia are mutable, which means you can change the values inside them. A good example is an array. You can modify the contents of an array without having to make a new array.

In contrast, types like Float64 are immutable. You cannot modify the contents of a Float64.

This is something to be aware of when passing types into functions. For example:

julia> function mutability_example(mutable_type::Vector{Int}, immutable_type::Int)
mutable_type[1] += 1
immutable_type += 1
return
endmutability_example (generic function with 1 method)julia> mutable_type = [1, 2, 3]3-element Vector{Int64}:
1
2
3julia> immutable_type = 11julia> mutability_example(mutable_type, immutable_type)julia> println("mutable_type: $(mutable_type)")mutable_type: [2, 2, 3]julia> println("immutable_type:$(immutable_type)")immutable_type: 1

Because Vector{Int} is a mutable type, modifying the variable inside the function changed the value outside of the function. In contrast, the change to immutable_type didn't modify the value outside the function.

You can check mutability with the isimmutable function:

julia> isimmutable([1, 2, 3])falsejulia> isimmutable(1)true

## The package manager

### Installing packages

No matter how wonderful Julia's base language is, at some point you will want to use an extension package. Some of these are built-in, for example random number generation is available in the Random package in the standard library. These packages are loaded with the commands using and import.

julia> using Random  # The equivalent of Python's from Random import *julia> import Random  # The equivalent of Python's import Randomjulia> Random.seed!(33)MersenneTwister(33)julia> [rand() for i in 1:10]10-element Vector{Float64}:
0.8245577112736127
0.2928364052074266
0.8765793121770682
0.41615145984974955
0.7113242552761618
0.7762718106176869
0.407423649552187
0.15761624576044575
0.8889767003637221
0.017829104289712516

The Package Manager is used to install packages that are not part of Julia's standard library.

For example the following can be used to install JuMP,

using Pkg
Pkg.add("JuMP")

For a complete list of registered Julia packages see the package listing at JuliaHub.

From time to you may wish to use a Julia package that is not registered. In this case a git repository URL can be used to install the package.

using Pkg
Pkg.add("https://github.com/user-name/MyPackage.jl.git")

### Package environments

By default, Pkg.add will add packages to Julia's global environment. However, Julia also has built-in support for virtual environments.

Activate a virtual environment with:

import Pkg; Pkg.activate("/path/to/environment")

You can see what packages are installed in the current environment with Pkg.status().

Tip

We strongly recommend you create a Pkg environment for each project that you create in Julia, and add only the packages that you need, instead of adding lots of packages to the global environment. The Pkg manager documentation has more information on this topic.

Tip


text:
# American Institute of Mathematical Sciences

• Previous Article
A meshless collocation method with a global refinement strategy for reaction-diffusion systems on evolving domains
• DCDS-B Home
• This Issue
• Next Article
Stabilization by intermittent control for hybrid stochastic differential delay equations
January  2022, 27(1): 583-600. doi: 10.3934/dcdsb.2021056

## Asymptotics of singularly perturbed damped wave equations with super-cubic exponent

 Center for Mathematical Sciences, School of Mathematics and Statistics, Huazhong University of Science and Technology, Wuhan, Hubei 430074, China

Received  August 2020 Published  January 2022 Early access  February 2021

This work is devoted to studying the relations between the asymptotic behavior for a class of hyperbolic equations with super-cubic nonlinearity and a class of heat equations, where the problem is considered in a smooth bounded three dimensional domain. Based on the extension of the Strichartz estimates to the case of bounded domain, we show the regularity of the pullback, uniform, and cocycle attractors for the non-autonomous dynamical system given by hyperbolic equation. Then we prove that all types of non-autonomous attractors converge, upper semicontiously, to the natural extension global attractor of the limit parabolic equations.

Citation: Dandan Li. Asymptotics of singularly perturbed damped wave equations with super-cubic exponent. Discrete and Continuous Dynamical Systems - B, 2022, 27 (1) : 583-600. doi: 10.3934/dcdsb.2021056
##### References:
 [1] J. Arrieta, A. N. Carvalho and J. K. Hale, A damped hyerbolic equation with critical exponent, Communications in Partial Differential Equations, 17 (1992), 841-866.  doi: 10.1080/03605309208820866. [2] A. V. Babin and M. I. Vishik, Regular attractors of semi-groups and evolution equations, J. Math. Pures Appl, 62 (1983), 441-491. [3] A. V. Babin, M. I. Vishik, Attractors of Evolution Equations, Studies in Mathematics and Its Applications, 25. North-Holland Publishing Co., Amsterdam, 1992. [4] J. M. Ball, On the asymptotic behavior of generalized processes, with applications to nonlinear evolution equations, Journal of Differential Equations, 27 (1978), 224-265.  doi: 10.1016/0022-0396(78)90032-3. [5] M. D. Blair, H. F. Smith and C. D. Sogge, Strichartz estimates for the wave equation on manifolds with boundary, Annales de l'Institut Henri Poincare (C) Non Linéaire, 26 (2009), 1817-1829.  doi: 10.1016/j.anihpc.2008.12.004. [6] M. C. Bortolan, A. N. Carvalho and J. A. Langa, Structure of attractors for skew product semiflows, Journal of Differential Equations, 257 (2014), 490-522.  doi: 10.1016/j.jde.2014.04.008. [7] N. Burq, G. Lebeau and F. Planchon, Global existence for energy critical waves in 3-D domains, Journal of the American Mathematical Society, 21 (2008), 831-845.  doi: 10.1090/S0894-0347-08-00596-1. [8] A. N. Carvalho, J. A. Langa, J. C. Robinson, Attractors for Infinite-Dimensional Non-Autonomous Dynamical Systems, Springer, 2013. doi: 10.1007/978-1-4614-4581-4. [9] A. N. Carvalho, J. W. Cholewa and T. Dlotko, Damped wave equations with fast growing dissipative nonlinearities, Discrete and Continuous Dynamical Systems-A, 24 (2009), 1147-1165.  doi: 10.3934/dcds.2009.24.1147. [10] C. I. Christov, P. M. Jordan, Heat conduction paradox involving second-sound propagation in moving media, Physical Review Letters, 94 (2005), 154301. doi: 10.1103/PhysRevLett.94.154301. [11] V. V. Chepyzhov, M. I. Vishik, Attractors for Equations of Mathematical Physics, American Mathematical Soc., 2002. [12] L. C. Evans, Partial Differential Equations, Second edition. Graduate Studies in Mathematics, 19. American Mathematical Society, Providence, RI, 2010. doi: 10.1090/gsm/019. [13] P. Fabrie, C. Galusinski, A. Miranville and S. Zelik, Uniform exponential attractors for a singularly perturbed damped wave equation, Discrete and Continuous Dynamical Systems, 10 (2004), 211-238.  doi: 10.3934/dcds.2004.10.211. [14] M. M. Freitas, P. Kalita and J. A. Langa, Continuity of non-autonomous attractors for hyperbolic perturbation of parabolic equations, Journal of Differential Equations, 264 (2018), 1886-1945.  doi: 10.1016/j.jde.2017.10.007. [15] T. Gallay and G. Raugel, Scaling variables and asymptotic expansions in damped wave equations, J. Differential Equations, 150 (1998), 42-97.  doi: 10.1006/jdeq.1998.3459. [16] J. K. Hale, Asymptotic Behavior of Dissipative Systems, American Mathematical Society, Providence, RI, 1988. doi: 10.1090/surv/025. [17] J. K. Hale and G. Raugel, Upper semicontinuity of the attractor for a singularly perturbed hyperbolic equation, Journal of Differential Equations, 73 (1988), 197-214.  doi: 10.1016/0022-0396(88)90104-0. [18] A. Haraux, Two remarks on hyperbolic dissipative problems, Nonlinear Partial Differential Equations and their Applications. College de France seminar, 7 198), 1983–1984. [19] L. T. Hoang, E. J. Olson and J. C. Robinson, Continuity of pullback and uniform attractors, Journal of Differential Equations, 264 (2018), 4067-4093.  doi: 10.1016/j.jde.2017.12.002. [20] V. Kalantarov, A. Savostianov and S. Zelik, Attractors for damped quintic wave equations in bounded domains, Annales Henri Poincaré, 17 (2016), 2555-2584.  doi: 10.1007/s00023-016-0480-y. [21] S. Konabe and T. Nikuni, Coarse-grained finite-temperature theory for the bose condensate in optical lattices, Journal of Low Temperature Physics, 150 (2008), 12-46.  doi: 10.1007/s10909-007-9517-4. [22] A. C. Lazer and P. J. McKenna, Large-amplitude periodic oscillations in suspension bridges: some new connections with nonlinear analysis, SIAM Rev., 32 (1990), 537-578.  doi: 10.1137/1032120. [23] D. Li, Q. Chang, C. Sun, Pullback attractors for a critical degenerate wave equation with time-dependent damping, To appear. [24] Y. Lv and W. Wang, Limiting dynamics for stochastic wave equations, Journal of Differential Equations, 244 (2008), 1-23.  doi: 10.1016/j.jde.2007.10.009. [25] C. Matheus, M. C. Bortolan, A. N. Carvalho, J. A. Langa, Attractors Under Autonomous and Non-autonomous Perturbations, American Mathematical Society, 2020. [26] A. Miranville, V. Pata and S. Zelik, Exponential attractors for singularly perturbed damped wave equations: A simple construction., Asymptotic Analysis, 53 (2007), 1-12. [27] J. C. Robinson, Infinite-Dimensional Dynamical Systems: An Introduction to Dissipative Parabolic PDEs and the Theory of Global Attractors, Cambridge University Press, 2001.  doi: 10.1007/978-94-010-0732-0. [28] G. Somieski, Shimmy analysis of a simple aircraft nose landing gear model using different mathematical methods, Aerospace Science and Technology, 1 (1997), 545-555.  doi: 10.1016/S1270-9638(97)90003-1. [29] Y. Wang and C. Zhong, Upper semicontinuity of global attractors for damped wave equations, Asymptotic Analysis, 91 (2015), 1-10.  doi: 10.3233/ASY-141253. [30] S. Zelik, Asymptotic regularity of solutions of a nonautonomous damped wave equation with a critical growth exponent, Communications on Pure and Applied Analysis, 3 (2004), 921-934.  doi: 10.3934/cpaa.2004.3.921. [31] S. Zelik, Asymptotic regularity of solutions of singularly perturbed damped wave equations with supercritical nonlinearities, Discrete and Continuous Dynamical Systems, 11 (2004), 351-392.  doi: 10.3934/dcds.2004.11.351.

show all references

##### References:
 [1] J. Arrieta, A. N. Carvalho and J. K. Hale, A damped hyerbolic equation with critical exponent, Communications in Partial Differential Equations, 17 (1992), 841-866.  doi: 10.1080/03605309208820866. [2] A. V. Babin and M. I. Vishik, Regular attractors of semi-groups and evolution equations, J. Math. Pures Appl, 62 (1983), 441-491. [3] A. V. Babin, M. I. Vishik, Attractors of Evolution Equations, Studies in Mathematics and Its Applications, 25. North-Holland Publishing Co., Amsterdam, 1992. [4] J. M. Ball, On the asymptotic behavior of generalized processes, with applications to nonlinear evolution equations, Journal of Differential Equations, 27 (1978), 224-265.  doi: 10.1016/0022-0396(78)90032-3. [5] M. D. Blair, H. F. Smith and C. D. Sogge, Strichartz estimates for the wave equation on manifolds with boundary, Annales de l'Institut Henri Poincare (C) Non Linéaire, 26 (2009), 1817-1829.  doi: 10.1016/j.anihpc.2008.12.004. [6] M. C. Bortolan, A. N. Carvalho and J. A. Langa, Structure of attractors for skew product semiflows, Journal of Differential Equations, 257 (2014), 490-522.  doi: 10.1016/j.jde.2014.04.008. [7] N. Burq, G. Lebeau and F. Planchon, Global existence for energy critical waves in 3-D domains, Journal of the American Mathematical Society, 21 (2008), 831-845.  doi: 10.1090/S0894-0347-08-00596-1. [8] A. N. Carvalho, J. A. Langa, J. C. Robinson, Attractors for Infinite-Dimensional Non-Autonomous Dynamical Systems, Springer, 2013. doi: 10.1007/978-1-4614-4581-4. [9] A. N. Carvalho, J. W. Cholewa and T. Dlotko, Damped wave equations with fast growing dissipative nonlinearities, Discrete and Continuous Dynamical Systems-A, 24 (2009), 1147-1165.  doi: 10.3934/dcds.2009.24.1147. [10] C. I. Christov, P. M. Jordan, Heat conduction paradox involving second-sound propagation in moving media, Physical Review Letters, 94 (2005), 154301. doi: 10.1103/PhysRevLett.94.154301. [11] V. V. Chepyzhov, M. I. Vishik, Attractors for Equations of Mathematical Physics, American Mathematical Soc., 2002. [12] L. C. Evans, Partial Differential Equations, Second edition. Graduate Studies in Mathematics, 19. American Mathematical Society, Providence, RI, 2010. doi: 10.1090/gsm/019. [13] P. Fabrie, C. Galusinski, A. Miranville and S. Zelik, Uniform exponential attractors for a singularly perturbed damped wave equation, Discrete and Continuous Dynamical Systems, 10 (2004), 211-238.  doi: 10.3934/dcds.2004.10.211. [14] M. M. Freitas, P. Kalita and J. A. Langa, Continuity of non-autonomous attractors for hyperbolic perturbation of parabolic equations, Journal of Differential Equations, 264 (2018), 1886-1945.  doi: 10.1016/j.jde.2017.10.007. [15] T. Gallay and G. Raugel, Scaling variables and asymptotic expansions in damped wave equations, J. Differential Equations, 150 (1998), 42-97.  doi: 10.1006/jdeq.1998.3459. [16] J. K. Hale, Asymptotic Behavior of Dissipative Systems, American Mathematical Society, Providence, RI, 1988. doi: 10.1090/surv/025. [17] J. K. Hale and G. Raugel, Upper semicontinuity of the attractor for a singularly perturbed hyperbolic equation, Journal of Differential Equations, 73 (1988), 197-214.  doi: 10.1016/0022-0396(88)90104-0. [18] A. Haraux, Two remarks on hyperbolic dissipative problems, Nonlinear Partial Differential Equations and their Applications. College de France seminar, 7 198), 1983–1984. [19] L. T. Hoang, E. J. Olson and J. C. Robinson, Continuity of pullback and uniform attractors, Journal of Differential Equations, 264 (2018), 4067-4093.  doi: 10.1016/j.jde.2017.12.002. [20] V. Kalantarov, A. Savostianov and S. Zelik, Attractors for damped quintic wave equations in bounded domains, Annales Henri Poincaré, 17 (2016), 2555-2584.  doi: 10.1007/s00023-016-0480-y. [21] S. Konabe and T. Nikuni, Coarse-grained finite-temperature theory for the bose condensate in optical lattices, Journal of Low Temperature Physics, 150 (2008), 12-46.  doi: 10.1007/s10909-007-9517-4. [22] A. C. Lazer and P. J. McKenna, Large-amplitude periodic oscillations in suspension bridges: some new connections with nonlinear analysis, SIAM Rev., 32 (1990), 537-578.  doi: 10.1137/1032120. [23] D. Li, Q. Chang, C. Sun, Pullback attractors for a critical degenerate wave equation with time-dependent damping, To appear. [24] Y. Lv and W. Wang, Limiting dynamics for stochastic wave equations, Journal of Differential Equations, 244 (2008), 1-23.  doi: 10.1016/j.jde.2007.10.009. [25] C. Matheus, M. C. Bortolan, A. N. Carvalho, J. A. Langa, Attractors Under Autonomous and Non-autonomous Perturbations, American Mathematical Society, 2020. [26] A. Miranville, V. Pata and S. Zelik, Exponential attractors for singularly perturbed damped wave equations: A simple construction., Asymptotic Analysis, 53 (2007), 1-12. [27] J. C. Robinson, Infinite-Dimensional Dynamical Systems: An Introduction to Dissipative Parabolic PDEs and the Theory of Global Attractors, Cambridge University Press, 2001.  doi: 10.1007/978-94-010-0732-0. [28] G. Somieski, Shimmy analysis of a simple aircraft nose landing gear model using different mathematical methods, Aerospace Science and Technology, 1 (1997), 545-555.  doi: 10.1016/S1270-9638(97)90003-1. [29] Y. Wang and C. Zhong, Upper semicontinuity of global attractors for damped wave equations, Asymptotic Analysis, 91 (2015), 1-10.  doi: 10.3233/ASY-141253. [30] S. Zelik, Asymptotic regularity of solutions of a nonautonomous damped wave equation with a critical growth exponent, Communications on Pure and Applied Analysis, 3 (2004), 921-934.  doi: 10.3934/cpaa.2004.3.921. [31] S. Zelik, Asymptotic regularity of solutions of singularly perturbed damped wave equations with supercritical nonlinearities, Discrete and Continuous Dynamical Systems, 11 (2004), 351-392.  doi: 10.3934/dcds.2004.11.351.
 [1] Na Lei, Shengfan Zhou. Upper semicontinuity of pullback attractors for non-autonomous lattice systems under singular perturbations. Discrete and Continuous Dynamical Systems, 2022, 42 (1) : 73-108. doi: 10.3934/dcds.2021108 [2] Zhijian Yang, Yanan Li. Upper semicontinuity of pullback attractors for non-autonomous Kirchhoff wave equations. Discrete and Continuous Dynamical Systems - B, 2019, 24 (9) : 4899-4912. doi: 10.3934/dcdsb.2019036 [3] Ling Xu, Jianhua Huang, Qiaozhen Ma. Upper semicontinuity of random attractors for the stochastic non-autonomous suspension bridge equation with memory. Discrete and Continuous Dynamical Systems - B, 2019, 24 (11) : 5959-5979. doi: 10.3934/dcdsb.2019115 [4] Zhaojuan Wang, Shengfan Zhou. Existence and upper semicontinuity of random attractors for non-autonomous stochastic strongly damped wave equation with multiplicative noise. Discrete and Continuous Dynamical Systems, 2017, 37 (5) : 2787-2812. doi: 10.3934/dcds.2017120 [5] Zhaojuan Wang, Shengfan Zhou. Existence and upper semicontinuity of attractors for non-autonomous stochastic lattice systems with random coupled coefficients. Communications on Pure and Applied Analysis, 2016, 15 (6) : 2221-2245. doi: 10.3934/cpaa.2016035 [6] Shengfan Zhou, Caidi Zhao, Yejuan Wang. Finite dimensionality and upper semicontinuity of compact kernel sections of non-autonomous lattice systems. Discrete and Continuous Dynamical Systems, 2008, 21 (4) : 1259-1277. doi: 10.3934/dcds.2008.21.1259 [7] Ting Li. Pullback attractors for asymptotically upper semicompact non-autonomous multi-valued semiflows. Communications on Pure and Applied Analysis, 2007, 6 (1) : 279-285. doi: 10.3934/cpaa.2007.6.279 [8] Pengyu Chen, Xuping Zhang. Upper semi-continuity of attractors for non-autonomous fractional stochastic parabolic equations with delay. Discrete and Continuous Dynamical Systems - B, 2021, 26 (8) : 4325-4357. doi: 10.3934/dcdsb.2020290 [9] Xin-Guang Yang, Marcelo J. D. Nascimento, Maurício L. Pelicer. Uniform attractors for non-autonomous plate equations with $p$-Laplacian perturbation and critical nonlinearities. Discrete and Continuous Dynamical Systems, 2020, 40 (3) : 1937-1961. doi: 10.3934/dcds.2020100 [10] Felipe Rivero. Time dependent perturbation in a non-autonomous non-classical parabolic equation. Discrete and Continuous Dynamical Systems - B, 2013, 18 (1) : 209-221. doi: 10.3934/dcdsb.2013.18.209 [11] Shan Ma, Chengkui Zhong. The attractors for weakly damped non-autonomous hyperbolic equations with a new class of external forces. Discrete and Continuous Dynamical Systems, 2007, 18 (1) : 53-70. doi: 10.3934/dcds.2007.18.53 [12] Ionuţ Munteanu. Design of boundary stabilizers for the non-autonomous cubic semilinear heat equation driven by a multiplicative noise. Evolution Equations and Control Theory, 2020, 9 (3) : 795-816. doi: 10.3934/eect.2020034 [13] Xue-Li Song, Yan-Ren Hou. Pullback $\mathcal{D}$-attractors for the non-autonomous Newton-Boussinesq equation in two-dimensional bounded domain. Discrete and Continuous Dynamical Systems, 2012, 32 (3) : 991-1009. doi: 10.3934/dcds.2012.32.991 [14] Yanan Li, Zhijian Yang, Fang Da. Robust attractors for a perturbed non-autonomous extensible beam equation with nonlinear nonlocal damping. Discrete and Continuous Dynamical Systems, 2019, 39 (10) : 5975-6000. doi: 10.3934/dcds.2019261 [15] Suping Wang, Qiaozhen Ma. Existence of pullback attractors for the non-autonomous suspension bridge equation with time delay. Discrete and Continuous Dynamical Systems - B, 2020, 25 (4) : 1299-1316. doi: 10.3934/dcdsb.2019221 [16] Bo You, Yanren Hou, Fang Li, Jinping Jiang. Pullback attractors for the non-autonomous quasi-linear complex Ginzburg-Landau equation with $p$-Laplacian. Discrete and Continuous Dynamical Systems - B, 2014, 19 (6) : 1801-1814. doi: 10.3934/dcdsb.2014.19.1801 [17] Zhaojuan Wang, Shengfan Zhou. Random attractor and random exponential attractor for stochastic non-autonomous damped cubic wave equation with linear multiplicative white noise. Discrete and Continuous Dynamical Systems, 2018, 38 (9) : 4767-4817. doi: 10.3934/dcds.2018210 [18] Yonghai Wang. On the upper semicontinuity of pullback attractors with applications to plate equations. Communications on Pure and Applied Analysis, 2010, 9 (6) : 1653-1673. doi: 10.3934/cpaa.2010.9.1653 [19] Linfang Liu, Xianlong Fu. Existence and upper semicontinuity of (L2, Lq) pullback attractors for a stochastic p-laplacian equation. Communications on Pure and Applied Analysis, 2017, 6 (2) : 443-474. doi: 10.3934/cpaa.2017023 [20] Alfonso Castro, Shu-Zhi Song. Infinitely many radial solutions for a super-cubic Kirchhoff type problem in a ball. Discrete and Continuous Dynamical Systems - S, 2020, 13 (12) : 3347-3355. doi: 10.3934/dcdss.2020127

2021 Impact Factor: 1.497

format: plain


text:
# Why do different gases have the same average kinetic energy at the same temperature?

Before moving on to the question, let me clarify what I mean by the terms "total translational kinetic energy" and "average kinetic energy of a molecule". The total translational kinetic energy $$K$$ of all the molecules of the gas is

$$K=\sum\frac 1 2 mv^2=\frac 1 2 mN\frac{\sum v^2}{N}=\frac 1 2 Mv^2_\mathrm{rms}$$

where $$m$$ is the mass of a single molecule, $$v$$ is its velocity, $$N$$ is the total number of molecules in the container, $$M$$ is the total mass of the gas sample, and $$v_\mathrm{rms}$$ is the root-mean-square (RMS) speed.

The average kinetic energy of a molecule is

$$K/N=\frac 1 2 \frac M N v^2_\mathrm{rms}=\frac 1 2 mv^2_\mathrm{rms}$$

where the symbols have the same meaning as of the previous case.

It is said that, at a particular temperature, different gases have the same average kinetic energy.
Mathematically,

$$\frac 1 2 m_1v_1^2=\frac 1 2 m_2v_2^2$$

where $$m_1$$, $$m_2$$ are the masses and $$v_1$$, $$v_2$$ are the rms speeds of the two gases respectively.

As we discussed at the beginning of the question the average kinetic energy of a single molecule is much different from the total translational kinetic energy of all the molecules of the gas. I don't understand why the average kinetic energy of a single molecule must be the same for all gases at the same temperature instead of the total kinetic energy of all the molecules.

I understood that the absolute temperature $$T$$ of a given gas is proportional to the square of the RMS speed $$v_\mathrm{rms}$$ of its molecules as per the following equation:

$$T=\left(\frac{273.16~\mathrm K}{v^2_\mathrm{tr}}\right)v^2_\mathrm{rms}$$

where $$v^2_\mathrm{tr}$$ is the RMS speed of the molecules at $$273.16~\mathrm K$$ (triple point of water). Further, both the total translational kinetic energy and the average kinetic energy of a molecule are proportional to the square of the RMS speed. Due to this similarity, I'm unable to see which factor is responsible for the same average kinetic energy instead of the same total kinetic energy at the same temperature for two different gases.

So, why do different gases have the same average kinetic energy at the same temperature instead of the same total kinetic energy?

While searching this site for this doubt, I came across these questions - Temperature and kinetic energy of molecules, Does the same temperature imply the same translational kinetic energy?, If two gasses are in thermal equilbrium, do their molecules have same amount of Kinetic energy?, and Intuitive explanation why rate of energy transfer depends on difference in energy between two materials?. But I didn't find any distinction between the two types of kinetic energy discussed in the question and hence the reason for the choice of average kinetic energy over the total translational kinetic energy.

Initial part of the question is based on the chapter "Kinetic Theory of Gases" from the book "Concepts of Physics" by Dr. H.C.Verma.

• Please not that they do have to have from thermodynamics the same average kinetic energy in an ideal gas, but their average velocity will be different, for different mass molecules. – anna v Apr 1 '20 at 12:30
• Did you ever find a satisfactory answer to this? – Buraian Oct 6 '20 at 9:39
• @Buraian: Unfortunately, no. That was why I haven't accepted any of the answers. The already existing answers might solve the problem as they have positive scores. If that's the case, I just need to read them again carefully and accept the best one. – Guru Vishnu Oct 6 '20 at 10:00
• I thought of your question a bit, and I concluded that even if average if s equal then it need not be that the total is equal. The average of $2$ and $8$ is 5 but so is the average of $0$ and $10$. The relation only holds for molecular level – Buraian Oct 6 '20 at 10:08
• But, why it holds at a molecular level, I don't know.. I think you should edit your question to explicitly state that you are confused about the molecular picture. I think what I said now resolves the confusion between why molecular is taken over bulk picture – Buraian Oct 6 '20 at 10:09

The thermoynamic equilibrium in a gas (here a monoatomic perfect gas as you consider only translation and ignore interactions) , as long as the temperature is fixed, is characterized by the Boltzmann distribution of velocities, stating that the density of probability in the space of velocities is proportional to $$\exp(-E/k_BT)$$ (where $$k_B$$ is the Boltzmann constant), and here $$E$$ is simply the translational kinetic energy $$E=\frac12 m \vec{v}^2$$. An important consequence is the so called "equipartition of energy" :

$$\langle E\rangle \equiv \frac12 m \langle \vec{v}^2\rangle \equiv \frac12 m v_{rms}^2 = \frac32 k_B T.$$

where the 3 comes from the 3 directions of the space.

This holds independently of the mass $$m$$ of the gas constituants, and is still true for a diluted diatomic gas like in air. Hence, one has actually:

$$\frac12 m_1 v_{rms,1}^2 = \frac12 m_2 v_{rms,2}^2=\frac32 k_B T,$$

and the relation for the temperature that you give is the "thermodynamic definition of temperature". It is also the fundamental principle of the "gas themometer" used by metrologist for low temperature measurements.

Furthermore, for a perfect gas, and for a given pression and temperature, the number $$N$$ of molecules depends only on the volume $$V$$ and not on the molecular weight, and the total translational kinetic energy for this volume is the same for any gas.

Nevertheless, this does not imply that the total kinetic energy is the same, as for poly atomic gas, you have to consider not only the motion of the barycenter (as we have done above) but also the kinetic energy associated to the relative motion of the atoms in the molecules, making the laws more complex.

The molecules in a gas are in constant collision. Conservation of energy means that this will randomise the distribution about the mean energy level, which must therefore be the same for both gases. If this is not sufficient argument, the zeroth law of thermodynamics will ensure that the gases are in thermal equilibrium.

What you describe is the difference between temperature and heat. If you declare that two gases have the same total kinetic energy, this implies that they have the same heat. The mass of the molecule is related to the heat capacity (for ideal gases).

Edit/answer to comment: this is mainly a mistranslation/everyday use of the word heat in my mothertongue, which probably doesn't work in english. More precisely, the total kinetic energy equals the total heat the gas could theoretically transfer to a 0K object with infinit heat capacity, assuming no phase transitions or volume change. I think this is helpfull nevertheless.

• It sounds like you are using an unconventional definition of heat. What is your definition? – garyp Apr 1 '20 at 11:39
• In this context heat is a non scientific term as it could be translated in various thermodynamics potentials, including intenal energy I or enthalpy H, or their free variants (when temperature is constant) F an G. In any case the heat is not really defined by the state, but only for a given transformation. – Jhor Apr 1 '20 at 13:28

It would not make sense to say that the total energy has to be the same for different gases. If that were true, I could say that the total energy of 1 kg of air should be the same as the total energy of, say, 5000 kg of water vapour, which is of course absurd. Total energy is an extensive quantity: it depends on the system size. Average energy, on the other hand, is an intensive quantity, so it makes sense to compare it between systems of different size.


text:
mscroggs.co.uk
mscroggs.co.uk

subscribe

# Puzzles

## Archive

Show me a Random Puzzle
▼ show ▼

## Elastic Numbers

Throughout this puzzle, expressions like $$AB$$ will represent the digits of a number, not $$A$$ multiplied by $$B$$.
A two-digit number $$AB$$ is called elastic if:
1. $$A$$ and $$B$$ are both non-zero.
2. The numbers $$A0B$$, $$A00B$$, $$A000B$$, ... are all divisible by $$AB$$.
There are three elastic numbers. Can you find them?

## 16 December

Put the digits 1 to 9 (using each digit exactly once) in the boxes so that the sums are correct. The sums should be read left to right and top to bottom ignoring the usual order of operations. For example, 4+3×2 is 14, not 10. Today's number is the largest number than can be made from the digits in red boxes.
 × × = 6 × × × × × = 180 × × × × × = 336 =32 =70 =162

## 14 December

In July, I posted the Combining Multiples puzzle.
Today's number is the largest number that cannot be written in the form $$27a+17b$$, where $$a$$ and $$b$$ are positive integers (or 0).

## 8 December

Today's number is the second smallest number that can be written as a×b×c×d×e×f×g×h×i, where a,b,...,i are all integers greater than 1.

## 5 December

Today's number is the number of ways that 35 can be written as the sum of distinct numbers, with none of the numbers in the sum being divisible by 9.
Clarification: By "numbers", I mean (strictly) positive integers. The sum of the same numbers in a different order is counted as the same sum: eg. 1+34 and 34+1 are not different sums. The trivial sum consisting of just the number 35 counts as a sum.

## Largest Odd Factors

Pick a number. Call it $$n$$. Write down all the numbers from $$n+1$$ to $$2n$$ (inclusive). For example, if you picked 7, you would write:
$$8,9,10,11,12,13,14$$
Below each number, write down its largest odd factor. Add these factors up. What is the result? Why?

## Combining Multiples

In each of these questions, positive integers should be taken to include 0.
1. What is the largest number that cannot be written in the form $$3a+5b$$, where $$a$$ and $$b$$ are positive integers?
2. What is the largest number that cannot be written in the form $$3a+7b$$, where $$a$$ and $$b$$ are positive integers?
3. What is the largest number that cannot be written in the form $$10a+11b$$, where $$a$$ and $$b$$ are positive integers?
4. Given $$n$$ and $$m$$, what is the largest number that cannot be written in the form $$na+mb$$, where $$a$$ and $$b$$ are positive integers?

## Subsum

1) In a set of three integers, will there always be two integers whose sum is even?
2) How many integers must there be in a set so that there will always be three integers in the set whose sum is a multiple of 3?
3) How many integers must there be in a set so that there will always be four integers in the set whose sum is even?
4) How many integers must there be in a set so that there will always be three integers in the set whose sum is even?


text:
# Tag Info

## Hot answers tagged projections

18

Assuming a perspective projection and a view point external to the sphere, then the 'boundary' formed by the view point and the circle on the sphere which forms the horizon WRT the view point, will be a cone. Doing a perspective projection (onto a plane) is then equivalent to intersecting this cone with the plane which thus produces a conic section. FYI ...

15

I'd consider just going with 3D noise and evaluating it on the surface of the sphere. For gradient noise which is naturally in the domain of the surface of the sphere, you need a regular pattern of sample points on the surface that have natural connectivity information, with roughly equal area in each cell, so you can interpolate or sum adjacent values. I ...

14

This is more like a long comment to @SimonF's answer that I'm trying to make somewhat self contained. All cuts of cone are possible, hyperbola, parabola and ovals. This is easy to test by drawing images in a 3D engine by a extremely wide angle camera. Rotate the camera to say in 30 degree angle so the object is not in the middle of your focus. Then ...

13

Projection systems are used to convert a 3D shape to a planar (2D) shape. According to the type of projection system, different results and shapes like rectangles, pies, ellipses, circles, ... can be produced out of a sphere. Projection systems can be classified by the characteristics of the result they generate. To continue, I would like to use a very ...

12

If you are doing a perspective image and your model has implicit intersections then, if you use "linear Z", those intersections will appear in the wrong places. For example, consider a simple ground plane with a line of telephone poles, receding into the distance, which pierce the ground (and continue below). The implicit intersections will be determined ...

11

SimonF's reasoning basically convinced me, but I decided to do a sanity check. I loaded up a UE4 level that happens to have some spheres, like this one: I set the camera FOV up to 160 degrees to give lots of perspective distortion, and positioned it so the sphere was near the corner of the image: Then I took this into Inkscape and used the ellipse tool to ...

10

Because $x_{proj}$ doesn't vary from $0 \to width$, it varies from $-\tfrac{width}{2} \to \tfrac{width}{2}$. What's important is not the width, but the minimum and maximum values of $x_{proj}$. Because $(0, 0)$ is in the centre of the viewport, not the corner, the min and max values are plus and minus half of the width. BTW, the Red Book is not a great ...

8

Orthographic projections are parallel projections. Each line that is originally parallel will be parallel after this transformation. The orthographic projection can be represented by a affine transformation. In contrast a perspective projection is not a parallel projection and originally parallel lines will no longer be parallel after this operation. Thus ...

7

The near and far planes of a viewing frustum aren't needed for simple 3D→2D projection. What the near and far planes actually do, in a typical rasterizer setup, is define the range of values for the depth buffer. Depths in the [near, far] range will be mapped into [0, 1] to be stored in the depth buffer. However, the depths aren't simply linearly rescaled. ...

6

It's not 100% clear what the author means here, but I'll choose to interpret "screen coordinates" as "pixel coordinates". These would be related to the projected points by a 2D coordinate transformation. You're correct that projection is done by dividing each component of a point by its $z$ component. (That's not quite true—actually, we usually use ...

6

Using Z/W for the depth buffer goes deeper than just clipping against the near and far planes. As Simon alluded to, this has to do with interpolation between the vertices of a triangle, during rasterization. Z/W is the unique option that allows NDC depth values to be correctly calculated for points in the interior of the triangle, by simply linearly ...

5

Assuming your optimal viewing angle is parallel to the surface of the display and the pyramid is made from faces that are 45 degrees to its virtual (non-existant) base, it's actually just a simple non-transformed image (besides the reflection). 1:1 projection. No transformations. No scaling.

5

The ratio is with a quick and dirty visual measurement $665:501$ which is approximately $5:4$. You can measure it by taking the ratio of the vanishing angles $\alpha/\beta$ (see picture 1) because we are so close to the center. Image 1: Ratio of the inbound angles We can check the situation visually by drawing a 2 point perspective grid. For this we need ...

5

Let me try to make my comment into a complete answer. The general idea is to build a linear system using those 6 point pairs and solve for the desired 12 unknowns. You may find this paper[1] useful if you want to learn the theoretical background, and you can find some more details in my blog post[2]. Here is my solution using Mathematica. In the first ...

5

Yes, you can use an off-axis projection matrix. This is what I use in my code (note: I shift the centre upwards, not left as you do in your example.) void camera_setAspectRatio(float aspect, float zNear, float zFar, bool offaxis) { // create a projection matrix const float f = 1.0f / tanf(fovy_radians/2.0f); fovx_radians = 2.0f * ...

5

It might help to think of it this way: Both the near plane and the far plane are the size that will fit onto the screen you are viewing on. The further away something is, the bigger it can be and still fit on the screen. Close up, a playing card can fill the whole screen, but in the distance, an entire building can fit on the screen. Consider the example ...

4

Perspective projection changes the size of an object as it's distance changes, while orthographic projection does not. That is part of the definition of those projection types. To simplify things a bit, a simple perspective projection of a 3d point to a 2d point can be calculated like this: $x_{2d} = x/z\\ y_{2d} = y/z$ As you can see, the 2d version of ...

4

In this case, the geometry of similar triangles ABC and ADE is used to determine the height of D via the solution of DE. It is obvious that if the near plane is at 0 (AE=0), then a division by 0 occurs -- hence, why the near plane cannot be located at position 0. This is not why the nearZ plane cannot be zero. The goal of perspective math is not to project ...

4

After a quick google of 'Inverted perspective' I found out that you have five different names for it; Reverse perspective, inverse perspective, inverted perspective, divergent perspective and Byzantine perspective. https://en.wikipedia.org/wiki/Reverse_perspective I think that if you want to use it in a render engine using a projection matrix, in the ...

3

I don't think you can simply use TransformVector when the matrix you're transforming by involves a projection matrix. To fully project to screen space, you have to divide by W, which TransformVector doesn't do (it simply multiplies by the matrix without translation). Also, because of the divide by W, transforming vectors (as opposed to points) by a ...

3

I would not recommend to correlate the extrusion direction with its screen projection because of the asymptotic behaviour in case the axis points toward the screen or the resulting extrusion crosses the focal point of the camera. One consistent way of doing it would be computing the extrusion height independently of the axis direction: Find a virtual ...

3

The curve you are seeking is just the intersection of a plane (the back of the camera) and a right circular cone. This is not really a question about the earth, or views of planets from space; it's just plain simple 3D coordinate geometry. To find a reference, I'd recommend searching for "intersection of a plane and a cone" or "plane section of a cone", or "...

3

For the lightning, I recommend using a midpoint displacement algorithm. You start with a line segment between any 2 points A and B (this works in either 2D or 3D). Calculate the midpoint of the segment AB. Now move that point a random amount in the direction perpendicular to the line segment AB and call it point C. Replace the original segment AB with 2 line ...

3

It is bigger because it fills the same view and it ts further away. It would be smaller if it wouldn't fill the same view but then it wouldn't fill the camera view and it wouldnt work. So the inverse relation applies. If you want something to stay constant in size in the view then it needs to grow as it gets further. Your just comparing apples with ...

3

Copying this from another thread where i posted this as the answer but as Wyck suggested, the correct answer is the first one. There is the whole derivation of it but I'll be discussing a brief overview. This is for the perspective projection where the line joining the eye and the center of the projection/image plane is perpendicular to it. Like here As ...

3

To answer your question we just need to write it as linear algebra equations and solve them. Although your question doesn't state it, I assume that $v$ and $d$ are unit vectors. Let's call the projected point $x$. First, because the projected point is in the direction $d$, we can write: $$\vec{vx} = \lVert\vec{vx}\rVert d$$ Second, because $p$ and $x$ are ...

2

You need to use a cylindrical projection. So the key issue is how to prepare data for a cylindrical projection. Basically what you do is: You project your data on a sphere, it may be that this process was already done for you. And then you project it back to a cylinder Both steps can be easily taken care of by your cartography software. Will the data ...

2

In the video you linked to, $d$ is just the distance from the eye to the image plane. To simplify things though, you can just set $d$ to 1, which is the usual case and causes it to disappear from the formulas. Your formula for projection is a bit wrong but don't worry, projection is actually pretty simple. $x_{Screen} = x_{World} / z_{World}\\ y_{Screen} =... 2 The function calculates the intersection points between two edges of a triangle and a plane that is assumed to cut it. It returns a line segment running along the cut. Or more generally, the function calculates where the intersection points with the two edges would be, if the edges were extended to infinite lines. Given that it's called "project", that ... 2 Please read the references that are given to you: $$S = \dfrac{1}{\tan(\dfrac{fov}{2}*\dfrac{\pi}{180})}$$$\$ \left[\begin{array}{cccc} S && 0 && 0 && 0 \\ 0 && S && 0 && 0 \\ 0 && 0 && -\dfrac{f}{(f-n)} && -1\\ 0 && 0 && -\dfrac{f*n}{(f-n)} && 0\\ \end{array}\...

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


text:
# Incentivizing Good Behavior with the Wolfram Cloud

Posted 4 years ago
6417 Views
|
3 Replies
|
10 Total Likes
|
 I had such luck using the Wolfram Language to help my son crack a forgotten lock combination, I've been trying to find other ways to incorporate little programming demonstrations/projects into daily household life. I won't go into the details, but my wife and I just made an arrangement with our daughter  she gets a star or point each time she does a certain thing that she doesn't particularly like to do, and if she gets x number of points, she gets a small reward that we've agreed on in advance. Typical incentivizing of good behavior... but the thing we're awarding points for could happen at a variety of times and locations, and in situations where either my wife or I might be present. So how do we ensure that two forgetful parents accurately track these events? It occurred to me that I could probably whip something up in just a few lines of Wolfram Language code that would fit the bill.I need some simple persistent storage for tracking points, so let's create a Databin: bin = CreateDatabin[] Out[301]= Databin["gx61vKJi"] All I need to do is add (and sometimes, perhaps, subtract) values, so I don't need much of a schema for the data. Let's just initialize the Databin with a value of 0: DatabinAdd[bin, 0] Then I need a simple function to modify the Databin and show some visualization of progress. This one will take a number of points, add them to the last value in the Databin, and plot the result (the new "Latest" value) as a HorizontalGauge: pointPlot = Function[val, DatabinAdd[bin, bin["Latest"]["Data"] + val]; HorizontalGauge[bin["Latest"]["Data"], {0, 25}, GaugeMarkers -> Placed[Graphics[Disk[]], "DivisionInterval"], ScaleDivisions -> {5, 5}, ImageSize -> 700]]; Then I make a simple FormPage, which lets me add and remove single points, or simply plot the latest value (by adding 0 points to the latest value): f = FormPage[{"Points" -> <| "Interpreter" -> {"+1" -> 1, "-1" -> -1, "Check progress" -> 0}, "Control" -> PopupMenu|>}, pointPlot[#Points] &, AppearanceRules -> <|"Title" -> "Random Kid Challenge"|>] And then deploy... In[323]:= CloudDeploy[f, Permissions -> "Public"] Out[323]= CloudObject["https://www.wolframcloud.com/objects/8fd763f3-1307-4971-9475-74840fcdd22e"]
3 Replies
Sort By:
Posted 4 years ago
 - another post of yours has been selected for the Staff Picks group, congratulations! We are happy to see you at the top of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!


text:
Download Invariants of boundary link cobordism by Desmond Sheiham PDF

By Desmond Sheiham

An $n$-dimensional $\mu$-component boundary hyperlink is a codimension $2$ embedding of spheres $L=\sqcup_{\mu}S^n \subset S^{n+2}$ such that there exist $\mu$ disjoint orientated embedded $(n+1)$-manifolds which span the elements of $L$. An $F_\mu$-link is a boundary hyperlink including a cobordism type of such spanning manifolds. The $F_\mu$-link cobordism crew $C_n(F_\mu)$ is understood to be trivial whilst $n$ is even yet no longer finitely generated while $n$ is atypical. Our major result's an set of rules to make a decision even if odd-dimensional $F_\mu$-links characterize an analogous cobordism type in $C_{2q-1}(F_\mu)$ assuming $q>1$. We continue to compute the isomorphism category of $C_{2q-1}(F_\mu)$, generalizing Levine's computation of the knot cobordism crew $C_{2q-1}(F_1)$.Our start line is the algebraic formula of Levine, Ko and Mio who establish $C_{2q-1}(F_\mu)$ with a surgical procedure obstruction workforce, the Witt crew $G^{(-1)^q,\mu}(\Z)$ of $\mu$-component Seifert matrices. We receive an entire set of torsion-free invariants via passing from integer coefficients to complicated coefficients and by way of making use of the algebraic equipment of Quebbemann, Scharlau and Schulte. Signatures correspond to 'algebraically fundamental' basic self-dual representations of a undeniable quiver (directed graph with loops). those representations, in flip, correspond to algebraic integers on an unlimited disjoint union of actual affine forms. to differentiate torsion periods, we contemplate rational coefficients in preference to advanced coefficients, expressing $G^{(-1)^q,\mu}(\mathbb{Q})$ as an enormous direct sum of Witt teams of finite-dimensional department $\mathbb{Q}$-algebras with involution.The Witt team of each such algebra looks as a summand infinitely usually. the speculation of symmetric and hermitian varieties over those department algebras is well-developed. There are 5 sessions of algebras to be thought of; whole Witt invariants can be found for 4 periods, these for which the local-global precept applies. An algebra within the 5th category, specifically a quaternion algebra with non-standard involution, calls for an extra Witt invariant that's outlined if all of the neighborhood invariants vanish.

Similar linear books

Lineare Algebra 2

Der zweite Band der linearen Algebra führt den mit "Lineare Algebra 1" und der "Einführung in die Algebra" begonnenen Kurs dieses Gegenstandes weiter und schliesst ihn weitgehend ab. Hierzu gehört die Theorie der sesquilinearen und quadratischen Formen sowie der unitären und euklidischen Vektorräume in Kapitel III.

Intelligent Routines II: Solving Linear Algebra and Differential Geometry with Sage

“Intelligent exercises II: fixing Linear Algebra and Differential Geometry with Sage” includes quite a few of examples and difficulties in addition to many unsolved difficulties. This e-book greatly applies the profitable software program Sage, which might be came upon loose on-line http://www. sagemath. org/. Sage is a contemporary and renowned software program for mathematical computation, on hand freely and straightforward to take advantage of.

Mathematical Methods. Linear Algebra / Normed Spaces / Distributions / Integration

Rigorous yet no longer summary, this in depth introductory therapy offers the various complicated mathematical instruments utilized in purposes. It additionally supplies the theoretical historical past that makes such a lot different elements of recent mathematical research obtainable. aimed at complex undergraduates and graduate scholars within the actual sciences and utilized arithmetic.

Mathematical Tapas: Volume 1 (for Undergraduates)

This ebook incorporates a number of workouts (called “tapas”) at undergraduate point, frequently from the fields of actual research, calculus, matrices, convexity, and optimization. lots of the difficulties provided listed here are non-standard and a few require huge wisdom of other mathematical topics to be able to be solved.

Extra resources for Invariants of boundary link cobordism

Sample text

Using neural net tags and full kinematic fitting [80], the mass peak shown in Fig. 18(b) is obtained for mhSM = 120 GeV, √ s = 500 GeV, and 500 fb−1 resulting in ∆mhSM ≃ 50 MeV. If a second lower-energy IR is available, it might be attractive to perform a scan across the Zh threshold. With a total integrated luminosity of 100 fb−1 , ∆mhSM ≃ 100 MeV at mhSM = 150 GeV is achievable [81], competitive with the methods above. 18: (a) Jet-jet invariant mass of the jets recoiling from a Z reconstructed hadronically simulated in the LCD Large detector, mhSM = 115 GeV.

Under such conditions, one can precisely measure the recoil mass in e+ e− → Zh events opposite to the reconstructed leptonic decay Z → e+ e− or µ+ µ− . This measurement is independent of the Higgs decay mode. Accuracy can be improved by reconstructing specific decay modes, leading, for example, to a four-jet topology where effective (5-C) kinematic constrained fits can be employed. 12) in a simulation of the L linear collider detector [77] described in Chapter 15 for Higgs masses between 115 and 160 GeV [78].

A comprehensive description of European studies using the simulated TESLA detector can be found in [76]. North American studies consider simulations of detectors with capabilities described in Chapter 15. The program of measurements of Higgs boson properties strongly impacts detector design. Measurement of branching ratios into fermions requires sophisticated vertex detectors to separate b from c (and gluon) jets. Precise recoil mass measurements need excellent momentum resolution (particularly for µ+ µ− ) from charged particle tracking.


text:
Exporting large numbers to .PDF file

For educational purpuses I sometimes print out large or interesting numbers for young mathematicians participating in classes. The numbers are generated in Mathematica.

I have tried simply copying it from Mathematica to Word, but Word works awfully slow (even with grammar check off). For example, with margins set to minimum possible value, using font of size 2, number $1\,000\,000!$ takes 33 pages.

So I want to export it to PDF file, but the problem is that using just Export command gives one-page PDF with three dots at the end of each line, and I don't have the option to set the font size. So, it is not really what you can call a beautiful and gripping thing.

I would also appreciate a hint on "interesting" formatting of the number, like making the first several lines with normal font and then lowering it, or highlighting some digits, for example, all $2$-s in the decimal form.


text:
Thread: [SOLVED] Diferentiation using chain rule?

1. [SOLVED] Diferentiation using chain rule?

I'm not sure how to go about doing these problems.
1. y = sin( ( 3/x^3) - (2/x^2) + (1/x) )
do i distribute sin to all the fraction and then differentite or do i use the quotient rule inside the bracket and sin x = cos x???

2. cuberoot(cos(3x)
still not sure how to go about it. if i use the chain rule i have 3 function and my teacher only explained using 2 functions... how it still work?

thank you so much for any help

2. Originally Posted by simply07
I'm not sure how to go about doing these problems.
1. y = sin( ( 3/x^3) - (2/x^2) + (1/x) )
do i distribute sin to all the fraction and then differentite or do i use the quotient rule inside the bracket and sin x = cos x???

2. cuberoot(cos(3x)
still not sure how to go about it. if i use the chain rule i have 3 function and my teacher only explained using 2 functions... how it still work?

thank you so much for any help
Sometimes depending on the question, you will need to use the chain rule more then once or twice....I've used it 7 times before.

For the first, you don't do anything to the fraction, just use chain rule.

1. $\dfrac{dy}{dx}=(cos[\dfrac{3}{x^3}-\dfrac{2}{x^2}+\dfrac{1}{x}])(\dfrac{4}{x^3}-\dfrac{9}{x^4}-\dfrac{1}{x^2})$

$\dfrac{dy}{dx}=\dfrac{1}{3}(cos(3x))^{\frac{-2}{3}}(-sin(3x)(3))$
$\dfrac{dy}{dx}=\dfrac{-sin(3x)}{(cos(3x))^{\frac{2}{3}}}$


text:
# ML in Action - Part 3: Decision trees

Like kNN, decision trees are very intuitive. The book uses 20 questions as an analogy. Decisions are also easy to visualize, so that we can double check the decision by following the tree. There is a whole section on how to plot trees using Matplotlib that I skipped. The book uses the well-known contact lens data set to illustrate the decision tree in action. Again, I would have liked to see a more interesting data set to get a better idea of when a decision tree would be a good choice. The actual algorithm used is ID3, which doesn’t do pruning, so there can be issues with overfitting. In terms of implementation, this proved more difficult than kNN. Part of this was due to the weak explanation of entropy and information gain.

On that note, Udacity recently released an Intro to Machine Learning course that does a very good job of explaining decision trees. The videos on entropy and information gain are clearer than explanations from various sections of books that I’ve read on the algorithm. Udacity does a good job of focusing on intuition. There’s not much theory, math, or even implementation, which is fine for an introductory course. Scikit Learn is used for the hands-on exercises. This is nice as well since these skills can immediately be applied to a real world situation. Scikit Learn has an especially nice API design. Applying basic algorithms is essentially the same three lines.

Decision trees with Scikit Learn

from sklearn.tree import DecisionTreeClassifier
clf = DecisionTreeClassifier()
clf.fit(features_train, labels_train)
pred = clf.predict(features_test)

Naive Bayes with Scikit Learn

from sklearn.naive_bayes import GaussianNB
clf = GaussianNB()
clf.fit(features_train, labels_train)
pred = clf.predict(features_test)

Support Vector Classification with Scikit Learn

from sklearn.svm import SVC
clf = SVC()
clf.fit(features_train, labels_train)
pred = clf.predict(features_test)

With that said the hard part is the data wrangling and feature set development. Also experimenting with and learning about the multitude of parameters for each algorithm is kind of daunting.

Overall, Udacity’s Intro to Machine Learning course is well done so far, if a bit too easy as is generally the case for their courses. The mini projects don’t require much effort at all, but they do highlight important nuances about the algorithms.

Back to Machine Learning in Action. I like that dead-simple examples are used when walking through the initial implementation of the algorithms. Decision trees are no different. The example given is a data set that determines whether an animal is a fish or not based on two features: ‘Can survive without coming to surface?’ and ‘Has flippers’.

Can survive without coming to surface? Has flippers? Fish?
Yes Yes Yes
Yes Yes Yes
Yes No No
No Yes No
No No No

The hard part with decision trees is understanding entropy and information gain. I think most people get the idea of how a decision tree works when the tree diagram is shown and you can follow the steps that the algorithm makes.

Entropy and information gain are important because they decide on the optimal split for a tree. In general, a shallow tree is better than a deep tree.

Entropy can be described as the purity of the data. So pure data would have the same classification for all examples. If we had an even split of labels, then the data would be impure.

Entropy equation

In this equation p stands for the probability of xi, where xi is a distinct label in the training set.

In the example data set, there are two classifications, fish or not fish.

First, what is the probability that one of the examples is a fish? Answer is 2/5.

Second, what is the probability that one of the examples is not a fish? Answer is 3/5.

Now we have enough to calculate the entropy of the entire data set and can just plug the numbers into the equation:

Deciding on what feature to split on

The decision to split on a particular feature is based on information gain. We want to split on the feature that provides the most information gain.

Continuing with the fish data set, we can visualize the information gain as follows:

Feature 1: Can survive without coming to surface?

There are two options, Yes/No, for this feature. This means we will have two branches.

Branch 1 (Yes):

Can survive without coming to surface? Fish?
Yes Yes
Yes Yes
Yes No

Branch 2 (No):

Can survive without coming to surface? Fish?
No No
No No

What is the information gain of this feature?

The first step is to calculate the entropy of branch 1:

• How many total examples are dealing with (both branches)? Answer is 5.
• How many examples are in branch 1? Answer is 3.
• What is the fraction of examples for branch 1. Answer is 3/5.
• How many examples are classified as Yes? Answer is 2.
• How many example are classified as No? Answer is 1.
• What is the entropy of branch 1?

Next calculate the entropy of branch 2:

• How many examples are in branch 2? Answer is 2.
• What is the fraction of examples for branch 2. Answer is 2/5.
• How many examples are classified as Yes? Answer is 0.
• How many example are classified as No? Answer is 2.
• What is the entropy of branch 2?

Now we have enough to calculate the information gain. We need to do 2 things.

1. We need to subtract the previous entropy (in this case: 0.971)
2. We need to weight the entropy of each branch.
• For branch 1, that weight is 3/5. This is basically calculated as number of example for this branch divided by the total number of examples in all branches.
• For branch 2, that weight is 2/5

So the information gain for this feature is calculated as follows:

The information gain for the second feature “Has flippers?” can be calculated in the same way. Unfortunately it’s not the best example, since the information gain is identical.

Implementing decision trees with python

I have avoided reading the author’s implementations and have tried to implement the algorithms based on the high-level pseudocode and description of how the algorithm works. I’ve tried to follow the same interface, so if I do get lost, I can refer to the author’s implementation.

The first method calculates the entropy of the data set:

def calcShannonEntropy(dataSet):
"""
Calculates Shannon entropy of classifications in data

Args:
dataSet: Data set

Return:
Entropy of data set
"""
total = float(len(dataSet))
labels = {}
for data in dataSet:
if data[-1] not in labels:
labels[data[-1]] = 0.0
labels[data[-1]] += 1
entropy = 0
for count in labels.values():
entropy -= (count/total) * math.log(count/total, 2)
return entropy

Next there needs to be a method to split a data set into a subset for branching down the tree.

def splitDataSet(dataSet, axis, value):
"""
Splits data set on a given column containing a specified value.

Returns the data set minus the specified column.

Args:
dataSet: Data set
axis: Column of value to split on
value: Value to split on

Returns:
Data set split by value and minus the specified column.
"""
subSet = []
for data in dataSet:
if data[axis] == value:
subSet.append(data[:axis] + data[axis + 1:])
return subSet

Our last helper method is the most important as it calculates the information gain and picks the best feature to split on.

def chooseBestFeatureToSplit(dataSet):
"""
Split on the feature with the largest information gain.

Args:
dataSet: Data set

Returns:
Column index of best feature
"""
total = float(len(dataSet))
features = [{} for i in xrange(len(dataSet[0][:-1]))]
baseGain = calcShannonEntropy(dataSet)
infoGain = [0] * len(features)

for data in dataSet:
result = data[-1]
for i, feature in enumerate(data[:-1]):
if feature not in features[i]:
features[i][feature] = []
features[i][feature].append((feature, result))

for i, feature in enumerate(features):
entropy = 0
for branch in feature.values():
entropy += len(branch) / total * calcShannonEntropy(branch)
infoGain[i] = baseGain - entropy

maxGain = max(infoGain)
return infoGain.index(maxGain)

The key method is createTree which builds the tree recursively. The stopping conditions are when the leaf node contains examples with a uniform classification or if there are no more features to split on. In the latter case, the most frequent classification is chosen.

def createTree(dataSet, labels):
"""
Creates decision tree using ID3 algorithm

Args:
dataSet: Data set
labels: Labels of features/columns

Returns:
Decision tree to use for classification
"""
classifications = [example[-1] for example in dataSet]

if all(classifications[0] == classification for classification in classifications):
return classifications[0]

if len(dataSet[0]) == 1:
return max(set(classifications), key=classifications.count)

bestFeature = chooseBestFeatureToSplit(dataSet)
tree = {labels[bestFeature]: {}}
for value in set([example[bestFeature] for example in dataSet]):
subset = splitDataSet(dataSet, bestFeature, value)
tree[labels[bestFeature]][value] = createTree(
subset, labels[:bestFeature] + labels[bestFeature + 1:])
return tree

Once the tree is created, we can create a simple method to classify data. This method recursively calls itself until it reaches a leaf node.

def classify(inputData, tree, labels):
"""
Classify given data using decision tree

Args:
inputData: Input data to classify
tree: Decision tree
labels: Labels for features/columns
"""
if not isinstance(tree, dict):
return tree
label = tree.keys()[0]
labelIndex = labels.index(label)
return classify(inputData, tree[label][inputData[labelIndex]], labels)

Here is the full decision tree implementation:

import math

"""
Loads data set as a list of lists

Args:
filepath: Path to data file in TSV format

Returns:
Data set as list of lists
"""
with open(filepath, 'r') as infile:
return [line.strip().split('\t') for line in infile]

def calcShannonEntropy(dataSet):
"""
Calculates Shannon entropy of classifications in data

Args:
dataSet: Data set

Return:
Entropy of data set
"""
total = float(len(dataSet))
labels = {}
for data in dataSet:
if data[-1] not in labels:
labels[data[-1]] = 0.0
labels[data[-1]] += 1
entropy = 0
for count in labels.values():
entropy -= (count/total) * math.log(count/total, 2)
return entropy

def splitDataSet(dataSet, axis, value):
"""
Splits data set on a given column containing a specified value.

Returns the data set minus the specified column.

Args:
dataSet: Data set
axis: Column of value to split on
value: Value to split on

Returns:
Data set split by value and minus the specified column.
"""
subSet = []
for data in dataSet:
if data[axis] == value:
subSet.append(data[:axis] + data[axis + 1:])
return subSet

def chooseBestFeatureToSplit(dataSet):
"""
Split on the feature with the largest information gain.

Args:
dataSet: Data set

Returns:
Column index of best feature
"""
total = float(len(dataSet))
features = [{} for i in xrange(len(dataSet[0][:-1]))]
baseGain = calcShannonEntropy(dataSet)
infoGain = [0] * len(features)

for data in dataSet:
result = data[-1]
for i, feature in enumerate(data[:-1]):
if feature not in features[i]:
features[i][feature] = []
features[i][feature].append((feature, result))

for i, feature in enumerate(features):
entropy = 0
for branch in feature.values():
entropy += len(branch) / total * calcShannonEntropy(branch)
infoGain[i] = baseGain - entropy

maxGain = max(infoGain)
return infoGain.index(maxGain)

def createTree(dataSet, labels):
"""
Creates decision tree using ID3 algorithm

Args:
dataSet: Data set
labels: Labels of features/columns

Returns:
Decision tree to use for classification
"""
classifications = [example[-1] for example in dataSet]

if all(classifications[0] == classification for classification in classifications):
return classifications[0]

if len(dataSet[0]) == 1:
return max(set(classifications), key=classifications.count)

bestFeature = chooseBestFeatureToSplit(dataSet)
tree = {labels[bestFeature]: {}}
for value in set([example[bestFeature] for example in dataSet]):
subset = splitDataSet(dataSet, bestFeature, value)
tree[labels[bestFeature]][value] = createTree(
subset, labels[:bestFeature] + labels[bestFeature + 1:])
return tree

def classify(inputData, tree, labels):
"""
Classify given data using decision tree

Args:
inputData: Input data to classify
tree: Decision tree
labels: Labels for features/columns
"""
if not isinstance(tree, dict):
return tree
label = tree.keys()[0]
labelIndex = labels.index(label)
return classify(inputData, tree[label][inputData[labelIndex]], labels)

def main():
filepath = '../sample/Ch03/lenses.txt'
labels = ['age', 'prescription', 'astigmatic', 'tearRate']


text:
# Thread: solve this trig equation. HELP!

1. ## solve this trig equation. HELP!

tan x + sec x = sqrt 3

2. ## Re: solve this trig equation. HELP!

Originally Posted by jennifernghi
tan x + sec x = sqrt 3
What have you tried so far?

-Dan

3. ## Re: solve this trig equation. HELP!

Originally Posted by jennifernghi
tan x + sec x = sqrt 3
As a start...

\displaystyle \begin{align*} \tan{(x)} + \sec{(x)} &= \sqrt{3} \\ \frac{\sin{(x)}}{\cos{(x)}} + \frac{1}{\cos{(x)}} &= \sqrt{3} \\ \frac{\sin{(x)} + 1}{\cos{(x)}} &= \sqrt{3} \\ \sin{(x)} + 1 &= \sqrt{3}\cos{(x)} \end{align*}

Now you need some way to convert everything to sines or cosines. Squaring and applying the Pythagorean Identity would work, you just need to be careful for extraneous solutions.


text:
# science

posted by .

10% of the atmosphere is located above the altitude where the pressure is
a. 100
b. 900

## Similar Questions

1. ### calc

2- The earth’s atmospheric pressure p is often modeled by assuming that the rate dpdhat Which p changes with the altitude above sea level is proportional to hp. Suppose that the pressure at sea level is 1013 millibars (about 14.7 …
2. ### calcq

2- The earth’s atmospheric pressure p is often modeled by assuming that the rate dp/dh at Which p changes with the altitude h above sea level is proportional to p. Suppose that the pressure at sea level is 1013 millibars (about 14.7 …
3. ### physics

The weight of the atmosphere above 1 m^2 of Earth's surface is about 100,000 N. Density, of course, becomes less with altitude. But suppose the density of air were a constant 1.2 kg/m/s^3. Calculate where the top of the atmosphere …
4. ### physics

The weight of the atmosphere above 1 m^2 of Earth's surface is about 100,000 N. Density, of course, becomes less with altitude. But suppose the density of air were a constant 1.2 kg/m/s^3. Calculate where the top of the atmosphere …
5. ### physics

The weight of the atmosphere above 1 m^2 of Earth's surface is about 100,000 N. Density, of course, becomes less with altitude. But suppose the density of air were a constant 1.2 kg/m/s^3. Calculate where the top of the atmosphere …
6. ### Physics

The modern Boeing 747 passenger jet airplane cruises at a speed up to 900 km/hr, at an altitude of 11,000 m. The cabin pressure is maintained equivalent to the atmospheric pressure at an altitude of 2,000 m. This is called the "cabin …
7. ### Pyhsics

The weight of the atmosphere above 1 m2{\rm m}^{2} of Earth's surface is about 100,000 N{\rm N}. Density, of course, becomes less with altitude. But suppose the density of air were a constant 1.2 kg/m3{\rm kg}/{\rm m}^{3}. Calculate …
8. ### ALGEBRA

the atmosphere pressure P in pounds per square inch (psi) is given by P=14.7e upper o.21a where a is the attitude above sea level in miles. If a city has an atmosphere pressure y 13.29 psi what is its altitude. Recall that one mile …
9. ### chemistry

at certain altitude in the upper atmosphere, the temperature is estimated to be -100 degree celsius and the density just 10^-9 that of the earth's atmosphere at STP. Assuming a uniform atmosphere at STP. Assuming a uniform atmospheric …
10. ### math

p=14.63⋅0.8 Atmospheric pressure, measured in pounds per square inch p, s, i is the force exerted by Earth's atmosphere over a given area. The atmospheric pressure, p, exerted on an airplane flying at an altitude of a miles above …

More Similar Questions


text:
# Documentation/4.2/Developers/Build Instructions/Configure

Home < Documentation < 4.2 < Developers < Build Instructions < Configure

## CONFIGURE and generate Slicer solution files

You can configure and generate Slicer solution files using either ccmake or cmake-gui.

### Per-platform instructions

#### Windows

• Recommended: cmake-gui
• Configure using default options.
• Set the build directory. For example: C:\Slicer4-SuperBuild-Debug or C:\Slicer4-SuperBuild-Release
• Remarks:
1. If you downloaded the Qt binary then qmake will be detected and all paths will be set automatically.
2. If you built your own Qt (e.g. in Debug mode for use with the designer) set the QT_QMAKE_EXECUTABLE in cmake-gui.QT_QMAKE_EXECUTABLE should be set to the path of the qmake.exe file, which is inside the bin directory (for example, \path\to\qt-everywhere-opensource-build-4.7.4\bin\qmake.exe).
3. Windows doesn't support path longer than 260 characters, please make sure that the total path name of your Slicer-build directory is no longer than 50 characters ( for example c:\work\Slicer\Slicer-Superbuild (32 characters) is fine)

#### Unix-like

• Recommended: ccmake
• Configure using the following commands. By default CMAKE_BUILD_TYPE is set to Debug.
mkdir Slicer4-SuperBuild-Debug
cd Slicer4-SuperBuild-Debug
ccmake -DQT_QMAKE_EXECUTABLE:FILEPATH=/path/to/QtSDK-1.2/Desktop/Qt/474/gcc/bin/qmake ../Slicer

where you replace /path/to with the real path on your machine where QtSDK-1.2 is located

• Remarks:
1. Using top-level directory name like Slicer-Superbuild-Release or Slicer-Superbuild-Debug is recommended.
2. Once the project is configured with cmake, generate it

### General information

Two projects are generated by either cmake, ccmake or cmake-gui.

One of them is in the top-level bin directory Slicer4-Superbuild and the other one is in the subdirectory Slicer-build:

Slicer4-Superbuild/Slicer-build
1. The first project in Slicer4-Superbuild manages all the external dependencies of Slicer (VTK, ITK, Python, ...). To build Slicer for the first time, run make (or build the solution file in Visual Studio) in Slicer4-Superbuild, which will update and build the external libraries and if successful will then build the subproject Slicer-build.
2. The second project in Slicer4-Superbuild/Slicer-build is the "traditional" build directory of Slicer. After local changes in Slicer (or after an svn update on the source directory of Slicer), only running make (or building the solution file in Visual Studio) in Slicer4-Superbuild/Slicer-build is necessary (the external libraries are considered built and up to date).
3. Warning: An significant amount of disk space is required to compile Slicer in Debug (>10GB on Windows)

### Workaround firewall blocking git protocol

• Some firewall will be blocking the git protocol, a possible workaround is to configure Slicer disabling the option Slicer_USE_GIT_PROTOCOL. Then http protocol will be used instead. Consider also reading https://github.com/commontk/CTK/issues/33

• By default, if CMake finds Java on your machine, it automatically builds Java CLIs. If you don't want any Java in your Slicer (or if you don't want to install Java on your Mac Os X), you can pass -DCMAKE_DISABLE_FIND_PACKAGE_Java:BOOL=TRUE when configuring Slicer.
• Same applies for OpenSSL: CMAKE_DISABLE_FIND_PACKAGE_OpenSSL:BOOL=TRUE can be passed when building Slicer for packaging.


text:
# Find the radius of convergence and interval of covergence of the series.

I'm in the process of trying to learn about the topic of series, power series, etc. (when I say learn I mean self-teach... everything urgh). My general understanding of the topic of Series as a whole is quite low, so a little more insight would be appreciated. Either I don't really take in much from reading or my book does an awful job of explaining it, however...

We have... Find the radius of convergence and interval of convergence of the series...

$\sum^\infty_{n=1}(-1)^nnx^n$

So to do this I try the ratio test (since they used this in the book for most of the examples)...

$|\frac{a_{n+1}}{a_n}| = |\frac{(-1)^{n+1}(n+1)x^n}{(-1)^n(n)x^n}| = |\frac{-1(n+1)}{n}| = |\frac{-n-1}{n}|= |-1 -\frac{1}{n}|$

Hence, this tends towards $|-1|$ or simply $1$ as $n \rightarrow \infty$

Ratio test says the series converges if 1 < 1 or diverges if 1 > 1. Since 1 = 1 this means the ratio test doesnt work right?

It looks like it is an "Alternating Series" but I again, I have no idea how to apply this...

Can anyone help me out... this is supposedly a basic question but nothing's clicking for me.

• $a_{n+1} = (-1)^{n+1}(n+1)x^{n+1}$, you wrote $x^n$. There's a factor $x$ in the quotient, and you get the limit $\lvert x\rvert$. Mar 26 '14 at 14:51

## 1 Answer

Why don't you take "the whole thing" and apply the quotient test to the absolute value?:

$$\left|\frac{A_{n+1}}{A_n}\right|=\left|\frac{(n+1)x^{n+1}}{nx^n}\right|=\frac{n+1}n|x|\xrightarrow[n\to\infty]{}|x|$$

so the series converges absolutely for $\;|x|<1\;$ ...

For the radius of convergence apply the Cauchy-Hadamard formula...which gives $\;1\;$ , of course.


text:
# Exponential Cell Growth

#### by Lensyl Urbano

The video shows 300 seconds of purely exponential growth (uninhibited), captured from the exponential growth VAMP scenario. Like the exponential growth function itself, the video starts off slowly then gets a lot more exciting (for a given value of exciting).

The modeled growth is based on the exponential growth function:

$N = N_0 e^{rt}$ (1)

where:

• N = number of cells (or concentration of biomass);
• N0 = the starting number of cells;
• r = the rate constant, which determines how fast growth occurs; and
• t = time.

### Finding the Rate Constant/Doubling Time (r)

You can enter either the rate constant (r) or the doubling time of the particular organism into the model. Determining the doubling time from the exponential growth equation is a nice exercise for pre-calculus students.

Let’s call the doubling time, td. When the organism doubles from it’s initial concentration the growth equation becomes:

$2N_0 = N_0 e^{r t_d}$

divide through by N0:

$2 = e^{r t_d}$

take the natural logs of both sides:

$\ln 2 = \ln (e^{r t_d})$

bring the exponent down (that’s one of the rules of logarithms);

$\ln 2 = r t_d \ln (e)$

remember that ln(e) = 1:

$\ln 2 = r t_d$

and solve for the doubling time:

$\frac{\ln 2}{r} = t_d$

### Decay

A nice follow up would be to solve for the half life given the exponential decay function, which differs from the exponential growth function only by the negative in the exponent:

$N = N_0 e^{-rt}$

The UCSD math website has more details about Exponential Growth and Decay.

### Finding the Growth Rate

A useful calculus assignment would be to determine the growth rate at any point in time, because that’s what the model actually uses to calculate the growth in cells from timestep to timestep.

The growth rate would be the change in the number of cells with time:

$\frac{dN}{dt}$

starting with the exponential growth equation:

$N = N_0 e^{rt}$

since we have a natural exponent term, we’ll use the rule for differentiating natural exponents:

$\frac{d}{dx}(e^u) = e^u \frac{du}{dx}$

So to make this work we’ll have to define:

$u = rt$

which can be differentiated to give:

$\frac{du}{dt} = r$

and since N0 is a constant:

$N = N_0 e^{u}$

$\frac{dN}{dt} = N_0 e^{u} \frac{du}{dt}$

substituting in for u and du/dt gives:

$\frac{dN}{dt} = N_0 e^{rt} (r)$

rearranging (to make it look prettier (and clearer)):

$\frac{dN}{dt} = N_0 r e^{rt}$ (2)

### Numerical Methods: Euler’s method

With this formula, the model could use linear approximations — like in Euler’s method — to simulate the growth of the biomass.

First we can discretize the differential so that the change in N and the change in time (t\$) take on discrete values:
$\frac{dN}{dt} = \frac{\Delta N}{\Delta t}$

Now the change in N is the difference between the current value Nt and the new value Nt+1:

Now using this in our differentiated equation (Eq. 2) gives:

$\frac{N^{t+1}-N^t}{\Delta t} = N_0 r e^{r\Delta t}$

Which we can solve for the new biomass (N^t+1):

$N^{t+1}-N^t = N_0 r e^{r\Delta t} \Delta t$

to get:
$N^{t+1} = N_0 r e^{r\Delta t} \Delta t + N^t$

This linear approximation, however, does introduce some error.

The approximated exponential growth curve (blue line) deviates from the analytical equation. The deviation compounds itself, getting worse exponentially, as time goes on.

Excel file for graphed data: exponential_growth.xls

### VAMP

This is the first, basic but useful product of my summer work on the IMPS website, which is centered on the VAMP biochemical model. The VAMP model is, as of this moment, still in it’s alpha stage of development — it’s not terribly user-friendly and is fairly limited in scope — but is improving rapidly.

Citing this post: Urbano, L., 2012. Exponential Cell Growth, Retrieved March 27th, 2017, from Montessori Muddle: http://MontessoriMuddle.org/ .
Attribution (Curator's Code ): Via: Montessori Muddle; Hat tip: Montessori Muddle.


text:
Free Version
Easy

# Relationships in a Circle: Two Tangents

GEOM-Y4MGH3

$\overline { AB }$ and $\overline { AC }$ are tangent segments of $\bigodot$ D. Find the value of $x$.


text:
# Randomly scaled random variables

Consider two possibly correlated scalar random variables $$N$$ and $$X$$. It is known that $$1\leq N \leq N_{\max}$$. Given that $$\mathbb{E}[NX]\leq 0$$, does it always hold that $$\mathbb{E}[X] \leq 0$$?

While it might appear intuitive that positively scaling a random variable should not change the sign of its mean, the possible correlation between N and X might complicate things. So far, I have had no luck proving it. On the other hand, I could not also come up with a counterexample. That is, I could not think of any RV $$X$$ (with positive mean) which upon multiplying with another positive random variable $$N$$ with bounded support, makes the mean of the product $$NX$$ negative.

Of course not. E.g., suppose that $$P(X=-1)=P(X=2)=1/2$$. Suppose also that (for some real $$n\ge1$$) $$N=n$$ when $$X=-1$$ and $$N=1$$ when $$X=2$$. Then $$EX>0$$, whereas $$ENX=-\frac12\,n+\frac12\,2<0$$ if e.g. $$n=3$$.


text:
ANOVA - independence assumption

I have conducted a study in which I have gathered 3 sentences per participant. These sentences were then classified and the words per sentence were counted. I want to test if there are significant differences in the word count means for the different categories of the classification.

However, because the sentences are not fully independent (each participant has entered 3 sentences), I am worried that ANOVA would not be the right analysis, since it assumes the independence of the cases.

Would it be better to carry out non-parametric statistics on transformed word counts, or is it okay to do an ANOVA?

PS I have asked a related question about using the $\chi^2$ test in a similar situation to identify interactions between factors.

-
Could you elaborate a little bit more on the "different categories of the classification"? I'm thinking a multi-level model might be useful here... –  dominic999 Apr 14 '12 at 23:18
Each sentence was classified using 3 classifications: type of sentence (nominal: {phrase, question, keywords}), data set (nominal, 3 choices, selected by participant), and distance to data set (6 levels, ordinal). –  Lars Grammel Apr 15 '12 at 0:20
add comment

1 Answer

In this case, unlike your $\chi^2$ question, the unit of analysis is a sentence and the randomness is very much associated with the sentence level, and hence you do need to worry about their independence. As @dominic999 suggests, a multi-level model (also known as a mixed effects model) will probably be appropriate, with participant as a grouping level and number of words as the response. Because the response is a count, you will probably find a mixed effects generalized linear model with a Poisson distribution is what you want.

However, an additional problem is that your classification happens after the experiment and hence is likely to be conflated with your response. Each time someone classifies the sentence they may be influenced by how many words the sentence has. This makes the experiment very different from a design where the classification is an independent variable in which you are interested in its impact on the response. There might be a way around this with some kind of two-way causality model similar to structural equation modelling; but my hunch is that better would be to take a step back and think through the aims of the research. Depending on more information about how your classification works, this issue may or may not be a problem.

-
Thanks! The study is an exploratory study to get an initial understanding of the nature of those sentences (unlike an experiment, I had no initial hypotheses and treatments). I want to quantify the qualitative findings I had and to inform about potential interactions between the classifications, but I do not attempt to establish any cause-effect relationship. The categories are whether the sentences are {questions,phrases,keywords}, what data set they used when formulating them (3 data sets, nominal scale), and how close they are to the data set (6 levels, ordinal scale). –  Lars Grammel Apr 15 '12 at 0:19
add comment


text:
So if I am reading wikipedia right, if we take \$$p(X) = \\{ s | s \subset X \land s \text{ is finite}\\} \$$ then monotone functions to \$$\mathbf{Bool}\$$ from \$$p(X)\$$ are isomorphic to elements of the free distributive lattice.

Now, there's an identity on objects functor whose actions on the Hom objects is the inclusion of monotonic functions in the set of functions. So these are still preorders indexed by \$$p(X)\$$, but ones that respect inclusion, that is each link exists if and only if a expression built From elements of \$$X\$$, and the operators or and and is true, given that the variables in the indexing power set are true.

Now this is a interesting logic to work in, because it doesn't distinguish Boolean and intuitonistic logic. You need to be able to use "not" just to talk about q being false or unknown, let alone distinguish the two.

You can distinguish the partition logic though, because accumulation isn't true for dit sets on more then 2 elements.


text:
# Why do we care about simplicity of the spectrum in Oseledets' theorem?

+ 4 like - 0 dislike
143 views

Oseledets' theorem is a fundamental result in Ergodic theory (see for example here, or Chapter 4 of Lectures on Lyapunov Exponents by Marcelo Viana).

The simplicity of the spectrum has been studied by Guivarc'h and Raugi '86, Gol'dsheid and Margulis '89, Bonatti-Viana '04, Avila-Viana '07 and very recently by Mauricio Poletti.

My* questions are: What is the importance of having simplicity of the spectrum? Is it there any physical property that translates into simplicity of the spectrum?

In order to be specific about the question, I include a formal theorem of the simplicity of spectrum.

Let $(M,\mathcal B, \mu)$ be a complete separable probability space. Let $F:M\times \mathbb R^d\to M\times \mathbb R^d$ be a linear cocycle, i.e. $F(x,v):=(f(x),A(x)v)$, defined by a measurable function $A:M\to GL(d)$ over a measurable function $f:M\to M$ that preserves $\mu.$ By Oseledets' theorem we have that for $\mu$-a.e. $x\in M$ there is $k=k(x),$ numbers $\lambda_1(x)>\cdots>\lambda_k(x)$ and flags $\mathbb{R}^d=V_x^1\supsetneq \cdots \supsetneq V_x^k \supsetneq \{0\},$ such that for all $i=1,\ldots,k:$

1. k(f(x))=k(x) and $\lambda_i(f(x))=\lambda_i(x)$ and $A(x)V_x^i=V_{f(x)}^i;$
2. the map $x\mapsto k(x)$ and $x\mapsto \lambda_i(x)$ and $x\mapsto V_x^i$ are measurable; and
3. $\lim_n \frac{1}{n}\log\|A^n(x)v\|=\lambda_i(x)$ for all $v\in V_x^i\setminus V_x^{i+1}.$

Formal theorem: Under a $\star$ condition, that depends on $(M,\mu,F),$ for $\mu$-a.e. $x\in M,$ we have that $d=k(x).$

*The first question was originally asked yesterday, in other terms, by Mario Ponce. I had this question at almost the same time, but I am still curious about the answer, this is the reason I dediced to ask it here.

This post imported from StackExchange MathOverflow at 2016-05-07 13:26 (UTC), posted by SE-user user39115
Certainly this is a big deal if $d=2$ and $A\colon M\to SL(2)$. In this case, the system is (non-uniformly) hyperbolic.
 Please use answers only to (at least partly) answer questions. To comment, discuss, or ask for clarification, leave a comment instead. To mask links under text, please type your text, highlight it, and click the "link" button. You can then enter your link URL. Please consult the FAQ for as to how to format your post. This is the answer box; if you want to write a comment instead, please use the 'add comment' button. Live preview (may slow down editor)   Preview Your name to display (optional): Email me at this address if my answer is selected or commented on: Privacy: Your email address will only be used for sending these notifications. Anti-spam verification: If you are a human please identify the position of the character covered by the symbol $\varnothing$ in the following word:$\varnothing\hbar$ysicsOverflowThen drag the red bullet below over the corresponding character of our banner. When you drop it there, the bullet changes to green (on slow internet connections after a few seconds). To avoid this verification in future, please log in or register.


text:
Practice Problems -   -  Use 6 Dot Entry   Switch to Nemeth Tutorial

# Lesson 7.4: Factorial

factorial symbol

## Explanation

A factorial is a mathematical progression that is calculated by multiplying an integer and all the integers below it. The factorial symbol is the exclamation point. The braille exclamation point is used in keeping with the UEB principle that each print symbol has one and only one braille equivalent.

4!
⠼⠙⠖

### Example 2

3!=3 multiplication dot 2 multiplication dot 1
⠼⠉⠖⠀⠐⠶⠀⠼⠉⠐⠲⠼⠃⠐⠲⠼⠁

### Example 3

4!=1 multipliction cross 2 multiplication cross 3 multiplication cross 4
⠼⠙⠖⠀⠐⠶⠀⠼⠁⠐⠦⠼⠃⠐⠦⠼⠉⠐⠦⠼⠙

### Example 4

A fraction with a numerator 4! and denominator 3!
⠰⠷⠼⠙⠖⠨⠌⠼⠉⠖⠾

### Example 5

A fraction with a numerator n! and denominator (n!+x)!
⠰⠰⠷⠝⠖⠨⠌⠐⠣⠝⠖⠐⠖⠭⠐⠜⠖⠾


text:
Minimum number of cells required for the MAST
1
0
Entering edit mode
@andrew_mcdavid-11488
Last seen 7 months ago

When I am doing DE test between 10 cells vs another 10 cells, I nearly can't find any DEs. After I increased the number of cells to do DE test ( including above 20 cells), I can get about hundreds of DEGs. So may I ask is there minimum number of cell requirement for MAST?

MAST scRNAseq differential expression • 322 views
0
Entering edit mode
@andrew_mcdavid-11488
Last seen 7 months ago

There is no minimum a priori, with the following caveats:

1. The tests rely on asymptotic theory to establish the correctness of the p-values. 20 cells may be on the low side. In https://www.ncbi.nlm.nih.gov/pubmed/23267174 we found when the frequency of expression, times the number of cells is greater than 16 we didn't have any issues. If you aren't in this regime, the tests will still run, but the p-values will probably be anti-conservative.

2. The residual degrees of freedom are probably more important than the raw number of cells, and in particular it might even be the case that the design is not identifiable with 20 cells, or there could be some other convergence issue with the logistic regression. You can check if this might be the case by looking at the @converged slot:

library(MAST)
data(vbetaFA)
zz = zlm(~Stim.Condition, sca = vbetaFA)
zz@converged

1. Otherwise, what you report is consistent with how statistical testing works. Smaller n means less power.