text:
# All Questions

100 views

### How can I remove a style from the list of available styles?

I have a stylesheet that has inherited some base definitions from another, but would like to "prune" the list of available styles, by removing or disabling1 some. Is there a way to do this? 1. This ...
108 views

### Is there a way to base one style on another?

I'm setting up a stylesheet and and finding the process of defining related styles tedious and error prone. In particular, I have several related styles that need to have synchronized settings (e.g., ...
278 views

### Integral with HeavisideTheta takes too long to evaluate

I tried to compute $$\int_{-1}^1 d x_1 \int_{-1}^1 d x_2 \int_{-1}^1 d y_1 \int_{-1}^1 d y_2 \theta(x_1 x_2 + y_1 y_2)\,$$ where $\theta$ is Heaviside's step function, by using ...
351 views

### How to remove accents from text?

I would like to know how I can remove accents from a string. For example, how can I transform "string test áéíóú" into ...
176 views

### How to get a sub range of a larger matrix?

This should be an easy question but I only found a partial solution using All. Say I have a matrix A = 1000 x 5, how to get only a part of that matrix, say B = n x ...
128 views

### Having Dynamic evaluated when off screen

As the title says, I want a cell containing the dynamic solution of a DAE-System to be available over the whole document. I use a lot of different Plots and Sliders scattered over the document and it ...
959 views

### NDSolve with vectors

I'm stumped. I'm trying to write this using vectors, but the 2nd derivative isn't being expanded like I expected it to be. This is a system of equations for a projectile with quadratic drag and ...
943 views

### Determining the local extrema of discrete data [duplicate]

Possible Duplicate: Local max/min of Mathematica data sets If I have a continuous function f (for example ...
1k views

### How can I differentiate Numerically?

Mathematica has two ways to integrate: Integrate and NIntegrate. But what about D? ...
747 views

### How to change the base of logarithmic-scale plots?

Mathematica provides a score of convenient functions to make plots with various logarithmic scale axes, for instance I am using ListLogLinearPlot to have a discrete ...
283 views

### Cournot Equilibrium

I'm trying to determine reaction functions of a Cournot equilibrium for $n$ firms using the same optimal condition, using the fixed point method. This is the method I'm using: ...
391 views

### Incrementing a number where each digit has a different base

Let's say I have a list, for instance {10,5,3}, indicating the bases for each digit of my 3-digit number. Using this basis, if I wanted to increment {8,4,1} a couple of times, here's what I would get: ...
135 views

...
447 views

### Manipulating PlotRange

Currently, I am working with some dynamic simulations of mechanical/electrical systems (in this case a kitchen scale). The main simulation is running smoothly but while building a nice GUI around the ...
67 views

### How to expand terms within an integral? [duplicate]

Possible Duplicate: Why aren’t these additions of integrals and summations equal? I am trying to expand all the terms in a sum in order to apply assignment rules later, but can't figure out ...
3k views

### Simple ways to evaluate a derivative at a point?

The contrast in behavior between, say, f[x_] = Sin[x^2]; f'[2] vs. u[x_, y_] = Cos[x + y^2]; has always bothered my ...
221 views

### Both Sin[x]==0 && Cos[x]==0 as a solution

If I do FullSimplify[Reduce[Sin[p1] == 0 && Cos[p1] == 0, Reals]] I get Cos[p1] == 0 && Sin[p1] == 0 ...
454 views

### How to perform fuzzy lookup between lists?

I have two big lists with 10,000 lines each, with product names from different databases. They have a lot of common products (50%), but they are not typed in the same way. For example there is one ...
129 views

First I define an entry of UpValues overloading D[] for expressions with head ftest: ...
673 views

### Grain(Particle) Size Distribution (PSD) Analysis with Mathematica

I would like to do an analysis of the grain size distribution of a Monte Carlo Grain Growth simulation I implemented based on the nice example by Rituraj Nandan (see Link). The result of this ...
157 views

### What is the point of Refresh if Dynamic has an UpdateInterval option?

I haven't found an example where I can't get rid of Refresh[]: ...
444 views

### How to determine the remaining sides given the three angles and one side of a triangle?

The measure of the interior angles of a triangle are $15^\circ$, $30^\circ$, $135^\circ$ and the length of one edge is 3. In order to determine the length of the remaining two edges, I've tried ...
437 views

### How to change coordinates of a differential operator?

I'm doing a basic quantum mechanics problem and am trying to learn how to do it in Mathematica. Any help would be much appreciated. $\vec{L} = \vec{x} \times \vec{p}$ where $\vec{x}$ has ...
1k views

### How to convert output of a For loop into a list

I have written a For loop in my Mathematica notebook. This For loop, when activated, will generate a sequence something like: ...
154 views

### Uniform scaling of a Table of Graphics objects?

Row[Table[Graphics[Rectangle[{0, 0}, {2^k, 1}]], {k, 0, 5}]] yields However, I'd like uniform scaling of the rectangles, i.e., each rectangle should look twice ...
306 views

### Showing the terms in a partial sum?

I am trying to get s[n_]:=Sum[1/2^k,{k,1,n}] to show me the actual terms involved in the $n$th partial sum and not just the sum itself. I've tried ...
140 views

### Manipulate and FileNameSetter don't want to play nice together

In a Manipulate, one can specific the type of an individual control like so: Manipulate[v, {v, Red, ColorSetter}] I tried to ...
181 views

### Pattern constraint for two or more variables

Is it possible to have a pattern constraint for a function with two or more variables where the pattern is a relation between the vars being accepted e.g. ...
102 views

### How can I define an option “packet” for plots so I can only alter the definition and all plots with that “packet” will change appearance? [duplicate]

Possible Duplicate: Consistent Plot Styles across multiple MMA files and data sets So, here's my problem; I have a lot of data that is shown in different plots. I want all the plots to have ...
527 views

### How to work with Application Project files in Wolfram Workbench?

I have figured out that in a basic project I simply have to call the main package (m file) from the notebook using <<nameofmfile` and then the notebook ...
409 views

### How to make brute force coding more efficient?

Hi guys and guysettes, The little Mathematica I've been using/seen so far, it seems to be all about neat "one-liners" using the underlying functions and working with lists & maps to solve issues, ...
321 views

### Import values from tab separated file, change decimal point?

I have files that look like this: ...
973 views

### Constructing election cartograms?

I found this pretty neat page showing cartograms for the US elections and I don't really know how to get started doing these graphics in Mathematica. For those who don't know, a cartogram is a map in ...
232 views

### Table not working with Plot

Because NIntegrate[] does not support parallel computation out of the box, I'm doing a simplified version by breaking the integration limit into pieces and using ...
223 views

### How do I numerically solve a custom function?

Whenever I use functions like FindRoot or NDSolve, it sends x through the function and deals ...
199 views

### Overlay of pdf using PairedHistogram in Mathematica

With a standard 1D histogram, I can generate a pdf overlay using Show and Plot. I'd like to do something similar with ...
256 views

### How can I force points in a list to have distinct x values?

I have a list of points that may be used for linear interpolation using Interpolation and need to ensure that no two points have the same $x$ value, since, if they ...
272 views

### Converting expressions into functions

I have defined an expression, such as a = x I would like to convert this into a function, such as f[x_]:=x However, in my ...
167 views

### Order of operations for the Table function [duplicate]

Possible Duplicate: Using pure functions in Table I have run into a situation that I do not understand when trying to generate a nested list of pure functions. I have the following code. ...
202 views

### Getting slightly different results in fitting a logit model in R and Mathematica

I'm fitting some data to a Logit model in both Mathematica and R and I'm getting slightly different results. R code: ...
151 views

### How to efficiently find multimap k-itemset frequency

I am doing this to learn association rules. The data d is in format {id, value}, for example: ...
116 views

...
236 views

### Keep palette visible when Mathematica application loses focus

When the Mathematica application loses focus, palette windows disappear (normal notebooks and dialogs (CreateDialog) stay). This is usually convenient because the ...
541 views

### Efficient evaluation of functions defined by NIntegrate

I have a complicated function $f$ and I want to plot the function $F(x)$ defined by the definite integral of $f$ from $0$ to $x$: $$F(x) = \int_0^x f(y)\mathrm dy.$$ Apparently $f$ cannot be ...
145 views

### Selecting a Point that has the Lowest Absolute x/y-coordinate From a List of Points

Given that there is a set of points, for example, {{3,4,2},{5,2,-1}}. How do I go about selecting the point that has the lowest absolute x, y or z-coordinate from ...
183 views

### Is there a Palette for processing experimental data? [closed]

I find that Mathematica has excellent tools for processing experimental data: importing complex data, manipulating it, fitting curve to the data and plotting with error bars. But the problem for me is ...
392 views

### How do I switch between dashed and undashed styles in ParametricPlot?

I am trying to generate a parametric plot in Mathematica 8 using the following: ...
288 views

### How to effectively diff a notebook?

How to effectively diff a notebook with another version of it? This is usually needed/encountered in revision control, but can be generally useful. What i currently do is disable notebook history, ...


text:
# Find the length of PQ.

Let $$ABC$$ be a triangle. Let the external bisector of angle $$A$$ meet the circumcircle of triangle $$ABC$$ again at $$M \neq A$$. A circle with centre $$M$$ and radius $$MB$$ meets the internal bisector of angle $$A$$ at points $$P$$ and $$Q$$. Determine the length of $$PQ$$ in terms of the lengths of $$AB$$ and $$AC$$.

Could anyone please provide a solution? I cannot seem to make any significant progress in the question.

Edit: Here is the original project that I created in Geogebra. Hope it makes the diagram clearer.

https://www.geogebra.org/classic/ezted9sg

• Nice formatting of question; nice diagram. Re "...I cannot seem to make any significant progress...", please edit your query to show all of the work that you have done so far. Aug 22, 2020 at 8:24
• It is basic angle chasing and most of it is just me making sense of the diagram. And a big mess of trigonometric expressions. I do not want to include this as I want an elegant answer to the question. Aug 22, 2020 at 8:30
• I regard your response as reasonable. However, the first thing that mathSE reviewers will focus on is that you haven't shown your work. A mathSE reference on this issue is math.meta.stackexchange.com/questions/9959/…. Also, please use mathJax to format your math. A mathSE reference on this is math.stackexchange.com/help/notation. Aug 22, 2020 at 8:38
• I am very sorry, but typing that out would be a nightmare, especially to a novice like me. And I do use Mathjax (same as Latex, right?) Aug 22, 2020 at 8:49
• Mathjax has some minor differences with Latex. Use <br> to force line break. Also, Mathjax can only be invoked by enclosing the characters in $...$ or $$...$$. Thus, for example to underline text via mathJax rather than html tags, you have to do something like $\underline{\text{abc}}$. Aug 22, 2020 at 8:55

Try to prove this..

•Find the length of $$MA=2R\cos(\frac{A+2C}{2})$$ first. ( Where $$R$$ is the circumradius of the triangle.)

•Then find $$MB=2R\cos(\frac{A}{2})$$ by using Sine Law (Chase the angles) in $$\triangle MAB$$

•Finally apply Pythagoras theorem in $$\triangle MAQ$$

$$MQ^2-MA^2=MB^2-MA^2=AQ^2$$ and $$PQ=2AQ$$

• But what is Angie AMB? Aug 22, 2020 at 9:09
• It is equal to angle ACB. Aug 22, 2020 at 9:11
• Oh sorry I am an idiot Aug 22, 2020 at 9:12
• Well I did get an expression but it is not pretty. Something horrific in terms of sines of angles B and C Aug 22, 2020 at 9:19
• Can you post what did you get? When I was doing it, I replaced $\frac{b}{\sin B}=\frac{c}{\sin C}=2R$...See if this helps. Aug 22, 2020 at 9:21

format: plain


text:
650 views
If L1 contains finite number of strings and L2 is a CFL then $L1\cap L2$ is ____

(A) Regular
(B) CSL
(C) CFL
(D) None of these

It is good to study a lot but never forget the very basic. A finite set intersection any set will only give a finite set- means $L_1 \cap L_2$ must be finite and the best option here is (A) Regular though technically (B) and (C) are also correct.
by

### 1 comment

So,
$Regular \bigcap CFL = CFL$

$Finite Regular \bigcap X = Regular$
Is that correct?

finite no of striings....means we can do it with a finite state machine...means L1 is regular

regular intersection CFL is CFL

so option C

by

But CFL are not closed under intersection... ??
yes...means we dont know what CFL intersection CFL will be..right...
option C

Regular $\cap$ CFL = CFL

Answer will B according to me

Exp::

Since string are finite therefore it must be CFL let us say L1 and second CFL let us say L2

L1 ⋂ L2 will not be CFL,Bcz it is not closed under the intersection.Therefore it must be CSL..

### 1 comment

You are answering too many questions wrong - what happened?


text:
# Elliptic flow for $\phi$ mesons and (anti)deuterons in Au+Au collisions at $\sqrt{s_{NN}}$ = 200 GeV

Abstract : Differential elliptic flow (v_2) for phi mesons and (anti)deuterons (d^bar)d is measured for Au+Au collisions at sqrt(s_NN) = 200 GeV. The v_2 for phi mesons follows the trend of lighter pi^+/- and K^+/- mesons, suggesting that ordinary hadrons interacting with standard hadronic cross sections are not the primary driver for elliptic flow development. The v_2 values for (d^bar)d suggest that elliptic flow is additive for composite particles. This further validation of the universal scaling of v_2 per constituent quark for baryons and mesons suggests that partonic collectivity dominates the transverse expansion dynamics.
Document type :
Journal articles

http://hal.in2p3.fr/in2p3-00141927
Contributor : Jeanine Pellet <>
Submitted on : Monday, April 16, 2007 - 6:06:52 PM
Last modification on : Tuesday, April 20, 2021 - 12:00:10 PM

### Citation

S. Afanasiev, C. Aidala, N.N. Ajitanand, Y. Akiba, J. Alexander, et al.. Elliptic flow for $\phi$ mesons and (anti)deuterons in Au+Au collisions at $\sqrt{s_{NN}}$ = 200 GeV. Physical Review Letters, American Physical Society, 2007, 99, pp.052301. ⟨10.1103/PhysRevLett.99.052301⟩. ⟨in2p3-00141927⟩

Record views


text:
Skip to content

Instantly share code, notes, and snippets.

dahoo/dendrogram.tex Last active May 29, 2019

Hierarchical Clustering Dendrogram in Latex
 \begin{tikzpicture}[sloped] \node (a) at (-6,0) {a}; \node (b) at (-3,0) {b}; \node (c) at (-0.5,0) {c}; \node (d) at (0.5,0) {d}; \node (e) at (2,0) {e}; \node (ab) at (-4.5,3) {}; \node (cd) at (0,1) {}; \node (cde) at (1,2) {}; \node (all) at (-1.5,5) {}; \draw (a) |- (ab.center); \draw (b) |- (ab.center); \draw (c) |- (cd.center); \draw (d) |- (cd.center); \draw (e) |- (cde.center); \draw (cd.center) |- (cde.center); \draw (ab.center) |- (all.center); \draw (cde.center) |- (all.center); \draw[->,-triangle 60] (-7,0) -- node[above]{distance} (-7,6); \end{tikzpicture}

WillyWinkel commented Jul 8, 2015

 looks like:

Pierre-Sassoulas commented Jun 30, 2017

 This require \usetikzlibrary{arrows}

jendrikw commented May 29, 2019

 If you use \coordinate instead of \node, you don't need the .center.
to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.


text:
Windows PowerShell is a command-line shell and scripting environment that brings the power of the .NET Framework to command-line users and script writers. It introduces a number of powerful new concepts that enables you to extend the knowledge you have gained and the scripts you have created within the Windows Command Prompt and Windows Script Host environments.

# Audience

The Windows PowerShell User's Guide is intended for IT professionals, programmers, and power users who have no prior background with Windows PowerShell. Although backgrounds in scripting and Windows Management Instrumentation (WMI) are helpful, they are not assumed or required to understand this document.


text:
Chapter 13

X-Ray and Computed Tomography

13.1Introduction

So far we have covered the basics of Python, its scientific modules, and image processing techniques. In this chapter, we begin our journey of learning image acquisition. We will begin the discussion with x-ray generation and detection. We will discuss the various modes in which x-ray interacts with matter. These methods of interaction and detection have resulted in many modes of x-ray imaging such as angiography, fluoroscopy, etc. We complete the discussion with the basics of CT, reconstruction, and artifact removal.

13.2History

X-rays were discovered by Wilhelm Conrad R$math$ntgen, a German physicist, during his experiment with cathode ray tubes. He called these mysterious rays “x-rays,” ...

Get Image Processing and Acquisition using Python, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.


text:
lfm及其模糊函数

Directory: Communication develop
Plat: matlab
Size: 1KB
Description:   The simulation of LFM signal is realized, and its spectrum and time domain waveform can be analyzed, and its ambiguity function can be simulated to analyze its radar performance.

File list:
lfm及其模糊函数\LFM.m, 490 , 2019-03-15
lfm及其模糊函数\lfm_ambiguityfunction.m, 937 , 2019-03-21
lfm及其模糊函数, 0 , 2019-03-21


text:
Entire website open-sourced at: https://github.com/grokit/website_grokit_ca/. Feel free to make pull requests if you find mistakes!

Coffee is a drug I enjoy consuming, and I want to know what science has to say on its effect of my health.

For example, The Atlantic recently published "The Case for Drinking as Much Coffee as You Like", an article that presents coffee as a panacea. According to them, coffee diminishes the likelihood of type 2 diabetes, pain, coronary heart disease, stroke, Alzheimer's disease, cancer and alcoholism to name only a few.

    """A grant from a consortium of coffee-producing countries (Brazil, Colombia, Mexico, and Guatemala and a coalition of Central American nations) under the auspices of the Association of Coffee Producing Countries (ACPC), the National Coffee Association of the USA, and the All Japan Coffee Association. Subsequently, the work of the ICS has also received support from the International Coffee Organization and the USA corporate sector (NCA, Kraft Foods, Nestle, Sara Lee, Starbucks)."""

I do not doubt that the source of the article is well-meaning and does good work, but let's put our skeptic glasses and inquire on our own what the scientific literature has to say on the topic.

Let's investigate:

1. Effect of coffee on health
2. Effect of coffee on mental performance

The methodology consists of searching the scientific literature for recent articles that are highly cited and from credible sources.

## Effect of Coffee on Health

Coffee and health: a review of recent human research (2006, 304 citations) is a comprehensive review of the effect of coffee on health. The results is summarized in "For adults consuming moderate amounts of coffee there is little evidence of health risks and some evidence of health benefits.". Good news, your daily coffee is probably not killing you. However, "some evidence of health benefits" is far from the claim that the article from The Atlantic suggests.

Here are more details from the study:

Good:

Coffee may help prevent several chronic diseases, including type 2 diabetes mellitus, Parkinson's disease and liver disease. At present, there is little evidence that coffee consumption increases the risk of cancer and coffee consumption is not significantly increased cardiovascular disease risk.

Coffee consumption is associated with increases in several cardiovascular disease risk factors, including blood pressure and plasma homocysteine. Some group of people are more vulnerable to the ill effects of caffeine (people with hypertension, elderly, adolescents, ...). Do not drink more than 300mg of caffeine if you are pregnant, it can impair fetal growth.

### Corollary

If you enjoy drinking coffee, keep on -- it most probably does not impair your health unless you suffer from other medical conditions (in which case, ask your doctor). If you want to be healthy, eat well, exercise, maintain strong social ties, sleep well and avoid stress; coffee probably only has a marginal positive impact on health.

## Effect of Coffee on Mental Performance

This one is a bit more complicated since mental performance can be interpreted in many ways. We split the investigation in the long and short term effects of coffee consumption on mental performance.

### Long-Term Effect of Coffee on Mental Performance

"Does drinking coffee for years keep your brain in better shape?". Coffee Consumption and Cognitive Function among Older Adults (2002, 87 citations) attempts to answer that question by administering standardized tests to old people and comes to a rather surprising conclusion: "No relation was found between coffee intake and cognitive function among men or between decaffeinated coffee intake and cognitive function in either sex. Lifetime and current exposure to caffeine may be associated with better cognitive performance among women, especially among those aged 80 or more years."

### Short-Term Effect of Coffee on Mental Performance

Intuitively, most coffee drinkers know that coffee helps when one is very tired. Effects of caffeine, sleep loss, and stress on cognitive performance and mood during U.S. Navy SEAL training (2002, 256 citations) confirms this intuition: caffeine significantly improved visual vigilance, choice reaction time, repeated acquisition, self-reported fatigue and sleepiness with the greatest effects on tests of vigilance, reaction time, and alertness **for sleep-deprived individuals in a stressful environment. These effects lasts up to 8 hours after consumption.

But what about when someone is in a "normal situation": not necessarily sleep deprived or stressed. Researchers investigated if some of caffeine's positive effect could be cause by the absence of withdrawal rather than really boosting mental performance: Effects of caffeine on performance and mood depend on the level of caffeine abstinence (2002, 86 citations). They come to a striking conclusion: "Caffeine reliably improved performance on a sustained attention task, and increased rated mental alertness, in moderate caffeine consumers who were tested when caffeine-deprived. However, caffeine had no such effects when consumers were no longer caffeine deprived."

This is an outstanding result; it means that there is no short-term cognitive benefit to drinking coffee (under "normal conditions"), there is only an absence of the negative effects of withdrawal on people addicted to coffee!

### Corollary

Over time, you will likely not perform better at your job if you drink coffee. If you need a sudden boost of attention in a situation where you are likely to get tired such as in a long drive, coffee is helpful. Also, if you usually drink coffee, do not skip it on the morning of an exam!

# Conclusion

There seems to be some long-term cognitive and health benefits to coffee drinking for certain group of people, but the effect is small. There are some marginal positive health effects and it can help you momentarily escape the ill effects of fatigue, but mostly drink coffee if you enjoy it -- do not expect strong cognitive or health benefits from it.

# Appendix A: The Amount of Caffeine in Beverages

Mayo clinic has an excellent table with lots of detail on that topic. But it is long and precise, here is a quick reference that abstracts the details:

    Drink | Caffeine Content in mg
------------------------------
5-Hour Energy:   200
Brewed Coffee:   150
Red Bull:        78
Expresso:        60
Black tea:       40
Green tea:       32
Coca-Cola:       32
Brewed, decaf:   7


text:
## 2013 Final #4

Michelle_Nguyen_3F
Posts: 40
Joined: Wed Sep 21, 2016 2:59 pm

### 2013 Final #4

Given $2Fe(s) + 2H_{2}O(l) + O_{2} \rightarrow 2Fe(OH)_{2} (s)$, how would we write the half reactions? Thank you!

Andrea Medina 1A
Posts: 13
Joined: Wed Sep 21, 2016 2:58 pm

### Re: 2013 Final #4

I have a similar question how would we know the moles of electrons if we are not given the charges and Fe is a transition metal?

Pauline Tze 3B
Posts: 57
Joined: Sat Jul 09, 2016 3:00 am
Been upvoted: 1 time

### Re: 2013 Final #4

2Fe(s) + 2H2O --> 2Fe(OH)2(s) + 4e-
pay attention to the charge for Fe as Fe is oxidized from 0 to +2
O2 + 4e- ----> 2Fe(OH)2(s)
pay attention to the charge for O as O is reduced from 0 to -2

Posts: 23
Joined: Wed Sep 21, 2016 3:00 pm

### Re: 2013 Final #4

Wait, How would that work? The reduction reaction isn't balanced (Fe on products but not in reactants). I also had trouble determining n for this question.

Posts: 11
Joined: Wed Sep 21, 2016 2:57 pm
Been upvoted: 1 time

### Re: 2013 Final #4

So we would calculate the electron number from the changes in charges seen in the corresponding half reactions?


text: Oleg has $2,000 in his bank account, and plans to add 5,000 at the end of each future years until it reaches$250,000. He expect to earn 7% annually on the account, how many years (and or months) will it it take to reach his goal?


text:
# NDK_ARIMA_PARAM

 int __stdcall NDK_ARIMA_PARAM ( double * pData, size_t nSize, double * mean, double * sigma, WORD nIntegral, double * phis, size_t p, double * thetas, size_t q, MODEL_RETVAL_FUNC retType, size_t maxIter )

Returns an array of cells for the initial (non-optimal), optimal or standard errors of the model's parameters.

Returns
status code of the operation
Return values
 NDK_SUCCESS Operation successful NDK_FAILED Operation unsuccessful. See Macros for full list.
Parameters
[in] pData  is the univariate time series data (a one dimensional array).
[in] nSize  is the number of observations in pData.
[in,out] mean  is the ARMA model mean (i.e. mu).
[in,out] sigma  is the standard deviation of the model's residuals/innovations.
[in] nIntegral  is the model's integration order.
[in,out] phis  are the parameters of the AR(p) component model (starting with the lowest lag).
[in] p is the number of elements in phis (order of AR component)
[in,out] thetas  are the parameters of the MA(q) component model (starting with the lowest lag).
[in] q is the number of elements in thetas (order of MA component)
[in] retType  is a switch to select the type of value returned: 1= Quick Guess, 2=Calibrated, 3= Std. Errors
Order   Description
1 Quick guess (non-optimal) of parameters values (default)
2 Calibrated (optimal) values for the model's parameters
3 Standard error of the parameters' values
[in] maxIter  is the maximum number of iterations used to calibrate the model. If missing or less than 100, the default maximum of 100 is assumed.
Remarks
1. The underlying model is described here.
2. The time series is homogeneous or equally spaced.
3. The time series may include missing values (e.g. NaN) at either end.
4. ARIMA_PARAM returns an array for the values (or errors) of the model's parameters in the following order:
• $$\mu$$
• $$\phi_1,\phi_2,...,\phi_p$$
• $$\theta_1,\theta_2,...,\theta_q$$
• $$\sigma$$
5. The integration order argument (d) must be a positive integer.
6. The long-run mean can take any value or may be omitted, in which case a zero value is assumed.
7. The residuals/innovations standard deviation (sigma) must be greater than zero.
8. For the input argument (phi):
• The input argument is optional and can be omitted, in which case no AR component is included.
• The order of the parameters starts with the lowest lag.
• The order of the AR component model is solely determined by the order of the last value in the array with a numeric value (vs. missing or error).
9. For the input argument (theta):
• The input argument is optional and can be omitted, in which case no MA component is included.
• The order of the parameters starts with the lowest lag.
• The order of the MA component model is solely determined by the order of the last value in the array with a numeric value (vs. missing or error).
Requirements
Examples

 Namespace: NumXLAPI Class: SFSDK Scope: Public Lifetime: Static
 int NDK_ARIMA_PARAM ( double[] pData, UInPtr nSize, ref double mean, ref double sigma, short nIntegral, double[] phis, UIntPtr p, double[] thetas, UIntPtr q, MODEL_RETVAL_FUNC retType, UIntPtr maxIter )

Returns an array of cells for the initial (non-optimal), optimal or standard errors of the model's parameters.

Return Value

a value from NDK_RETCODE enumeration for the status of the call.

 NDK_SUCCESS operation successful Error Error Code
Parameters
[in] pData  is the univariate time series data (a one dimensional array).
[in] nSize  is the number of observations in pData.
[in,out] mean  is the ARMA model mean (i.e. mu).
[in,out] sigma  is the standard deviation of the model's residuals/innovations.
[in] nIntegral  is the model's integration order.
[in,out] phis  are the parameters of the AR(p) component model (starting with the lowest lag).
[in] p is the number of elements in phis (order of AR component)
[in,out] thetas  are the parameters of the MA(q) component model (starting with the lowest lag).
[in] q is the number of elements in thetas (order of MA component)
[in] retType  is a switch to select the type of value returned: 1= Quick Guess, 2=Calibrated, 3= Std. Errors
Order   Description
1 Quick guess (non-optimal) of parameters values (default)
2 Calibrated (optimal) values for the model's parameters
3 Standard error of the parameters' values
[in] maxIter  is the maximum number of iterations used to calibrate the model. If missing or less than 100, the default maximum of 100 is assumed.
Remarks
1. The underlying model is described here.
2. The time series is homogeneous or equally spaced.
3. The time series may include missing values (e.g. NaN) at either end.
4. ARIMA_PARAM returns an array for the values (or errors) of the model's parameters in the following order:
• $$\mu$$
• $$\phi_1,\phi_2,...,\phi_p$$
• $$\theta_1,\theta_2,...,\theta_q$$
• $$\sigma$$
5. The integration order argument (d) must be a positive integer.
6. The long-run mean can take any value or may be omitted, in which case a zero value is assumed.
7. The residuals/innovations standard deviation (sigma) must be greater than zero.
8. For the input argument (phi):
• The input argument is optional and can be omitted, in which case no AR component is included.
• The order of the parameters starts with the lowest lag.
• The order of the AR component model is solely determined by the order of the last value in the array with a numeric value (vs. missing or error).
9. For the input argument (theta):
• The input argument is optional and can be omitted, in which case no MA component is included.
• The order of the parameters starts with the lowest lag.
• The order of the MA component model is solely determined by the order of the last value in the array with a numeric value (vs. missing or error).
Exceptions
Exception Type Condition
None N/A
Requirements
Namespace NumXLAPI SFSDK Public Static NumXLAPI.DLL
References
* Hamilton, J .D.; Time Series Analysis , Princeton University Press (1994), ISBN 0-691-04289-6
* Tsay, Ruey S.; Analysis of Financial Time Series John Wiley & SONS. (2005), ISBN 0-471-690740
* D. S.G. Pollock; Handbook of Time Series Analysis, Signal Processing, and Dynamics; Academic Press; Har/Cdr edition(Nov 17, 1999), ISBN: 125609906
* Box, Jenkins and Reisel; Time Series Analysis: Forecasting and Control; John Wiley & SONS.; 4th edition(Jun 30, 2008), ISBN: 470272848


text:
# Comprehensive Psychotherapeutic Interventions Rating Scale (CPIRS)

The Comprehensive Psychotherapeutic Interventions Rating Scale (CPIRS) was designed to study different orientations of psychotherapy used in researched practices. It is a way to measure treatment adherence and/or treatment differentiation.

### Psychotherapeutic methods described in this scale

Client Centered, psychodynamic, behavioral, cognitive, group psychodynamic, and systemic orientations are included in the CPIRS.

Apart from these orientations, interventions and attitudes derived from common factors are included. The scale is also useful in determining how far the treatment is eclectic/integrative or pure form.

### Validity Studies

3 Studies were carried out, that are also presented in this article to validate this scale.

The first 2 studies indicated unconvincing differentiation between psychodynamic therapies and experiential therapies studied.  The differentiation was clearer in the third study.

## Bibliography

Trijsburg, R. W., Frederiks, G. C., Gorlee, M., Klouwer, E., den Hollander, A. M., & Duivenvoorden, H. J. (2002). Development of the comprehensive psychotherapeutic interventions rating scale (CPIRS). Psychotherapy Research12(3), 287-317.


text:
# Confused with equation of plane

The equation of plane:

$$Ax + By + Cz = d$$

Where $$A \hat i + B \hat j + C \hat k$$ is the normal vector $$\vec n$$ perpendicular to the plane.

The position vector $$\vec r = x \hat i + y \hat j + z \hat k$$

Then,

$$\vec r \cdot \vec n = d$$

This last equation says that a position vector to any point on the plane has the same projection along $$\vec n$$ because $$d$$ is a constant.

But I can't see that graphically. Different position vectors to the plane have different slopes, while the normal vector of the plane is always perpendicular and doesn't change, so how does every position vector to any point on the plane have the same projection along $$\vec n$$? Thank you.

• Yes, they have. It is the position vector of the orthogonal projection of the origin onto the plane. – Bernard Feb 21 '19 at 16:19
• Have a look at goo.gl/images/HjdXrF. – amd Feb 21 '19 at 23:37

I like to think of it in terms of orthogonality. Let $$(x_0,y_0,z_0)$$ be a point on the plane, and consider the position vector $$\vec r_0 = x_0 \hat\imath + y_0 \hat\jmath + z_0 \hat k$$. Since the point is on the plane $$\vec r_0 \cdot \vec n = d$$ too. So the plane equation becomes $$\vec r \cdot \vec n = \vec r_0 \cdot \vec n \implies (\vec r-\vec r_0)\cdot \vec n = 0$$ This says that the vector drawn from $$(x_0,y_0,z_0)$$ to $$(x,y,z)$$ is perpendicular to $$\vec n$$.


text:
# Introduction

Note: this post is not yet complete. What is described in it allows to do some simple tests between CAN and ROS, but does now allow yet to pilot the wheels, and the robot. I will update this post as soon as I will have done more config.

Before using the KYDBL 2430-1E brushless controller with ROS, SocketCAN and CANOpen, we need to configure SocketCAN  the ROS CANOpen stack.

The steps are the following:

1. Setup SocketCAN for automatic startup
2. Create the network device
3. the rest will come later 😉

# Setup SocketCAN for automatic startup

In a previous post, we put together information we collected on the way to start SocketCAN. However, we had to re-type all the commands each time we wanted to start it. We now need to configure it to make sure the whole SocketCAN stack starts automatically.

In order to automatically load SocketCAN drivers, you just have to create or modify the file /etc/modules as shown below.

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
can
can_raw
can_dev

When you reboot the system, you should now see the modules with “lsmod”.

## Setting CANOpen device name

You certainly noticed that sometime, when you plug out an USB device and plug it in again after a small while, its device name. For example, /dev/ttyUSB0 could have changed to /dev/ttyUSB1. This is not a big issue when you deal manually with software,  but it quickly become very annoying when you would like to automate scripts, software, etc. We would like to make sure that USB device name is predictable and remains the same.

Solving that issue is rather easy. You just have to add a “udev” rule. To do that,  go into folder “/etc/udev/rules.d”. In that folder, create a file called “99-usb_can.rules” (or another name, but with .rules extension). In that file, add the following parameter:

SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="canbus"

If you unplug and plug again your USB device, you will seen a new link entry /etc/canbus pointing to the USB device name (/etc/ttyUSB0 for example). The real device name might change, but the link on it will always be the one defined above.

You can find the idVendor and idProduct in he log file, with the dmesg command.

# Create the network device

Create a file, called init_can, in the folder where your ROS configuration are stored. The file should contain the following commands:

#!/bin/bash
#
# Initialize SocketCAN
#
# set -x
echo "Initialize SocketCAN"
sudo slcand -o -c -f -s4 /dev/canbus can0
sudo ifconfig can0 up

Note: the KYDBL 2430-1E brushless controller seems to have some difficulties wit high CAN bus bit rate. Therefore we limited it to 125 kbps (-s4) for the time being

# Checking if CANOpen is working

Now it is time to test if ROS can see CANOpen device. My systems configuration are the following:

• Ubuntu 16.04
• ROS Lunar installed. I’m using the official Ubuntu distribution
• Interface is available (you can see a can0 interface with ifconfig)
• Keya brushless controller connected the the CAN bus with following parameters (configured via Keya configuration tool):
• ID: 11
• Baud rate: H125
• Heartbeat: 500ms
• Self start: Open

If everything has been configured, turn brush-less controller power on and type:

rosrun socketcan_interface socketcan_dump can0

You should now see the keep alive packets arriving.

# Sending a command to the controller

Now the keep alive packets are arriving: this is telling that the brushless controller is working and that we have configured the network correctly. The next test is sending a command to the controller.

I connected a brushless motor to the controller, tested it with the Keya software. We will send a command to run the motor.

The motor will run at his maximum speed: so be very careful and make sure no objects are near the moving parts and make sure the motor is attached.

Type the following command (assuming the brushless controller is configured as above):

cansend can0 70B#23.00.20.01.e8.03.00.00

Normally, the motor will run, and stop a small while after. To keep the motor running, the command has to be send periodically.

# Sending commands via ROS canopen_motor_node

In order to send commands to motors and make the robot moving, we needs to configure  canopen_motor_node. This ros node requires several configuration files:

• One eds configuration file per controller or controller type.
• One or more yaml configuration files. You can put everything in one file, but, depending on the robot complexity, it might be easier to split configuration between files.

## EDS file

The eds file (Electronic Data Sheet) contains the description of the capabilities of the CANOpen device. After deep search, I did not find a correct file for the Keya 2430-1E brush-less controller: therefore I created my own eds file that can be found here. This Electronic Data Sheet contains the minimum require information to get canopen_motor_node running.

# More will come soon

1. wow, thx alot for this post.
i’m in the process of purchasing dual channel controller, 30A from jinan keya to handle 2 BLDC motor. that blue one.

it is said already support CANopen. after reading your post, i can go with this with confident.

just wondering how ROS talk to this controller? create node or topic for each command?

Simba
1. Hello,
First of all, I can only speak for the single channel (the red one) as I did not test the other.
Yes, it is CANOpen ready, however, it is not activated by default: you have to sold two jumper on the board of the KYDBL 2430-1E ( I don’t know for the other.)
There is a software to configure the Jinan Keya devices, but it is not directly available on their web site: you have to ask for it.
There is an EDS file, but you also have to ask for it.
It seems that the KYDBL 2430-1E has some issue with high bandwidth CAN operation: at the time being, I’m using it at 125 kbps.
I’m trying to use ros_canopen, but did not test yet: the doc is a bit light. I’m working on it and will update that post soon.

2. Hey thanks for the post, so useful!

Also, I am trying to do the same application with other motors and I was wondering, do you have to configure canopen_master first? what’s the difference between canopen_master, canopen_chain_mode and canopen_motor_node? I have taken a look to the documentation but I still don’t get it. Thanks!!

Felipe
1. Hello Felipe,

According to my understanding, canopen_motor_node is sufficient to control a motor. My configuration files are in https://github.com/gribot-robotics/gribot_ros. However, I put the configuration on old for the time being and commented the canopen_motor_node in the configuration as I had other issues to solve first. As soon as I will have a working canopen configuration I’ll update this post with it.

1. Thank you very much, I will check it out, also if I can develop something functional I will let you know!

Felipe

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


text:
## Automatic continuity of certain isomorphisms between regular Banach function algebras.(English)Zbl 0901.46042

If $$A$$ and $$B$$ are regular commutative semisimple Banach algebras then a linear map $$T:A\to B$$ is said to be separating (or disjointness preserving) if $$fg=0$$ implies $$TfTg=0$$. Here it is shown that if $$A$$ satisfies Ditkin’s condition then a separating bijection is necessarily continuous and its inverse is separating. If $$B$$ also satisfies Ditkin’s condition then the structure spaces of the two algebras are homeomorphic. In particular, it is shown that linear isometries between regular uniform algebras are separating; classical results, like the Banach-Stone theorem, follow.

### MSC:

 46H40 Automatic continuity
Full Text:

### References:

 [1] Reiter, Classical harmonic analvsis and locally compact groups (1968) · Zbl 0165.15601 [2] Font, Arch. Math. (Basel) 63 pp 158– (1994) · Zbl 0805.46049 [3] DOI: 10.1007/BF01246833 · Zbl 0666.46018 [4] Banach, Théorie des opérations linéaires (1932) [5] DOI: 10.1016/0022-1236(86)90003-0 · Zbl 0611.47030 [6] DOI: 10.1512/iumj.1983.32.32018 · Zbl 0488.47016 [7] DOI: 10.1016/S0166-8641(96)00132-0 · Zbl 0870.54018 [8] DOI: 10.1090/S0002-9947-97-01713-3 · Zbl 0869.46014 [9] DOI: 10.1006/jmaa.1995.1170 · Zbl 0828.47024 [10] Abramovich, Indag. Math. 45 pp 265– (1983) [11] DOI: 10.2996/kmj/1138844205 · Zbl 0166.40002 [12] Lamperti, Pacific J. Math. 8 pp 459– (1958) · Zbl 0085.09702 [13] DOI: 10.2307/2160705 · Zbl 0827.47051 [14] Jarosz, Canad. Math. Bull. 33 pp 139– (1990) · Zbl 0714.46040 [15] DOI: 10.1090/S0002-9904-1967-11735-X · Zbl 0172.41004 [16] DOI: 10.1017/S0013091500018745 · Zbl 0807.47024 [17] Hewitt, Abstract harmonic analysis II (1963) [18] DOI: 10.1007/BF02568002 · Zbl 0827.46032 [19] Yap, Studia Math. 40 pp 235– (1971) [20] DOI: 10.1016/0019-3577(96)81755-1 · Zbl 0840.43006 [21] Dales, Banach algebras and automatic continuity
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.


text:
# 3.3: Problem Size

The last example we’ll consider is removeAll; here’s the implementation in MyArrayList:

public boolean removeAll(Collection<?> collection) {
boolean flag = true;
for (Object obj: collection) {
flag &= remove(obj);
}
return flag;
}

Each time through the loop, removeAll invokes remove, which is linear. So it is tempting to think that removeAll is quadratic. But that’s not necessarily the case.

In this method, the loop runs once for each element in collection. If collection contains m elements and the list we are removing from contains n elements, this method is in  $$O(nm)$$. If the size of collection can be considered constant, removeAll is linear with respect to n. But if the size of the collection is proportional to n, removeAll is quadratic. For example, if collection always contains 100 or fewer elements, removeAll is linear. But if collection generally contains 1% of the elements in the list, removeAll is quadratic.

When we talk about problem size, we have to be careful about which size, or sizes, we are talking about. This example demonstrates a pitfall of algorithm analysis: the tempting shortcut of counting loops. If there is one loop, the algorithm is often linear. If there are two loops (one nested inside the other), the algorithm is often quadratic. But be careful! You have to think about how many times each loop runs. If the number of iterations is proportional to n for all loops, you can get away with just counting the loops. But if, as in this example, the number of iterations is not always proportional to n, you have to give it more thought.


text:
# Python-control/Example: Vertical takeoff and landing aircraft

This page demonstrates the use of the python-control package for analysis and design of a controller for a vectored thrust aircraft model that is used as a running example through the text Feedback Systems by Astrom and Murray. This example makes use of MATLAB compatible commands. The following files contain the code that is demonstrated here:

## System Description

This example uses a simplified model for a (planar) vertical takeoff and landing aircraft (PVTOL), as shown below:

The position and orientation of the center of mass of the aircraft is denoted by $$(x,y,\theta)$$, $$m$$ is the mass of the vehicle, $$J$$ the moment of inertia, $$g$$ the gravitational constant and $$c$$ the damping coefficient. The forces generated by the main downward thruster and the maneuvering thrusters are modeled as a pair of forces $$F_1$$ and $$F_2$$ acting at a distance $$r$$ below the aircraft (determined by the geometry of the thrusters).

It is convenient to redefine the inputs so that the origin is an equilibrium point of the system with zero input. Letting $$u_1 = F_1$$ and $$u_2 = F_2 - mg$$, the equations can be written in state space form as

 Parameter Value Comment $$m$$ 4 kg system mass $$J$$ 0.0475 kg m^2 system inertia $$r$$ 0.25 m thrust offset $$g$$ 9.8 m/s gravitational constant $$c$$ 0.05 N s/m rotational damping

## LQR state feedback controller

This section demonstrates the design of an LQR state feedback controller for the vectored thrust aircraft example. This example is pulled from Chapter 6 (State Feedback) of [http:www.cds.caltech.edu/~murray/amwiki Astrom and Murray]. The python code listed here are contained the the file pvtol-lqr.py.

To execute this example, we first import the libraries for SciPy, MATLAB plotting and the python-control package:

from numpy import *             # Grab all of the NumPy functions
from matplotlib.pyplot import * # Grab MATLAB plotting functions
from control.matlab import *    # MATLAB-like functions

The parameters for the system are given by

m = 4;                         # mass of aircraft
J = 0.0475;                    # inertia around pitch axis
r = 0.25;                      # distance to center of force
g = 9.8;                       # gravitational constant
c = 0.05;                      # damping factor (estimated)

The linearization of the dynamics near the equilibrium point $$x_e = (0, 0, 0, 0, 0, 0)$$, $$u_e = (0, mg)$$ are given by

# State space dynamics
xe = [0, 0, 0, 0, 0, 0];        # equilibrium point of interest
ue = [0, m*g];                  # (note these are lists, not matrices)

# Dynamics matrix (use matrix type so that * works for multiplication)
A = matrix(
[[ 0,    0,    0,    1,    0,    0],
[ 0,    0,    0,    0,    1,    0],
[ 0,    0,    0,    0,    0,    1],
[ 0, 0, (-ue[0]*sin(xe[2]) - ue[1]*cos(xe[2]))/m, -c/m, 0, 0],
[ 0, 0, (ue[0]*cos(xe[2]) - ue[1]*sin(xe[2]))/m, 0, -c/m, 0],
[ 0,    0,    0,    0,    0,    0 ]])

# Input matrix
B = matrix(
[[0, 0], [0, 0], [0, 0],
[cos(xe[2])/m, -sin(xe[2])/m],
[sin(xe[2])/m,  cos(xe[2])/m],
[r/J, 0]])

# Output matrix
C = matrix([[1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0]])
D = matrix([[0, 0], [0, 0]])

To compute a linear quadratic regulator for the system, we write the cost function as

where $$z = z - z_e$$ and $$v = u - u_e$$ represent the local coordinates around the desired equilibrium point $$(z_e, u_e)$$. We begin with diagonal matrices for the state and input costs:

Qx1 = diag([1, 1, 1, 1, 1, 1]);
Qu1a = diag([1, 1]);
(K, X, E) = lqr(A, B, Qx1, Qu1a); K1a = matrix(K);

This gives a control law of the form $$v = -K z$$, which can then be used to derive the control law in terms of the original variables:

$$u = v + u_d = - K(z - z_d) + u_d.$$

where $$u_d = (0, mg)$$ and $$z_d = (x_d, y_d, 0, 0, 0, 0)$$

Since the python-control package only supports SISO systems, in order to compute the closed loop dynamics, we must extract the dynamics for the lateral and altitude dynamics as individual systems. In addition, we simulate the closed loop dynamics using the step command with $$K x_d$$ as the input vector (assumes that the "input" is unit size, with $$xd$$ corresponding to the desired steady state. The following code performs these operations:

xd = matrix([[1], [0], [0], [0], [0], [0]]);
yd = matrix([[0], [1], [0], [0], [0], [0]]);

# Indices for the parts of the state that we want
lat = (0,2,3,5);
alt = (1,4);

# Decoupled dynamics
Ax = (A[lat, :])[:, lat];       #! not sure why I have to do it this way
Bx = B[lat, 0]; Cx = C[0, lat]; Dx = D[0, 0];

Ay = (A[alt, :])[:, alt];       #! not sure why I have to do it this way
By = B[alt, 1]; Cy = C[1, alt]; Dy = D[1, 1];

# Step response for the first input
H1ax = ss(Ax - Bx*K1a[0,lat], Bx*K1a[0,lat]*xd[lat,:], Cx, Dx);
(Tx, Yx) = step(H1ax, T=linspace(0,10,100));

# Step response for the second input
H1ay = ss(Ay - By*K1a[1,alt], By*K1a[1,alt]*yd[alt,:], Cy, Dy);
(Ty, Yy) = step(H1ay, T=linspace(0,10,100));

plot(Tx, Yx[0,:].T, '-', Ty, Yy[0,:].T, '--'); hold(True);
plot([0, 10], [1, 1], 'k-'); hold(True);
ylabel('position');
legend(('x', 'y'), loc='lower right');

The response of the closed loop system to a step change in the desired position is shown below.

 Step response in $$x$$ and $$y$$ Effect of control weight $$\rho$$

The plot on the left shows the $$x$$ and $$y$$ positions of the aircraft when it is commanded to move 1 m in each direction.

The response can be tuned by adjusting the weights in the LQR cost. The plot on the right shows the $$x$$ motion for control weights $$\rho = 1$$, $$10^2$$, $$10^4$$. A higher weight of the input term in the cost function causes a more sluggish response. It is created using the code:

# Look at different input weightings
Qu1a = diag([1, 1]); (K1a, X, E) = lqr(A, B, Qx1, Qu1a);
H1ax = ss(Ax - Bx*K1a[0,lat], Bx*K1a[0,lat]*xd[lat,:], Cx, Dx);

Qu1b = (40**2)*diag([1, 1]); (K1b, X, E) = lqr(A, B, Qx1, Qu1b);
H1bx = ss(Ax - Bx*K1b[0,lat], Bx*K1b[0,lat]*xd[lat,:],Cx, Dx);

Qu1c = (200**2)*diag([1, 1]); (K1c, X, E) = lqr(A, B, Qx1, Qu1c);
H1cx = ss(Ax - Bx*K1c[0,lat], Bx*K1c[0,lat]*xd[lat,:],Cx, Dx);

[T1, Y1] = step(H1ax, T=linspace(0,10,100));
[T2, Y2] = step(H1bx, T=linspace(0,10,100));
[T3, Y3] = step(H1cx, T=linspace(0,10,100));

plot(T1, Y1[0,:].T, 'b-'); hold(True);
plot(T2, Y2[0,:].T, 'b-'); hold(True);
plot(T3, Y3[0,:].T, 'b-'); hold(True);
plot([0 ,10], [1, 1], 'k-'); hold(True);

axis([0, 10, -0.1, 1.4]);
# arcarrow([1.3, 0.8], [5, 0.45], -6);
text(5.3, 0.4, 'rho');

## Lateral control using inner/outer loop design

This section demonstrates the design of loop shaping controller for the vectored thrust aircraft example. This example is pulled from Chapter 11 (Frequency Domain Design) of [http:www.cds.caltech.edu/~murray/amwiki Astrom and Murray]. The python code listed here are contained the the file pvtol-nested.py.

To design a controller for the lateral dynamics of the vectored thrust aircraft, we make use of a "inner/outer" loop design methodology. We begin by representing the dynamics using the block diagram

where

$$H_{\theta u_1} = \frac{r}{J s^2}, \qquad H_{x u_1} = \frac{J s^2 - m g r}{J s^2 (m s^2 + c s)}.$$

The controller is constructed by splitting the process dynamics and controller into two components: an inner loop consisting of the roll dynamics $$P_i$$ and control $$C_i$$ and an outer loop consisting of the lateral position dynamics $$P_o$$ and controller $$C_o$$.

The closed inner loop dynamics $$H_i$$ control the roll angle of the aircraft using the vectored thrust while the outer loop controller $$C_o$$ commands the roll angle to regulate the lateral position.

The following code imports the libraries that are required and defines the dynamics:

from matplotlib.pyplot import * # Grab MATLAB plotting functions
from control.matlab import *    # MATLAB-like functions

# System parameters
m = 4;                         # mass of aircraft
J = 0.0475;                    # inertia around pitch axis
r = 0.25;                      # distance to center of force
g = 9.8;                       # gravitational constant
c = 0.05;                      # damping factor (estimated)

# Transfer functions for dynamics
Pi = tf([r], [J, 0, 0]);       # inner loop (roll)
Po = tf([1], [m, c, 0]);       # outer loop (position)

For the inner loop, use a lead compensator

k = 200;  a = 2;  b = 50
Ci = k*tf([1, a], [1, b])              # lead compensator
Li = Pi*Ci

The closed loop dynamics of the inner loop, $$H_i$$, are given by

Hi = parallel(feedback(Ci, Pi), -m*g*feedback(Ci*Pi, 1));

Finally, we design the lateral compensator using another lead compenstor

# Now design the lateral control system
a = 0.02; b = 5; K = 2;
Co = -K*tf([1, 0.3], [1, 10]);         # another lead compensator
Lo = -m*g*Po*Co;

The performance of the system can be characterized using the sensitivity function and the complementary sensitivity function

L = Co*Hi*Po;
S = feedback(1, L);
T = feedback(L, 1);

The frequency response and Nyquist plot for the loop transfer function are computing using the commands

bode(L));

nyquist(L, (0.0001, 1000));
axis([-700, 5300, -3000, 3000]);

gangof4(Hi*Po, Co);

The corresponding plots are shown below:

 Bode plot Nyquist plot Gang of 4


text:
# Counting problem (complexity)

Jump to: navigation, search

In computational complexity theory and computability theory, a counting problem is a type of computational problem. If R is a search problem then

${\displaystyle c_{R}(x)=\vert \{y\mid R(x,y)\}\vert \,}$

is the corresponding counting function and

${\displaystyle \#R=\{(x,y)\mid y\leq c_{R}(x)\}}$

denotes the corresponding counting problem.

Note that cR is a search problem while #R is a decision problem, however cR can be C Cook reduced to #R (for appropriate C) using a binary search (the reason #R is defined the way it is, rather than being the graph of cR, is to make this binary search possible).

## Counting complexity class

If NC is a complexity class associated with non-deterministic machines then #C = {#R | RNC} is the set of counting problems associated with each search problem in NC. In particular, #P is the class of counting problems associated with NP search problems.


text:
# NAG FL Interfaced02pef (ivp_rkts_range)

## 1Purpose

d02pef solves an initial value problem for a first-order system of ordinary differential equations using Runge–Kutta methods.

## 2Specification

Fortran Interface
 Subroutine d02pef ( f, n, tgot, ygot, ymax,
 Integer, Intent (In) :: n Integer, Intent (Inout) :: iuser(*), iwsav(130), ifail Real (Kind=nag_wp), Intent (In) :: twant Real (Kind=nag_wp), Intent (Inout) :: ygot(n), ymax(n), ruser(*), rwsav(32*n+350) Real (Kind=nag_wp), Intent (Out) :: tgot, ypgot(n) External :: f
#include <nag.h>
 void d02pef_ (void (NAG_CALL *f)(const double *t, const Integer *n, const double y[], double yp[], Integer iuser[], double ruser[]),const Integer *n, const double *twant, double *tgot, double ygot[], double ypgot[], double ymax[], Integer iuser[], double ruser[], Integer iwsav[], double rwsav[], Integer *ifail)
The routine may be called by the names d02pef or nagf_ode_ivp_rkts_range.

## 3Description

d02pef and its associated routines (d02pqf, d02ptf and d02puf) solve an initial value problem for a first-order system of ordinary differential equations. The routines, based on Runge–Kutta methods and derived from RKSUITE (see Brankin et al. (1991)), integrate
 $y′=ft,y given yt0=y0$
where $y$ is the vector of $\mathit{n}$ solution components and $t$ is the independent variable.
d02pef is designed for the usual task, namely to compute an approximate solution at a sequence of points. You must first call d02pqf to specify the problem and how it is to be solved. Thereafter you call d02pef repeatedly with successive values of twant, the points at which you require the solution, in the range from tstart to tend (as specified in d02pqf). In this manner d02pef returns the point at which it has computed a solution tgot (usually twant), the solution there (ygot) and its derivative (ypgot). If d02pef encounters some difficulty in taking a step toward twant, then it returns the point of difficulty (tgot) and the solution and derivative computed there (ygot and ypgot, respectively).
In the call to d02pqf you can specify either the first step size for d02pef to attempt or that it computes automatically an appropriate value. Thereafter d02pef estimates an appropriate step size for its next step. This value and other details of the integration can be obtained after any call to d02pef by a call to d02ptf. The local error is controlled at every step as specified in d02pqf. If you wish to assess the true error, you must set method to a positive value in the call to d02pqf. This assessment can be obtained after any call to d02pef by a call to d02puf.
For more complicated tasks, you are referred to routines d02pff, d02prf and d02psf, all of which are used by d02pef.

## 4References

Brankin R W, Gladwell I and Shampine L F (1991) RKSUITE: A suite of Runge–Kutta codes for the initial value problems for ODEs SoftReport 91-S1 Southern Methodist University

## 5Arguments

1: $\mathbf{f}$Subroutine, supplied by the user. External Procedure
f must evaluate the functions ${f}_{i}$ (that is the first derivatives ${y}_{i}^{\prime }$) for given values of the arguments $t$, ${y}_{i}$.
The specification of f is:
Fortran Interface
 Subroutine f ( t, n, y, yp,
 Integer, Intent (In) :: n Integer, Intent (Inout) :: iuser(*) Real (Kind=nag_wp), Intent (In) :: t, y(n) Real (Kind=nag_wp), Intent (Inout) :: ruser(*) Real (Kind=nag_wp), Intent (Out) :: yp(n)
 void f_ (const double *t, const Integer *n, const double y[], double yp[], Integer iuser[], double ruser[])
1: $\mathbf{t}$Real (Kind=nag_wp) Input
On entry: $t$, the current value of the independent variable.
2: $\mathbf{n}$Integer Input
On entry: $n$, the number of ordinary differential equations in the system to be solved.
3: $\mathbf{y}\left({\mathbf{n}}\right)$Real (Kind=nag_wp) array Input
On entry: the current values of the dependent variables, ${y}_{\mathit{i}}$, for $\mathit{i}=1,2,\dots ,\mathit{n}$.
4: $\mathbf{yp}\left({\mathbf{n}}\right)$Real (Kind=nag_wp) array Output
On exit: the values of ${f}_{\mathit{i}}$, for $\mathit{i}=1,2,\dots ,\mathit{n}$.
5: $\mathbf{iuser}\left(*\right)$Integer array User Workspace
6: $\mathbf{ruser}\left(*\right)$Real (Kind=nag_wp) array User Workspace
f is called with the arguments iuser and ruser as supplied to d02pef. You should use the arrays iuser and ruser to supply information to f.
f must either be a module subprogram USEd by, or declared as EXTERNAL in, the (sub)program from which d02pef is called. Arguments denoted as Input must not be changed by this procedure.
Note: f should not return floating-point NaN (Not a Number) or infinity values, since these are not handled by d02pef. If your code inadvertently does return any NaNs or infinities, d02pef is likely to produce unexpected results.
2: $\mathbf{n}$Integer Input
On entry: $n$, the number of ordinary differential equations in the system to be solved.
Constraint: ${\mathbf{n}}\ge 1$.
3: $\mathbf{twant}$Real (Kind=nag_wp) Input
On entry: $t$, the next value of the independent variable where a solution is desired.
Constraint: twant must be closer to tend than the previous value of tgot (or tstart on the first call to d02pef); see d02pqf for a description of tstart and tend. twant must not lie beyond tend in the direction of integration.
4: $\mathbf{tgot}$Real (Kind=nag_wp) Output
On exit: $t$, the value of the independent variable at which a solution has been computed. On successful exit with ${\mathbf{ifail}}={\mathbf{0}}$, tgot will equal twant. On exit with ${\mathbf{ifail}}>{\mathbf{1}}$, a solution has still been computed at the value of tgot but in general tgot will not equal twant.
5: $\mathbf{ygot}\left({\mathbf{n}}\right)$Real (Kind=nag_wp) array Input/Output
On entry: on the first call to d02pef, ygot need not be set. On all subsequent calls ygot must remain unchanged.
On exit: an approximation to the true solution at the value of tgot. At each step of the integration to tgot, the local error has been controlled as specified in d02pqf. The local error has still been controlled even when ${\mathbf{tgot}}\ne {\mathbf{twant}}$, that is after a return with ${\mathbf{ifail}}>{\mathbf{1}}$.
6: $\mathbf{ypgot}\left({\mathbf{n}}\right)$Real (Kind=nag_wp) array Output
On exit: an approximation to the first derivative of the true solution at tgot.
7: $\mathbf{ymax}\left({\mathbf{n}}\right)$Real (Kind=nag_wp) array Input/Output
On entry: on the first call to d02pef, ymax need not be set. On all subsequent calls ymax must remain unchanged.
On exit: ${\mathbf{ymax}}\left(i\right)$ contains the largest value of $\left|{y}_{i}\right|$ computed at any step in the integration so far.
8: $\mathbf{iuser}\left(*\right)$Integer array User Workspace
9: $\mathbf{ruser}\left(*\right)$Real (Kind=nag_wp) array User Workspace
iuser and ruser are not used by d02pef, but are passed directly to f and may be used to pass information to this routine.
10: $\mathbf{iwsav}\left(130\right)$Integer array Communication Array
11: $\mathbf{rwsav}\left(32×{\mathbf{n}}+350\right)$Real (Kind=nag_wp) array Communication Array
On entry: these must be the same arrays supplied in a previous call to d02pqf. They must remain unchanged between calls.
On exit: information about the integration for use on subsequent calls to d02pef or other associated routines.
12: $\mathbf{ifail}$Integer Input/Output
On entry: ifail must be set to $0$, . If you are unfamiliar with this argument you should refer to Section 4 in the Introduction to the NAG Library FL Interface for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value is recommended. If the output of error messages is undesirable, then the value $1$ is recommended. Otherwise, because for this routine the values of the output arguments may be useful even if ${\mathbf{ifail}}\ne {\mathbf{0}}$ on exit, the recommended value is $-1$. When the value is used it is essential to test the value of ifail on exit.
On exit: ${\mathbf{ifail}}={\mathbf{0}}$ unless the routine detects an error or a warning has been flagged (see Section 6).

## 6Error Indicators and Warnings

If on entry ${\mathbf{ifail}}=0$ or $-1$, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
${\mathbf{ifail}}=1$
On entry, a previous call to the setup routine has not been made or the communication arrays have become corrupted.
On entry, ${\mathbf{n}}=〈\mathit{\text{value}}〉$, but the value passed to the setup routine was ${\mathbf{n}}=〈\mathit{\text{value}}〉$.
On entry, the communication arrays have become corrupted, or a catastrophic error has already been detected elsewhere. You cannot continue integrating the problem.
To start a new problem, you will need to call the setup routine.
twant does not lie in the direction of integration. ${\mathbf{twant}}=〈\mathit{\text{value}}〉$.
twant is too close to the last value of tgot (tstart on setup).
When using the method of order $8$ at setup, these must differ by at least $〈\mathit{\text{value}}〉$. Their absolute difference is $〈\mathit{\text{value}}〉$.
twant lies beyond tend (setup) in the direction of integration, but is very close to tend.
You may have intended ${\mathbf{twant}}={\mathbf{tend}}$.
$\left|{\mathbf{twant}}-{\mathbf{tend}}\right|=〈\mathit{\text{value}}〉$.
twant lies beyond tend (setup) in the direction of integration.
${\mathbf{twant}}=〈\mathit{\text{value}}〉$ and ${\mathbf{tend}}=〈\mathit{\text{value}}〉$.
You cannot call this routine after it has returned an error.
You must call the setup routine to start another problem.
You cannot call this routine when you have specified, in the setup routine, that the step integrator will be used.
${\mathbf{ifail}}=2$
This routine is being used inefficiently because the step size has been reduced drastically many times to obtain answers at many points. Using the order $4$ and $5$ pair method at setup is more appropriate here. You can continue integrating this problem.
${\mathbf{ifail}}=3$
Approximately $〈\mathit{\text{value}}〉$ function evaluations have been used to compute the solution since the integration started or since this message was last printed. However, you can continue integrating the problem.
${\mathbf{ifail}}=4$
Approximately $〈\mathit{\text{value}}〉$ function evaluations have been used to compute the solution since the integration started or since this message was last printed. Your problem has been diagnosed as stiff. If the situation persists, it will cost roughly $〈\mathit{\text{value}}〉$ times as much to reach tend (setup) as it has cost to reach the current time. You should probably call routines intended for stiff problems. However, you can continue integrating the problem.
${\mathbf{ifail}}=5$
In order to satisfy your error requirements the solver has to use a step size of $〈\mathit{\text{value}}〉$ at the current time, $〈\mathit{\text{value}}〉$. This step size is too small for the machine precision, and is smaller than $〈\mathit{\text{value}}〉$.
${\mathbf{ifail}}=6$
The global error assessment algorithm failed at start of integration.
The integration is being terminated.
The global error assessment may not be reliable for times beyond $〈\mathit{\text{value}}〉$.
The integration is being terminated.
${\mathbf{ifail}}=-99$
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
${\mathbf{ifail}}=-399$
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

## 7Accuracy

The accuracy of integration is determined by the arguments tol and thresh in a prior call to d02pqf (see the routine document for d02pqf for further details and advice). Note that only the local error at each step is controlled by these arguments. The error estimates obtained are not strict bounds but are usually reliable over one step. Over a number of steps the overall error may accumulate in various ways, depending on the properties of the differential system.

## 8Parallelism and Performance

d02pef makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

If d02pef returns with ${\mathbf{ifail}}={\mathbf{5}}$ and the accuracy specified by tol and thresh is really required then you should consider whether there is a more fundamental difficulty. For example, the solution may contain a singularity. In such a region the solution components will usually be large in magnitude. Successive output values of ygot and ymax should be monitored (or d02pff should be used since this takes one integration step at a time) with the aim of trapping the solution before the singularity. In any case numerical integration cannot be continued through a singularity, and analytical treatment may be necessary.
Performance statistics are available after any return from d02pef by a call to d02ptf. If ${\mathbf{method}}>0$ in the call to d02pqf, global error assessment is available after a return from d02pef with ${\mathbf{ifail}}={\mathbf{0}}$, ${\mathbf{2}}$, ${\mathbf{3}}$, ${\mathbf{4}}$, ${\mathbf{5}}$ or ${\mathbf{6}}$ by a call to d02puf.
After a failure with ${\mathbf{ifail}}={\mathbf{5}}$ or ${\mathbf{6}}$ each of the diagnostic routines d02ptf and d02puf may be called only once.
If d02pef returns with ${\mathbf{ifail}}={\mathbf{4}}$ then it is advisable to change to another code more suited to the solution of stiff problems. d02pef will not return with ${\mathbf{ifail}}={\mathbf{4}}$ if the problem is actually stiff but it is estimated that integration can be completed using less function evaluations than already computed.

## 10Example

This example solves the equation
 $y′′=-y, y0=0, y′0=1$
reposed as
 $y1′=y2$
 $y2′=-y1$
over the range $\left[0,2\pi \right]$ with initial conditions ${y}_{1}=0.0$ and ${y}_{2}=1.0$. Relative error control is used with threshold values of $\text{1.0E−8}$ for each solution component and compute the solution at intervals of length $\pi /4$ across the range. A low-order Runge–Kutta method (see d02pqf) is also used with tolerances ${\mathbf{tol}}=\text{1.0E−3}$ and ${\mathbf{tol}}=\text{1.0E−4}$ in turn so that the solutions can be compared.


text:
# Showing a presentation is a permutation group.

This is Exercise 1.2.8 of "Combinatorial Group Theory: Presentations of Groups in Terms of Generators and Relations," by Magnus et al.

## The Question:

Show that the group $$\langle a, b, c\mid a^3, b^2, ab=ba^2, c^2, ac=ca, bc=cb\rangle$$ has order $12$ and find a permutation group isomorphic to it.

## My Attempt:

By inspection, every word can be reduced to $a^\alpha b^\beta c^\gamma$, where $\alpha\in\{0, 1, 2\}, \beta\in\{0, 1\}, \gamma\in \{0, 1\}$, which gives a total of $3\times 2\times 2=12$ elements.

One can see that, since $$\mathcal S_3=\langle a, b\mid a^3, b^2, ab=ba^2\rangle$$ under the mapping $\theta: a\mapsto (123), b\mapsto (12)$ and $C_2=\langle c\mid c^2\rangle$, we have $$\mathcal S_3\times C_2=\langle a, b, c\mid a^3, b^2, ab=ba^2, c^2, ac=ca, bc=cb\rangle$$ is the dihedral group of order $12$. But that doesn't help since I can't add on, say, $\theta(c)=(14)$ because $(12)(14)=(142)\neq(124)=(14)(12)$; that is, $b$ and $c$ don't commute.

I'm stuck finding a permutation group the presentation in question is isomorphic to.

The easiest way for two permutations to commute is to have disjoint support. (To use different symbols.) So, once you've got $a$ and $b$ figured out, with support $\{1,2,3\}$, and you want $c$ to commute, the easiest way to do that is to set $c=(45)$.
Eg, the four right cosets of $\langle a\rangle$ are $\langle a\rangle$, $\langle a\rangle b$, $\langle a\rangle c$ and $\langle a\rangle bc$. Call these $1, 2, 3$ and $4$. Each element of $G$ permutes them by right multiplication, for example $b$ sends $\langle a\rangle$ to $\langle a\rangle b$, $\langle a\rangle b$ to $\langle a\rangle b^2$ = $\langle a\rangle$, $\langle a\rangle c$ to $\langle a\rangle cb$ = $\langle a\rangle bc$, and $\langle a\rangle bc$ to $\langle a\rangle bcb$ = $\langle a\rangle c$, so $b$ would be $(12)(34)$.
• You can use a coset enumeration method. Start with a subgroup, say $H=\langle a\rangle$, and then let AllCosets and NewCosets be {H}. Then repeat: (1) Choose an element to remove from NewCosets (2) Multiply it by each of the generators, adding any new cosets to NewCosets and to AllCosets (3) Repeat 1&2 steps, untill NewCosets is empty. Eg, given $H=\langle a\rangle$, the first pass adds new cosets $Hb$ and $Hc$ (but $Ha$ is not new), the second pass adds only $Hbc$, (since $Hba=Hba^4=Ha^2b=Hb$, $Hbb=H$, $Hca=Hac=Hc$, $Hcb=Hbc$ and $Hcc=H$), and that's all the cosets you get. – Michael Hartley Aug 1 '17 at 1:03
• In general, this gives you a permutation representation of a subgroup of $G$, but you can guarantee you get $G$ itself by choosing $H={1}$. This is Cayley's theorem. – Michael Hartley Aug 1 '17 at 1:04
• It looks like, for your example, cosets of $\langle a\rangle$ and $\langle c\rangle$ are no use, but $\langle b\rangle$ gives you a permutation representation on six points. – Michael Hartley Aug 1 '17 at 6:41


text:
# Find $\lim\limits_{x \to 0} \frac{(1+3x)^{1/3}-\sin(x)-1}{1-\cos(x)}$

I would like to find using Taylor series :

$$\lim\limits_{x \to 0} \frac{(1+3x)^{1/3}-\sin(x)-1}{1-\cos(x)}$$

So I compute the taylor series of the terms at the order $1$ :

$(1+3x)^{1/3}=1+x+o(x)$ and $-\sin x -1=-1-x+o(x)$ and $1-\cos(x)$ does not have a taylor series at the order $1$ so we have $0$ at the numerator and denominator when we search the limit for $x=0$, according to wolfram we should find $-2$, how is it possible ?

Thank you.

• Well done on using mathjax, just a tip: put slashes before your \sin and \cos to make them display a little nicer: $\sin$ $\cos$. – nathan.j.mcdougall Apr 16 '15 at 19:16
• You need to go to order $2$ in $(1+x)^{1/3}$ – egreg Apr 16 '15 at 19:19
• @Essam did you even read the post? It says very clearly "limits without lhopital" and using with Taylor series. – user223391 Apr 16 '15 at 19:19
• Or you could try multiplying by the denominator's conjugate, giving $\sin^2(x)$, which is much easier to work with. – nathan.j.mcdougall Apr 16 '15 at 19:20

Hint : develop to order 2. If you have 0/0, you did not take enough terms into account to understand how the numerator/denominator converge (in fact, the significant terms are still hidden in the $o(x)$)
$$\frac{(1+3x)^{1/3}-\sin x-1}{1-\cos x}$$
$$=\frac{1+\frac13\cdot3x+\frac13\left(\frac13-1\right)\dfrac{(3x)^2}{2!}+O(x^3)-\left[x+O(x^3)\right]-1}{1-\left[1-\dfrac{x^2}2+O(x^4)\right]}$$
$$=\frac{-x^2+O(x^3)}{\dfrac{x^2}2+O(x^4)}$$


text:
# How do you solve x/3 + 1/4 = 1?

Jul 12, 2015

color(blue)(x=9/4

#### Explanation:

$\frac{x}{3} + \frac{1}{4} = 1$

$\frac{4 x + 3}{12} = 1$

$4 x + 3 = 12$

$4 x = 9$

color(blue)(x=9/4


text:
# Suppose int_5^6f(x)dx = 6 and int_5^6g(x)dx=2. Evaluate int_5^6(4f(x)-2g(x))dx. Remember to include a "+ C"if appropriate.

Suppose ${\int }_{5}^{6}f\left(x\right)dx=6\phantom{\rule{1em}{0ex}}\text{and}\phantom{\rule{1em}{0ex}}{\int }_{5}^{6}g\left(x\right)dx=2$.
Evaluate ${\int }_{5}^{6}\left(4f\left(x\right)-2g\left(x\right)\right)dx$.
Remember to include a "+ C"if appropriate.
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Theodore Schwartz
Step 1
Use the basic properties of definite integrals to find the sum of these integrals.
Step 2
${\int }_{5}^{6}\left(4f\left(x\right)-2g\left(x\right)\right)dx={\int }_{5}^{6}4f\left(x\right)dx-{\int }_{5}^{6}2g\left(x\right)dx$
$=4{\int }_{5}^{6}f\left(x\right)dx-2{\int }_{5}^{6}g\left(x\right)dx$
$=4\left(6\right)-2\left(2\right)$
$=24-4=20$


text:
# 数学代写|数值分析代写numerical analysis代考|CIVL5458

## 数学代写|数值分析代写numerical analysis代考|Linear Iterative Methods

Definition $6.1$ (iterative method). Let $A \in \mathbb{C}^{n \times n}$ with $\operatorname{det}(\mathrm{A}) \neq 0$ and $f \in \mathbb{C}^n$. An iterative method to find an approximate solution to $A x=f$ is a process to generate a sequence of approximations $\left{\boldsymbol{x}k\right}{k=1}^{\infty}$ via an iteration of the form
$$x_k=\varphi\left(\mathrm{A}, f, x_{k-1}, \ldots, x_{k-r}\right),$$
given the starting values $\boldsymbol{x}0, \ldots, \boldsymbol{x}{r-1} \in \mathbb{C}^n$. Here,
$$\varphi(\cdot, \cdot \ldots \cdot \cdot): \mathbb{C}^{n \times n} \times \mathbb{C}^n \times \cdots \times \mathbb{C}^n \rightarrow \mathbb{C}^n$$
is called the iteration function. If $r=1$, we say that the process is a two-layer method; otherwise, we say it is a multilayer method.

Definition $6.2$ (linear iterative method). Let $\mathrm{A} \in \mathbb{C}^{n \times n}$ with $\operatorname{det}(\mathrm{A}) \neq 0$ and $\boldsymbol{f} \in \mathbb{C}^{\prime \prime}$. Set $\boldsymbol{x}=\mathrm{A}^{-1} \boldsymbol{f}$. I he two-layer iterative method
$$x_k=\varphi\left(\mathrm{A}, \boldsymbol{f}, \boldsymbol{x}{k-1}\right)$$ is said to be consistent if and only if $x-\varphi(\mathrm{A}, f, x)$, i.e., $x-\mathrm{A}^1 f$ is a fixed point of $\varphi(\mathbf{A}, \boldsymbol{f}, \cdot)$. The method is linear if and only if $$\varphi\left(\mathrm{A}, \alpha \boldsymbol{f}_1+\beta \boldsymbol{f}_2, \alpha \boldsymbol{x}_1+\beta \boldsymbol{x}_2\right)=\alpha \varphi\left(\mathrm{A}, \boldsymbol{f}_1, \boldsymbol{x}_1\right)+\beta \varphi\left(\mathrm{A}, \boldsymbol{f}_2, \boldsymbol{x}_2\right)$$ for all $\alpha, \beta \in \mathbb{C}$ and $\boldsymbol{f}_1, \boldsymbol{f}_2, \boldsymbol{x}_1, \boldsymbol{x}_2 \in \mathbb{C}^n$. Proposition $6.3$ (general form). Let $\mathrm{A} \in \mathbb{C}^{n \times n}$ with $\operatorname{det}(\mathrm{A}) \neq 0$ and $f \in \mathbb{C}^n$. Any two-layer, linear, and consistent method can be written in the form $$x{k+1}=x_k+\mathrm{Cr}\left(x_k\right)=x_k+\mathrm{C}\left(f-A x_k\right)$$
for some matrix $\mathrm{C} \in \mathbb{C}^{n \times n}$, where $r(z)=f-\mathrm{A} z$ is the residual vector.
Proof. A two-layer method is defined by an iteration function
$$\varphi(\cdot, \cdot, \cdot): \mathbb{C}^{n \times n} \times \mathbb{C}^n \times \mathbb{C}^n \rightarrow \mathbb{C}^n .$$
Given $\varphi$, define the operator
$$C=\varphi(\mathbf{A}, \mathbf{7}, \mathbf{0})$$

## 数学代写|数值分析代写numerical analysis代考|Spectral Convergence Theory

The theory in this section is based on properties of the spectrum $\sigma(\mathrm{T})$ of the error transfer matrix. In particular, with the tools developed in Section 4.1, we can provide conditions for a linear method to be convergent.

Theorem $6.8$ (convergence of linear methods). Suppose that $\mathrm{A}, \mathrm{B} \in \mathbb{C}^{n \times n}$ are invertible, $f, \boldsymbol{x}_0 \in \mathbb{C}^n$ are given, and $\boldsymbol{x}=\mathrm{A}^{-1} \boldsymbol{f}$.

1. The sequence $\left{\boldsymbol{x}k\right}{k=1}^{\infty}$ defined by the linear two-layer stationary iterative method (6.2) converges to $x$ for any starting point $x_0$ if and only if $\rho(T)<1$, where $T$ is the error transfer matrix $\mathrm{T}=\mathrm{I}_n-\mathrm{B}^{-1} \mathrm{~A}$.
2. A sufficient condition for the convergence of $\left{x_k\right}_{k=1}^{\infty}$ for any starting point $x_0$ is the condition that $|\mathrm{T}|<1$ for some induced matrix norm.
Proof. Before we begin the proof, observe that
$$\boldsymbol{e}k=T \boldsymbol{e}{k-1}=T^2 \boldsymbol{e}{k-2}=\cdots=T^k e_0 .$$ Also, observe that $\boldsymbol{x}_k \rightarrow \boldsymbol{x}=\mathrm{A}^{-1} \boldsymbol{f}$, as $k \rightarrow \infty$, if and only if $\boldsymbol{e}_k \rightarrow \mathbf{0}$, as $k \rightarrow \infty$. Suppose that $\boldsymbol{x}_k \rightarrow \boldsymbol{x}=\mathrm{A}^{-1} \boldsymbol{f}$, as $k \rightarrow \infty$, for any $\boldsymbol{x}_0$. Then $\boldsymbol{e}_k \rightarrow \mathbf{0}$, as $k \rightarrow \infty$, for any $\boldsymbol{e}_0$. Set $\boldsymbol{e}_0-\boldsymbol{w}$, where $(\lambda, \boldsymbol{w})$ is any eigenpair of $\mathrm{T}$, with $|\boldsymbol{w}|{\infty}-1$. Then
$$\boldsymbol{e}k=\lambda^k \boldsymbol{e}_0$$ and $$|\lambda|^k=|\lambda|^k|\boldsymbol{w}|{\infty}=\left|\boldsymbol{e}k\right|{\infty} \rightarrow 0 .$$
It follows that $|\lambda|<1$. Since $\lambda$ was arbitrary, $\rho(T)<1$.
If $\rho(T)<1$, appealing to Theorem $4.8$,
$$\lim {k \rightarrow \infty} e_k=\lim {k \rightarrow \infty} T^k e_0=\mathbf{0}$$
for any $\boldsymbol{e}_0$. Hence, $\boldsymbol{x}_k \rightarrow \boldsymbol{x}=\mathrm{A}^{-1} \boldsymbol{f}$, as $k \rightarrow \infty$, for any $\boldsymbol{x}_0$.

# 数值分析代考

## 数学代写|数值分析代写numerical analysis代考|Linear Iterative Methods

$$x_k=\varphi\left(\mathrm{A}, f, x_{k-1}, \ldots, x_{k-r}\right),$$

$$\varphi(\cdot, \cdots \cdots): \mathbb{C}^{n \times n} \times \mathbb{C}^n \times \cdots \times \mathbb{C}^n \rightarrow \mathbb{C}^n$$

$$x_k=\varphi(\mathrm{A}, \boldsymbol{f}, \boldsymbol{x} k-1)$$

$$\varphi\left(\mathrm{A}, \alpha \boldsymbol{f}_1+\beta \boldsymbol{f}_2, \alpha \boldsymbol{x}_1+\beta \boldsymbol{x}_2\right)=\alpha \varphi\left(\mathrm{A}, \boldsymbol{f}_1, \boldsymbol{x}_1\right)+\beta \varphi\left(\mathrm{A}, \boldsymbol{f}_2, \boldsymbol{x}_2\right)$$

$$x k+1=x_k+\mathrm{Cr}\left(x_k\right)=x_k+\mathrm{C}\left(f-A x_k\right)$$

$$\varphi(\cdot, \cdot, \cdot): \mathbb{C}^{n \times n} \times \mathbb{C}^n \times \mathbb{C}^n \rightarrow \mathbb{C}^n .$$

$$C=\varphi(\mathbf{A}, \mathbf{7}, \mathbf{0})$$

## 数学代写|数值分析代写numerical analysis代考|Spectral Convergence Theory

1. 序列 $\$ \backslash$left{\boldsymbol{x}$k \mid$right${k=1} \wedge{$infty} definedbythelineartwo – layerstationaryiterativemethod(6.2) convergestoX foranystartingpointx_0ifandonlyi$\backslash \mathrm{rho}(\mathrm{T})<1$, where 吨 istheerrortransfermatrix$\backslash \operatorname{mathrm}{T}=\backslash \operatorname{mathrm{ 1} } \mathrm{n} \backslash \backslash \operatorname{mathrm}{B} \wedge{-1} \backslash \operatorname{mathrm}{\sim A} \$$。 2. 收敛的充分条件 \backslash left{{_k\right} {k \mathrm{k}=1}^{\wedge}{ {infty} } 对于任何起点 x_0 条件是 |\mathrm{T}|<1 对于一些诱导矩阵 范数。 证明。在我们开始证明之前，观察 \ \$$
$\backslash$ boldsymbol ${e} k=T \backslash$ boldsymbol ${e}{k-1}=T^{\wedge} 2 \backslash$ boldsymbol{e} ${k-2}=\backslash c$ dots $=T^{\wedge} k$ e_ 0 .
Also, observethat $\$ \boldsymbol{x}k \rightarrow \boldsymbol{x}=\mathrm{A}^{-1} \boldsymbol{f} \$$, as \ k \rightarrow \infty \$$, ifandonlyif $\$ \boldsymbol{e}_k \rightarrow \mathbf{0} \$$, as \ k \rightarrow \infty \backslash boldsymbol{e} k=\mid l a m b d a^{\wedge} k \backslash |boldsymbol{e}_O and \left.|| \backslash a m b d a\right|^{\wedge} k=\left.|| \backslash a m b d a\right|^{\wedge} k|\backslash b o l d s y m b o l{w}| \backslash infty }=\backslash left||lboldsymbol{e } k \mid right \mid \bigwedge infty } \rightarrow 0 。 Itfollowsthat \|\lambda|<1 \$$.Since $\$ \lambda \$$wasarbitrary \ \rho(T)<1 \$$. If $\$ \rho(T)<1 \$$, appealin \backslash \lim {k \backslash rightarrow \backslash infty } e k=\backslash lim {k \backslash rightarrow \backslash infty } T^{\wedge} k e_{-} 0=\backslash mathbf {0} \ \$$
对于任何 $\boldsymbol{e}_0$. 因此， $\boldsymbol{x}_k \rightarrow \boldsymbol{x}=\mathrm{A}^{-1} \boldsymbol{f}$ ， 作为 $k \rightarrow \infty$ ，对于任何 $\boldsymbol{x}_0$.

myassignments-help数学代考价格说明

1、客户需提供物理代考的网址，相关账户，以及课程名称，Textbook等相关资料~客服会根据作业数量和持续时间给您定价~使收费透明，让您清楚的知道您的钱花在什么地方。

2、数学代写一般每篇报价约为600—1000rmb，费用根据持续时间、周作业量、成绩要求有所浮动(持续时间越长约便宜、周作业量越多约贵、成绩要求越高越贵)，报价后价格觉得合适，可以先付一周的款，我们帮你试做，满意后再继续，遇到Fail全额退款。

3、myassignments-help公司所有MATH作业代写服务支持付半款，全款，周付款，周付款一方面方便大家查阅自己的分数，一方面也方便大家资金周转，注意:每周固定周一时先预付下周的定金，不付定金不予继续做。物理代写一次性付清打9.5折。

Math作业代写、数学代写常见问题

myassignments-help擅长领域包含但不是全部:


text:
For the previous post, I had to brush up on my math to construct Thom’s egg. The diagonal lines start from the point where the bottom arc intersects the y-axis (x = 0):

If you were drawing this on paper, you could simply place your ruler along point A and the left circle centre and draw a line segment until you hit the circle. However, when drawing with p5.js you have to enter exact coordinates like this:

Point A is easily calculated. If the center of the sketch is (0, 0), the y-value of A is the (positive) radius of the bottom arc. Remember that the direction of the y-axis is reversed in computer graphics. To calculate point B, we have to algebraically figure out where the line segment starting from point A will intersect the left circle in the top left quadrant.

A circle can be defined as (x - h)^2 + (y - k)^2 = r^2, with radius r and (h, k) as its centre coordinate. A line can be defined as y = mx + n, where m is the slope or gradient and n is the y-intercept.

Before we go all out with the variables, let’s take a look at a basic example. Given r = 2 with centre (0, 0) and line y = x - 2, at which points will the line intersect with the circle?

(x - 0)^2 + (y - 0)^2 = 2^2, simplify to:
x^2 + y^2 = 2^2

We can substitute y in the circle equation with x - 2, so we can solve for x:

x^2 + (x - 2)^2 = 2^2

Expand and combine like terms:

x^2 + (x - 2)(x - 2) = 2^2
x^2 + x^2 - 2x -2x + 4 = 2^2
2x^2 - 4x + 4 = 2^2
2x^2 - 4x + 4 - 2^2 = 0
2x^2 - 4x = 0

We now have a quadratic equation (ax^2 + bx - c = 0) that we can solve with the quadratic formula:

x = (-b +- \sqrt{b^2 - 4ac}) / (2a)

We first check if the equation has any solutions by calculating the discriminant:

D = b^2 - 4ac

There are 3 possible outcomes:

1. D > 0, there are two different solutions.
2. D = 0, there is one solution (or two solutions with the same value).
3. D < 0, there are no solutions.

In the case of a = 2, b = -4 and c = 0 there are 2 solutions. Let’s find out what they are:

x_1 = (4 + \sqrt{4^2 - 4 * 2 * 0}) / (2 * 2)
x_1 = 2
x_2 = (4 - \sqrt{4^2 - 4 * 2 * 0}) / (2 * 2)
x_2 = 0

This means that the line will intersect the circle at x_1 = 2 and x_2 = 0. Great! How can we put this to use in p5.js? Well, instead of solving this equation in multiple steps by hand, we can derive the a, b and c values directly from the circle (x - h)^2 + (y - k)^2 = r^2 and line y = mx + n equations and use these in the quadratic formula:

If you aren’t using p5.js, you can substitute the functions sq(x) and sqrt(x) with their native JavaScript counterparts: x * x and Math.sqrt(x).

In Thom’s egg, the slope and y-intercept values for the linear equation of the line segment can be inferred from two given points: the point where the bottom arc intersects the y-axis and the centre of the left circle.

There probably is another, more geometric way to calculate the length of the diagonal line segment in this construction, given the relative sizes of the constituent lengths, but the function that is described above will also be useful in other scenarios when the intersections cannot be inferred from other data.


text:
Canadian Mathematical Society www.cms.math.ca
 location:  Publications → journals
Search results

Search: All articles in the CMB digital archive with keyword residually finite ring

 Expand all        Collapse all Results 1 - 1 of 1

1. CMB 2011 (vol 55 pp. 378)

Oman, Greg; Salminen, Adam
 On Modules Whose Proper Homomorphic Images Are of Smaller Cardinality Let \$R\$ be a commutative ring with identity, and let \$M\$ be a unitary module over \$R\$. We call \$M\$ H-smaller (HS for short) if and only if \$M\$ is infinite and \$|M/N|<|M|\$ for every nonzero submodule \$N\$ of \$M\$. After a brief introduction, we show that there exist nontrivial examples of HS modules of arbitrarily large cardinality over Noetherian and non-Noetherian domains. We then prove the following result: suppose \$M\$ is faithful over \$R\$, \$R\$ is a domain (we will show that we can restrict to this case without loss of generality), and \$K\$ is the quotient field of \$R\$. If \$M\$ is HS over \$R\$, then \$R\$ is HS as a module over itself, \$R\subseteq M\subseteq K\$, and there exists a generating set \$S\$ for \$M\$ over \$R\$ with \$|S|<|R|\$. We use this result to generalize a problem posed by Kaplansky and conclude the paper by answering an open question on JÃ³nsson modules. Keywords:Noetherian ring, residually finite ring, cardinal number, continuum hypothesis, valuation ring, JÃ³nsson moduleCategories:13A99, 13C05, 13E05, 03E50

© Canadian Mathematical Society, 2014 : http://www.cms.math.ca/


text:
1. ## trig

hello, i have a right angle triangle with side lengths of 9.3 and 7.5 and an unknown hypotenuse. how would i use trig to solve this triangle

2. Originally Posted by mcgill33
hello, i have a right angle triangle with side lengths of 9.3 and 7.5 and an unknown hypotenuse. how would i use trig to solve this triangle
No need for trig ratios, use the Pythagorean theorem

$c=\sqrt{a^2+b^2}$

3. ## angles

sorry, by solving this triangle i meant the 2 unknown angles along with the unknown side length

4. Originally Posted by mcgill33
sorry, by solving this triangle i meant the 2 unknown angles along with the unknown side length
Ok, draw your triangle, and then use the fact that for an angle theta

$\theta=\arcsin\bigg(\frac{o}{h}\bigg)$

and so forth...are you aware of this method?

And you still need to find the hypotenuse

$c=\sqrt{9.3^2+7.5^2}\approx{11.95}$


text:
How to prove Cauchy-Schwarz Inequality in $R^3$?

I am having trouble proving this inequality in $R^3$. It makes sense in $R^2$ for the most part. Can anyone at least give me a starting point to try. I am lost on this thanks in advance.

-
Since you have proved it for $\mathbb{R}^2$, try using induction. –  tcmtan Sep 12 '12 at 23:17

You know that, for any $x,y$, we have that

$$(x-y)^2\geq 0$$

Thus

$$y^2+x^2\geq 2xy$$

Cauchy-Schwarz states that

$$x_1y_1+x_2y_2+x_3y_3\leq \sqrt{x_1^2+x_2^2+x_3^3}\sqrt{y_1^2+y_2^2+y_3^3}$$

Now, for each $i=1,2,3$, set

$$x=\frac{x_i}{\sqrt{x_1^2+x_2^2+x_3^2}}$$

$$y=\frac{y_i}{\sqrt{y_1^2+y_2^2+y_3^2}}$$

We get

$$\frac{y_1^2}{{y_1^2+y_2^2+y_3^2}}+\frac{x_1^2}{{x_1^2+x_2^2+x_3^2}}\geq 2\frac{x_1}{\sqrt{x_1^2+x_2^2+x_3^2}}\frac{y_1}{\sqrt{y_1^2+y_2^2+y_3^2}}$$

$$\frac{y_2^2}{{y_1^2+y_2^2+y_3^2}}+\frac{x_2^2}{{x_1^2+x_2^2+x_3^2}}\geq 2\frac{x_2}{\sqrt{x_1^2+x_2^2+x_3^2}}\frac{y_2}{\sqrt{y_1^2+y_2^2+y_3^2}}$$

$$\frac{y_3^2}{{y_1^2+y_2^2+y_3^2}}+\frac{x_3^2}{{x_1^2+x_2^2+x_3^2}}\geq 2\frac{x_3}{\sqrt{x_1^2+x_2^2+x_3^2}}\frac{y_3}{\sqrt{y_1^2+y_2^2+y_3^2}}$$

Summing all these up, we get

$$\frac{y_1^2+y_2^2+y_3^2}{{y_1^2+y_2^2+y_3^2}}+\frac{x_1^2+x_2^2+x_3^2}{{x_1^2+x_2^2+x_3^2}}\geq 2\frac{x_1y_1+x_2y_2+x_3y_3}{\sqrt{y_1^2+y_2^2+y_3^2}\sqrt{x_1^2+x_2^2+x_3^2}}$$

$$\sqrt{y_1^2+y_2^2+y_3^2}\sqrt{x_1^2+x_2^2+x_3^2}\geq {x_1y_1+x_2y_2+x_3y_3}$$

This works for $\mathbb R^n$. We sum up through $i=1,\dots,n$ and set

$$y=\frac{y_i}{\sqrt{\sum y_i^2}}$$

$$x=\frac{x_i}{\sqrt{\sum x_i^2}}$$

Note this stems from the most fundamental inequality $x^2\geq 0$.

-
Peter, I appreciate your response and all the other responses. I have selected this answer as it is the closest to what I had already started. I was missing the 2 at the start. Thanks again for clearly showing the steps. –  RexBanner Sep 13 '12 at 21:07
@RexBanner Anytime. –  Pedro Tamaroff Sep 13 '12 at 22:05
@Peter Tamaroff: Does Cauchy-Schwarz state that $x_1y_1+x_2y_2+x_3y_3\leq \sqrt{x_1^2+x_2^2+x_3^3}\sqrt{y_1^2+y_2^2+y_3^3}$? And I don't think that your first example is a good one for what Cauchy-Schwarz inequality is. (Chris). –  Chris's sis Sep 16 '12 at 11:54

For any $x_i, x_j, y_i, y_j$ we have $$(x_i y_j - x_j y_i)^2 = x_i^2 y_j^2 - 2 x_i x_j y_i y_j + x_j^2 y_i^2 \geq 0$$ which gives $$x_i^2 y_j^2 + x_j^2 y_i^2 \geq 2 x_i x_j y_i y_j.$$

Then for $x,y \in \mathbb{R}^n$ (ie, not just $\mathbb{R}^3$): $$2(\sum_{i=1}^n x_i y_i)^2 = 2\sum_{i=1}^n \sum_{j=1}^n x_i x_j y_i y_j \leq \sum_{i=1}^n \sum_{j=1}^n (x_i^2 y_j^2 + x_j^2 y_i^2) = 2(\sum_{i=1}^n x_i^2)(\sum_{i=1}^n y_i^2)$$

Dividing by $2$ and taking square roots gives the desired result.

-
It would be good if you could explain the indices notation. –  Pedro Tamaroff Sep 13 '12 at 1:45
@PeterTamaroff: Thanks for the edits. I hope the above clarifies... –  copper.hat Sep 13 '12 at 1:50

Well...the cauchy-schwarz inequality states that $|\vec{a}\cdot \vec{b}|\leq ||\vec a|| ||\vec b||$.

Well, we know that $\vec{a}\cdot \vec{b} = ||\vec a||||\vec b||cos\theta$.
$cos\theta$ can be 1 at most and -1 at least, and so that means that $|\vec{a}\cdot \vec{b}|\leq ||\vec a|| ||\vec b||$.

As simple as that =)

My solution assumes that you know that $\vec{a}\cdot \vec{b} = ||\vec a||||\vec b||cos\theta$. If you need to prove that, that is a quick geometric proof where you graph any $\vec a$ and and any $\vec b$ and you make the vector $\vec a + \vec b$ and you use the law of cosines in order to get that expression.

-

Let $f(t)$ be the square of the distance from $(x,y,z)$ to $(ta,tb,tc)$. Note that $f(t)\ge 0$ for all $t$. But by the standard distance formula, we have $$f(t)=(ta-x)^2+(tb-y)^2+(tc-z)^2.\tag{1}$$ Expand. We find that $$f(t)=t^2(a^2+b^2+c^2)-2t(ax+by+cz)+x^2+y^2+z^2.$$ The above quadratic is always $\ge 0$ precisely if the discriminant $$4(ax+by+cz)^2-4(a^2+b^2+c^2)(x^2+y^2+z^2)$$ is $\le 0$. That gives the desired inequality.

We also can get the condition for equality out of this. The discriminant is $0$ precisely if $f(t)=0$ has a double root $t_0$. that is the case iff $x=at_0$, $y=bt_0$, and $z=ct_0$, that is, precisely if the vector $(x,y,z)$ is a multiple of $(a,b,c)$.

Remark:: We cheated, basically the same proof works in $\mathbb{R}^n$ for any $n$. We do not even have to know the distance formula, since we can just define $f(t)$ as in Equation $(1)$.

-
Condition on discriminant should be less than or equal to zero? –  Robert Miller Sep 13 '12 at 0:59
@RobertMiller: Thanks for catching it! Fixed. –  André Nicolas Sep 13 '12 at 1:09


text:
# Reciprocal Sum Equality

Algebra Level 1

If $$a$$ and $$b$$ are coprime positive integers such that

$\frac {1}{2} + \frac {1}{3} + \frac {1}{4} + \frac {1}{5} =\frac {a}{b},$

what is the value of $$a+b$$?

×


text:
+0

Domain and Range!

-1
78
1
+851

What is the domain of the function $$w(x) = \sqrt{x-2} + \sqrt[3]{x-3}~?$$ Express your answer in interval notation.

Lightning  Jul 24, 2018
#1
+92430
+1

We have no restriction on the domain  for the second function  because we can take the cube root of any real number

However....for the first function,  x cannot be  < 2  because we would have a negative square root which does not produce a real  value

So......we must take the most restrictive domain  for both functions....this is  [ 2,  infinity )

Here's a graph : https://www.desmos.com/calculator/ant19juary

CPhill  Jul 24, 2018


text:
An object with a mass of  14 kg is lying still on a surface and is compressing a horizontal spring by 1 m. If the spring's constant is  7 (kg)/s^2, what is the minimum value of the surface's coefficient of static friction?

Jan 18, 2018

Answer:

The surface's coefficient of static friction, in this case, will be 0.0051, approximately.

Explanation:

Since the object is lying still on the surface, it is in equilibrium and, therefore, the net force in it must equal zero:

${F}_{N} = 0$. (1)

Since it is placed by a horizontal spring, the friction force, $f$, will also be in that direction, opposing to the spring's force.

Now, since the displacement $\Delta x = 1 m$ and $k = 7 \frac{N}{m}$, then the elastic force is

$F = k . \Delta x$;

$F = 7 . 1 = 7 N$.

Now, from Equation (1), $f$ and $F$ must have equal intensities, which means that

$f = 7 N$.

Now, since $f = \mu . N$, with $\mu$ and $N$ being the surface's coefficient of static friction and $N$ the object's normal force, respectively, then:

$\mu . N = 7$.

Since in this case the normal force equals the object's weight, then:

$\mu = \frac{7}{9 , 81 . 14}$

$\mu = 0.051$, approximately (I have used #g = 9.81 m/s^2).


text:
Archived

This topic is now archived and is closed to further replies.

What is bit operators and how are they used?

This topic is 5695 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

In GDNet Lounge, a guy said something about interviewing with a question on bit stuff. I don''t understand how this stuff works: | & << >> etc. If someone can either explain those operators clearly (I know that << and >> shifts the bits, but I don''t understand exactly how they work) or point me to a site with tutorial on bit manipulation, I''d apprecriate this. I think I can optimize some of my game''s parts with bit manipulating if I think this is what it is...

Share on other sites
I dug around and found these old notes:

AND &- operates like a 2 bit truth table- if either bit is zero, yield bit is zero too- both bits must be one for the yield bit to be one	0011      & 0101	----	0001	-------------------------------------------------XOR ^- bitwise exclusive OR- returns 1 when either bit but not both are 1	0011      ^ 0101	----	0110- an XOR applied twice yields the original operand-------------------------------------------------OR |- two bits ORed yield 1 if either or both bits are 1 and 0 if both bits are 0- used to combine bits from different variables into a single variable	0011      | 0101	----	0111-------------------------------------------------RIGHT SHIFT >>- moves each bit in operand to the right the indicated number of places- shifting right one bit same as dividing operand by 2-------------------------------------------------BITWISE LEFT <<- always shifts in 0 bits from the right discarding left most bits- each bit shifted is equivalent to multiplying by 2- so shifting left 3 bits is like muliplying by 8-------------------------------------------------BITWISE COMPLEMENT ~ (unary)- reverses each bit- complementing a number twice returns the orginal number

[edited by - lessbread on July 18, 2002 2:10:24 AM]

Share on other sites
Ah thanks. *copies it down*
Now I understand. Ah, the freedom...

Share on other sites
There is a good article on bitwise operations in C here on GDnet.

Henrym
My Site