text:
Make custom processor work in main file's directory

Bernhard

15 Feb, 2016 03:14 PM

// Please enter a detailed description of the issue
// Description of the issue:

As alluded to in the description of Custom Processor, Marked 2 does not run the processor in the working directory. This makes it difficult to use local files in the YAML header (bibliography, CSS, etc.).

Working around this issue by writing a wrapper script to change to the directory and then executing the custom preprocessor is possible, but fixing this on the Marked side should be easier and more universal.

(Using absolute paths to files in the YAML header is not useful because it makes documents less portable.)

// Please enter a list of steps required to reproduce the issue
// Steps to reproduce:

1. Configure custom preprocessor "pandoc", args "-s --filter=pandoc-citeproc"
2. Use local bibliography or css in YAML header
3. get error messages that files cannot be found

// If applicable please attach a sample document that causes the issue for you.

---
title: Pandoc Test
author: Bernhard
bibliography: Lit.bib
css: nocounter.css
csl: custom.csl
...

# Test File Contents

Use any bib, css, csl file to test.

// Configuration (do not edit)
Marked 2 910 (Direct)
OS X Version: 10.10.5
---
allowPageBreakInCode: 1
bookTxtIsLeanpub: 0
codeIsPoetry: 0
convertGithubCheckboxes: 1
convertYAMLToMMD: 0
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: 101
defaultProcessor: MultiMarkdown
enableMiniMap: 1
excludeBlockQuotesFromCounts: 0
excludeFootnotesFromCounts: 0
excludeVerbatimFromCounts: 0
excludeCaptionsFromCounts: 0
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
githubNewlines: 0
h1IsPageBreak: 0
h2IsPageBreak: 0
hrIsPageBreak: 0
includeMathJax: 1
limitTextWidth: 0
minimalJavaScript: 0
outlineModeExtensions:
permissionGranted: 1
processHTMLFiles: 1
scrollToEdit: 1
shouldDetectCritic: 1
shouldHighlightMarkupErrors: 1
syntaxHighlight: 1

1. Support Staff Posted by Brett on 15 Feb, 2016 03:26 PM

When running shell commands from within an app bundle, I do not have
sends the text to STDIN, and doesn't actually pass a file with a
location. This is why the environment variables were made available to
shell scripts.

http://marked2app.com/help/Custom_Processor.html#environmentvariables

A simple wrapper script that reads the \$MARKED_ORIGIN variable and
performs a cd command prior to passing the text to pandoc (`cat |
pandoc [options]) should resolve the problem. It's really not an option
to handle this universally within Marked at this point, as every custom
processor setup will have different requirements.

-Brett

2. Posted by Bernhard on 15 Feb, 2016 03:44 PM

I do not agree that processor requirements are so unpredictably different, especially with regard to the working directory. Being run in the directory of the main file is quite a common assumption, also for other programs like TeX or roff. (And Marked certainly sees the path of the file that is sent to the processor's STDIN.)

But of course I accept the reasoning that OS X is making running programs the ‘normal’ (unixy) way (increasingly?) difficult. ;-( Maybe, with my expectations, I should rather stick to the more unixy programs.

Sorry for the noise, but thanks again for the quick response,
Bernhard

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help Blurs the current field

Comment Form

r Focus the comment reply box Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

 23 Jun, 2017 05:19 AM Add an option to hide/show status bar 22 Jun, 2017 09:43 PM opml title node from markdown? 20 Jun, 2017 07:25 PM Issue with font sizes in CSS 19 Jun, 2017 03:21 PM SVG support 16 Jun, 2017 10:21 PM Print header and footer variables

Recent Articles

 Relative paths in included files Intra-document links in exported PDFs Custom processor permissions in MAS version License code has already been utilized A URL won't validate or returns "Unknown"

format: plain


text:
THIS ANSWERS IS ASELF EFFORT AND ASELF SOLUTIONS

ALL RIGHTS FOR QUESTION AND PHOTOS RELATED TO THESE OWENER

hi friends
this quiz is quick quiz and short ,,,just answers for 10 questions that will make you 0.04 \$ :0.08\$

the answers marked in red colour

1_Welcome, Agent Mia. Your friend and fellow agent, Chloe Sakura, has gone missing. Can you_ tell us which day she went missing?

12 - 01 - 2020                                                                                11 - 01 - 2021
11 - 02 - 2020                                                                                11 - 01 - 2019

2_The first stop in your investigation is Chloe’s apartment. Your name is written on something! Can you find which part of the room it’s in

Bottom left                                                                                Top left
Top right                                                                                BUTTOM RIGHT

3_Chloe left a letter for you to find. Watch the video below to uncover its contents and see what kind of journey awaits. Once you’re finished, click on ‘NEXT’ to continue with your investigation
next
4_Following Chloe’s line of investigation, you’ve arrived in Tokyo, Japan. The symbol you saw at the end of the video is hidden here. Can you find which corner of the image it’s in?
Top right                                                                                Top left
Bottom right                                                                                bottom RIGHT
5_It’s Chloe! But she’s trapped inside a safe room, protected by a code. Using the letters highlighted in red, try and see whether one of the options below fits
A country                                                                                A city
A time                                                                                Atype of room

6_Chloe’s in bad shape. She tells you that your boss, Mr. Mifune, plans to destroy The Lighthouse from within. He’s the one who captured Chloe, and now he’s after you, Mia. Click on ‘NEXT’ to plan your next move!

Next
7_Solving the puzzle below will lead you to Mifune’s location. Once there, you’ll be able to confront him! All you have to do is locate the part of the map that is missing a country
Top right                                                                                Top left
Bottom right                                                                              Bottom left

8_Blast! In order to access the office where your boss is hiding, you’ll need to solve this puzzle. This symbol ‘愛’ needs to be pieced together to access the room. Which 4 pieces do you need?

7, 5, 1, 3                                                                                5, 4, 8, 2
5, 7, 4, 2                                                                                7, 8, 3, 2
9_You’re inside and have confronted your boss. In order to gain the upper hand though, you need to find his name in the jumbled options below
imfeno                                                                                emfuim
inemfu                                                                                meunfe
10_Just as you were about to apprehend him, your boss took shelter inside a safe room. It will take a while to unlock the hatch inside it and escape. Can you catch him in time by finding his password? Using only red keys, uncover one of the options below!
A name from this quiz                                                                    A famous person
A place                                                                                Atv show
finally for any problem__please feel free to write acomment and we will replay fast as soon as possiple


text:
# How is the mass number written?

##### 1 Answer
Jun 13, 2018

On the top left side in an isotope...

#### Explanation:

An isotope is usually fully written in the form of:

""_Z^AX

where:

The mass number is also written at the top of an element's position on the periodic table. It has no units, as the normal units are presumed to be atomic mass units or $\text{u}$.

Note that $1 \setminus \text{u"=1.66*10^-27 \ "kg}$.


text:
Particle and Astro-Particle Physics Seminars

# Constraining neutron star properties with QCD

## by Eero Aleksi Kurkela (CERN)

Friday, 21 March 2014 from to (Europe/Zurich)
at CERN ( 4-3-006 - TH Conference Room )
 Description The structure of neutron stars is determined by a competition between gravity and the pressure of strong interactions, and therefore neutron stars provide a macroscopic laboratory for QCD. The progress in the observational side is very fast: masses of over 30 neutron stars have been measured precisely and the estimates of radii are getting increasingly accurate. In my talk, I will describe how we can understand these observations and make predictions using a combination of low energy nuclear physics and perturbative QCD.  Slides


text:
# Manual¶

The version documenting the shared basic features of Recola and Recola2 is

whereas the BSM manual

describes the new features of Recola2 with respect to Recola and introduces the new model files. The latter is only recommended if you know your way around Recola and want to use Recola2 for BSM computations or cross checks.

## New features¶

New features beyond the first releases are not reported in the manual. For convenience, we list new features here. A documentation is accessible through the API docs or by using the Quick search box in the sidebar.

 compute_spin_correlation_matrix_rcl(…) Computes the summed spin-correlated matrix squared amplitude $$B_j^{\mu\nu}$$ (arXiv:1002.2581 Eq. rescale_spin_correlation_matrix_rcl(npr,order=) Adjusts the calculated results for a (new) value of $$\alpha_\mathrm{s}$$, rescaling the structure-dressed helicity amplitudes and recomputes the spin-colour-correlated summed squared amplitude for the process with process number npr. get_spin_correlation_matrix_rcl(…) Extracts the computed value of the spin-correlated matrix summed squared amplitude. process_exists_rcl(npr) Returns whether a process with id npr exists after generation generate_processes_rcl(). set_outgoing_momenta_rcl(npr,pIn) Random phase space generation given incoming momenta. set_cache_mode_rcl(mode) Sets the cache mode to mode. set_global_cache_rcl(ncache) Sets the number of active global caches to ncache. switch_global_cache_rcl(cache) Activates the cache with number cache. set_quarkline_rcl(npr,q1,q2) Enforces a quark-flow between two quarks q1 and q2. get_recola_version_rcl() Returns the version number of the Recola2 library. get_modelname_rcl() Returns the name of model linked to the Recola2 library. get_modelgauge_rcl() Returns the current gauge used of model file in use. get_driver_timestamp_rcl() Returns the precise generation date of model library.


text:
# Rotational Motion (angular momentum)

I don't understand why the angular momentum remains constant even after the distance of the particle (from the origin) keeps on increasing.

Maybe I'm not reading the graph the way it is but I don't understand why it remains constant.

$$\vec L=m\vec r \times \vec v$$
$$L=mvrsin(\theta)$$
The formula gives you the answer if you think about it. You could think of the vectors $$\vec r$$ and $$\vec v$$ in the following way:
The particle moves from A to B on a straight line. However you draw a position vector $$\vec r$$ to the point on the line from the origion $$O$$, all you are really interested is in the component of the position vector perpendicular to the velocity vector.
Here, the velocity vector $$\vec v$$ points along the same direction throughout its journey (along the line). If you draw a right angled triangle over the line :
In $$\triangle OPC$$, you can see that $$OP$$ is the side $$rsin(\theta)$$. And from that $$\vec L$$ turns out to be constant in both direction and magnitude.


text:
SMS scnews item created by Zhou Zhang at Fri 7 Mar 2014 1034
Type: Seminar
Distribution: World
Expiry: 28 Mar 2014
Calendar1: 11 Mar 2014 1200-1300
CalLoc1: Carslaw 535A
Auth: zhangou@como.maths.usyd.edu.au

# GTA Seminar: Zhang -- Boundary Value Problems for the Dirac Operator with Applications

Speaker: Prof. Xiao Zhang (Chinese Academy of Sciences)

http://sourcedb.cas.cn/sourcedb_amss_cas/yw/rck/200907/t20090727_2266967.html

Time: Tuesday, March 11, 12NOON--1PM.

Room: Carslaw 535A.

Lunch: seminar lunch is right after the talk at Law Annex Cafe,
with reservation at 1:10PM.

----------------------------------------------

Title: Boundary Value Problems for the Dirac Operator with Applications

Abstract: we shall discuss the APS and local boundary value problems
for the Dirac operator. As the applications of the existence of these
boundary value problems, we give a spinorial proof of the Alexandrov
Theorem (joint with Hijazi and Montiel), as well as a new definition
of quasi-local energy-momentum in general relativity.

----------------------------------------------

Seminar website:

http://www.maths.usyd.edu.au/u/SemConf/Geometry/

Actions:
Calendar (ICS file) download, for import into your favourite calendar application
UNCLUTTER for printing
AUTHENTICATE to mark the scnews item as read
School members may try to .


text:
# Generating random values, keep trying till value within bounds are generated

Sorry for the strange topic name, couldn´t think of a good way to describe it. I´m basically trying to achieve the following:

I'm placing items randomly on the screen, but these items shouldn't be placed near eachother at a given distance. This is the process I have in my head right now:

• generate a random location
• check if this location is not near any other objects
• it is near -> start the process over to generate a new item (till it is not near anymore)

I've run into this scenario multiple times but could never think of a way to efficiently do this, while I do feel that there is a simple way to do it. Here is the implementation I have right now. I feel like I should use a while loop but I can't get my around how to do it. The code is in AS3 but that shouldn't matter.

public function generatePlanetsFromXML(xml:XML):void
{
planets = new Array();

for (var i:int = 0; i < xml.projects.project.length(); i++) {

var planet:Planet = new Planet();
planet.data = xml.projects.project[i];
planet.radius = (Math.random() * 20) + 20;

planets.push(planet);

calculatePlanetLocation(planet, i);
}

}

private function calculatePlanetLocation(planet:Planet, i:int):void
{
var randomX:int = (Math.random() * (worldwidth - planet.width)) + 20;
var randomY:int = (Math.random() * (worldheight - planet.height)) + 20;

//get a location that isn't close to another planet
//keep looping till the distance is higher than minimum distance
for (var j:int = 0; j < planets.length; j++) {

if (i != j) {

var dx:int = planets[j].x - randomX;
var dy:int = planets[j].y - randomY;
var distance:int = Math.sqrt((dx * dx) + (dy * dy));

if (distance < minPlanetDistance) {

trace("retry getting location..");
planet.alpha = 0.3;
calculatePlanetLocation(planet, i);

}else {

//distance is fine, planet can be placed!
planet.x = randomX;
planet.y = randomY;
}

}else if (i == 0) {

//first planet should always be placed
planet.x = randomX;
planet.y = randomY;
}

}
}

As you can probably imagine, the biggest problem with that approach is that you don't have any idea how long it's going to take to populate the world. If you're unlucky, the random number generator can make you do several times the amount of calculations than you would need to do given a strict iterative approach.

One way you could work around it in this situation is by using a grid. Maintain a list of all the valid grid coords to place a world at, and every time you place a new world you remove the coords that are no longer valid from this master list. That way you only have to pick a random spot once since all spots you are picking from are valid.

Basically, the algorithm would look something like this (in really rough pseudo code):

int[] validGridCoords = AllGridCoords();

function PopulateUniverse()
for( 0..NumPlanetsRequired )
if ( validGridCoords.Count < 1 )
break for loop;
var CoordToPlaceAt = validGridCoords.RandomElement();
SpawnPlanetAt( CoordToPlaceAt );

function SpawnPlanetAt( int coordToSpawnAt )
// initialize planet
var planet = new Planet( coordToSpawnAt );
foreach( var gridCoord in validGridCoords )
if( gridCoord is close to new planet )  // you could use Manhattan distance here
validGridCoords.Remove( gridCoord )

Update: as NeilG rightly is alluding to in the comments, this naive solution has a few problems. For one, if your "is close" number is relatively small (i.e. around the radius of your largest allowed planet) or proportional to the radius of the planet, you can run into situations where you place a "large" planet on the edge of the valid areas and it might reach far enough into the prepopulated area to either overlap into the "too close" area or even overlap an entire planet. There are a handful of fixes for this:

1) Sort your incoming planets by largest to smallest. That way, if your "is close to new planet" distance is at least the radius of the largest planet you won't actually get any overlaps. You might get touching planets though, unless you also do...

2) Instead of picking a single point, pick an area of points that your planet fills. This is more computationally expensive, but the effect is that your planets won't bleed into the prepicked "not valid" areas.

Either way, you probably want to do #1 if your distance between is small and your planets are varying in size dramatically. You'd be doing a lot of computation, but the real value with an iterative algorithm like this is knowing when you can stop. With a pure random solution, if your density is high, your placing function is non-deterministic. Knowing that your map is too full (by not having any valid spots to pick from) means that you can handle that error condition, as opposed to blindly throwing darts at a board.

• Given that the planets have a random radius, you would need one grid for each radius, and even then you have to make sure that are not too aggressive with the grid sizes or else you end up removing entire grid squares that have some valid places. – Neil G May 24 '11 at 3:30
• The grid is only to provide a discrete list of points. A world can take up an arbitrary size. It doesn't have to be set up such that the spacing between grid units is the same as the radius of a world. – Tetrad May 24 '11 at 3:48
• Let's say that you don't have one validGridCoords for every radius, but you still want any point chosen from validGridCoords to be valid for an arbitrarily-sized planet. That means that you have to be very aggressive when pruning points. You have to prune them as if you are inserting the largest planet. Then, this will distribute small planets much more sparsely than they would otherwise be distributed — and possibly require more computations: O(PG) where G is the number of grid points and P the number of planets. Considering his solution is O(P^2 / p), I'm not sure this is better. – Neil G May 24 '11 at 4:03
• I've used that kind of solution for my own 2D space game random generation (nextstopnowhere.wordpress.com), and it can really work fine. Tetrad's proposed solution could be further improved by using space partitioning techniques to refine it, but I didn't need it. – jv42 May 24 '11 at 8:41
• Thanks for the responses, will give the grid approach a try! – omgnoseat May 25 '11 at 20:21

Your solution is fine provided that you never end up placing so many planets that the number of valid locations falls to, say, below 10% of the locations (which is very very dense.)

Let's figure out how many operations you will end up doing to place a planet given

• x planets already placed
• p the probability that a randomly chosen location is valid.

Then, the number of retries is geometrically distributed with probability p, and therefore the expected number of operations is 1/p.

So, if you keep p above 10%, you expect no more than 10x operations on average for each planet, or 10x^2 in total.

One optimization you can make is to keep the planets sorted by radius, and check in that order. The sorting cost will be offset by the savings from being able to stop early.

• Well the problem is that my solution isn´t working at all, it doesn´t calculate any new locations. It just takes the first location and even if it is in the range it will still be placed. I was really wondering if there are any other methods to do this than the one I use. – omgnoseat May 25 '11 at 20:24
• @Martino: Your method is good; you just need to debug your code. Why don't you start by removing the recursion, and writing an iterative solution? (There is no reason why calculatePlanetLocation needs to call itself.) – Neil G May 25 '11 at 22:00

In applicable situations discard and retry is a great method for heuristic generation. You can't beat the simplicity, and it's not bad performance in all cases.

Basically you try to place the planet when you have done just one check, rather than after doing all the checks. Your code is broken beyond that, but I'll leave out the details.

What you need to do, in pseudocode:

function calculatePlanetLocation(){
validposition=false
while(!validposition){
position=generateposition()
validposition=true
for each planet{
if(too close){
validposition=false
}
}
}
planet.position=position
}


text:
## A community for students. Sign up today

Here's the question you clicked on:

## anonymous one year ago Write an equation of a line that passes through the point (7, 3) and is parallel to the line y = negative 2 over 3x + 3.

• This Question is Closed
1. anonymous

A. y = 3 over 2x − 3 B. y = 3 over 2x + 3 C. y = negative 2 over 3x + 23 over 3 D. y = negative 2 over 3x − 23 over 3

2. anonymous

@jim_thompson5910 @mathmate

3. laughoutloud

ok so we are going to use point slope form

4. laughoutloud

do you know the point slope formula

5. laughoutloud

@cheetah21

6. anonymous

is y2 -y1/x2-x1?

7. laughoutloud

no that is the formula for finding slope the formula for point slope is $y -y _{1}=m(x-x _{1})$

8. anonymous

Oh okay my bad so how do we do that ?

9. laughoutloud

well they pretty much give you everything what is the slope?

10. laughoutloud

*hint since it is parallel the slope are the same

11. anonymous

the slope is 2?

12. laughoutloud

is this how your equation looks $y=\frac{ 2 }{ 3 }x+3$ is so then the slope is 2/3x

13. anonymous

yeah that how it looks except the fraction is negative

14. laughoutloud

oh okay sorry so the slope is -2/3x

15. anonymous

its okay(: soo whats next

16. laughoutloud

now you plug in the values the slope for m and the point (7,3) for x(1) and y(1)

17. anonymous

so y - 3 = m(x-7) ?

18. laughoutloud

yes but plug in the slope for m

19. anonymous

Okay i changed the m to -2/3, now what cause im having a little trouble solving it

20. laughoutloud

solve for y

21. anonymous

7y times -2/3?

22. laughoutloud

k idk what you did to get that lol but when you distribute you should get $y-3=-\frac{ 2 }{ 3 }x-\frac{ 14 }{ 3 }$

23. anonymous

I got that i just dont know where to go from there

24. laughoutloud

wait it should be $y-3=-\frac{ 2 }{ 3 }+\frac{ 14 }{ 3 }$

25. laughoutloud

then combine like terms

26. laughoutloud

|dw:1440711443910:dw|

27. anonymous

y-3=16/3

28. laughoutloud

|dw:1440711463913:dw|

29. laughoutloud

answer should be $y=-\frac{ 2 }{ 3 }+\frac{ 23 }{ }$

30. laughoutloud

23 over 3

31. anonymous

so 25/3?

32. laughoutloud

sorry i made a mistake again $y=-\frac{ 2 }{ 3 }x+\frac{ 23 }{ 3}$

33. anonymous

so what should i solve first

34. laughoutloud

its done thats the answer

35. laughoutloud

is it one of the choices

36. anonymous

Oh i see my badddd, it is one of the choices...Thank youu!!

37. laughoutloud

your welcome:)

#### Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy


text:
LT Spice Automation and automatic Plot data extraction

I am trying to automate LTspice from Matlab. I am running Lt spice netlist which is creating the .raw file. But I am unable to automatically extract the polt data after that. Any solution on how to extract the netlist output with Matlab or any other way except manually clicking export as .text?

• You could set LTspice to save .raw files as ASCII (-ascii, command line switch), but, as the manual warns, that can be extremely slow, particularly for large simulations. I have never tried this myself. The .raw files are a mixed binary form, and there's a small utility, ltsputil (IIRC, in the Yahoo LTspice Groups), that processes .raw files for various reasons. Maybe this could be used in a small script? – a concerned citizen Jan 15 '19 at 9:17

You can use a script to read the data of the .raw files. For Matlab, Ive used ltspice2matlab. Alternatively, for users of Python, one alternative is PySpicer.


text:
# Functions and Graphing¶

## Functions¶

We’ve talked about a data-based way of looking at storage in Mathematica with lists, matrices, tables, etc. But one other form of “storage” we can consider is functions. Mathematica allows us to define functions in a very similar way to how we might write down a function in mathematics. If we want to define some function $$f(x)=x^2+\frac{11}{x}$$, we can simply write:

f[x_] := x^2+11/x

There are some important differences here. The first is the underscore (_) character on the left-hand side that is absent on the right-hand side. That tells Mathematica that the x in the function definition is a dummy variable.

We can easily apply functions to other functions as well:

g[x_]:=x/11;
g[f[x]]

will print:

x^2/11+1/x

Practice Problem: Functions

To make sure you can create functions, try creating a function $$h(u,~v)=(v,~u^2)$$, (so $$h$$ takes two arguments then produces a 2D point - think back to Lists!). Afterward, separately set u=5;v=2. Then evaluate $$h(3,~2)$$ and make sure you get $$(2,~9)$$.

We can base functions on other functions (built-in or user-created) too. There are many built-in functions which take functions as arguments, which we discuss throughout the book.

Example: Calculus

One particularly useful realm for user-created functions is taking their integrals and derivatives. We can take a derivative $$\frac{d}{dx}$$ of a function $$f(x)$$ by using:

D[f[x], x]

Where we have defined f[x_]:= .... e.g., f[x_]:=x^2 will have D[f[x], x]=2x. Of course, because these are functions of whatever variable we apply, we can use any variable name we want in the derivative: D[f[y], y] = 2y.

We can also take integrals (both definite and indefinite), using the same command in both cases. To take the indefinite integral, we’ll use:

Integrate[f[x], x]

That will, for example, given f[x_]:=x^2, have Integrate[f[x], x]=x^3/3. If we’d rather take the definite integral, we can use:

Integrate[f[x], {x, a, b}]

where a and b are the limits of integration: $$\int_a^bf(x)dx$$.

Practice Problem: Calculus

For practice with calculus functions, try evaluating $$\frac{d\ln{x}}{dx},~\int\sin^2(x)dx$$ in Mathematica and make sure you get $$\frac{1}{x},~\frac{x}{2}-\frac{\sin(2x)}{4}$$.

## Introduction to Graphing¶

Until this point, we have largely just dealt with numbers and functions. Now, let’s take a look at expressing data more graphically, and how to customize the display for different scenarios.

## Basic 2D Graphs¶

First, let’s look at graphing functions in two-dimensions, with some basic customization features. The simplest is Plot[f[x], {x, a, b}], which will plot the function $$f(x)$$ from $$x=a$$ to $$x=b$$, with $$x$$ on the horizontal axis and $$f(x)$$ on the vertical axis, selecting an automatic, appropriate range for $$f(x)$$. For example, for $$f(x)=\sin(x),~x\in[0, 2\pi]$$, we have Plot[Sin[x], {x, 0, 2 Pi}], which will produce:

Simple plot for $$f(x)=\sin(x)$$.

While we might be able to tell what’s going on in the graph above, that’s not always going to be the case. For example, we might want to have some basic labels on the graph, for the axes and for a title. Turns out, this is very easy to do with our friend from the Evaluating Symbolic Expressions section, the rule operator (->). Many functions allow for optional arguments using the name of the argument and the rule operator to the desired value. For example, with the Plot function above, we might want to label axes. We do that with the AxesLabel argument:

Plot[Sin[x], {x, 0, 2 Pi}, AxesLabel->{"x","f(x)"}]

which will create:

Plot for $$f(x)=\sin(x)$$, with labeled axes.

We can further add a title to the graph (PlotLabel->"My Title"), define a different range for the plot (PlotRange -> {{xmin, xmax}, {ymin, ymax}}), select the color and style of the line (PlotStyle->[Green, Dashed, Thin] - some colors are pre-defined, but we can use RGBColor[red,green,blue] and RGBColor[red,green,blue,alpha] to create custom colors), and label the functions we’re graphing (PlotLegends->"Expressions" - a special option that prints the function definitions). We can actually plot more than one function at a time too by providing a list of functions as the first argument (all functions of the same variable). If we do that, then for the PlotStyle, we will find it helpful to provide instead a list of the styles. So, for example, we could have:

Plot[{Sin[x], Cos[x]},
{x, 0, 2 Pi},
AxesLabel -> {"x", "f(x)"} ,
PlotLabel -> "My Title",
PlotRange -> {{0, 3 Pi}, {-1.5, 1.5}},
PlotStyle -> {
{RGBColor[0.900082, 0.425655, 0.093112], Dashed, Thin},
{RGBColor[0, 1, 0], DotDashed, Thick}},
PlotLegends -> "Expressions"]

Plot for $$f(x)=\sin(x),~g(x)=\cos(x)$$, with options specified above.

Additional things we can do include wrapping strings (PlotLabel or AxesLabel, etc.) in Style functions: PlotLabel->Style["title", Bold], which can update the text, rather than the lines/points on the graph. Furthermore, we can list several options: Style["text", Bold, Orange, Small, ...].

Interactive Color Choice

If we know what color we want, we can use a RGBColor to create it, but if we don’t know, we can create a ColorSetter to help us decide. ColorSetter[] creates a dialog box to select a specific color. That box can be copied into a place where a RGBColor is used to easily change colors of plots, etc. with a Setting command.

Practice Problem: Simple Plots

For practice, try creating the plot below. The functions are listed in the legend on the plot, but you might find use of the Thickness function (instead of just Thick or Thin) which takes a single value to determine the line thickness.

Plot to imitate.

There are several other useful plotting functions for other applications.

ListPlot is for plotting specific data in one of two formats. The first is a simple list of numbers $$\{a_1,~a_2,~...,~a_n\}$$, assuming that it corresponds to points $$\{(1,~a_1),~(2,~a_2),~...,~(n,~a_n)\}$$. The second (often more useful) is a set of points $$\{(a_1,~f(a_1)),~(a_2,~f(a_2)),~...,~(a_n,~f(a_n))\}$$. As we saw in the section on Tables, we can easily create lists of points (which are just 2-element lists), with Table[{i, f[i]}, {i, imin, imax}]. So, for example, we can have:

ListPlot[Table[{i, Sin[i^2/1000]}, {i, 0, 200}]]

Plot of $$\sin\left(\frac{x^2}{1000}\right)$$.

Like with the Plot function, we can have many lists of points as the first argument to the function. For a more interesting example:

(*Create four lists of points for 0<=a<=20*)
list = Table[Table[{a, a^2 + 50 Sin[c*a]}, {a, 0, 20}], {c, 0, 3}];
ListPlot[list,
PlotLegends -> {"data 1", "data 2", "data 3", "data 4"},
PlotStyle -> PointSize[Medium] (*Makes points bigger*)]

Plot of functions $$f_c(a)=a^2+50\sin(c*a)$$ over $$a\in[0,20],~c\in[0,3]$$.

With the ListLinePlot function, we get all the features of the ListPlot, but with consecutive points connected:

ListLinePlot[list,
PlotLegends -> {"data 1", "data 2", "data 3", "data 4"}]

Plot of functions $$f_c(a)=a^2+50\sin(c*a)$$ over $$a\in[0,20],~c\in[0,3]$$.

As we will see in the section on Interpolation, we can interpolate our data, creating a fitting function. One other place we can use this feature of Mathematica is the ListLinePlot which will perform the interpolation and graph it all at once with the InterpolationOrder option. If this is greater than 0, Mathematica will apply a smoothing fit to the data of the degree specified between points (in practice, 3 usually gives a reasonable fit, and above 8 rarely makes visual difference):

ListLinePlot[list,
PlotLegends -> {"data 1", "data 2", "data 3", "data 4"},
PlotStyle -> Thick,
InterpolationOrder -> 4]

Plot of functions $$f_c(a)=a^2+50\sin(c*a)$$ over $$a\in[0,20],~c\in[0,3]$$.

Other function plotters are applicable to other formulations. For example, we can have polar plots of the form $$r(\theta)=\cdots$$ with the PolarPlot function:

PolarPlot[{Cos[3 t], -Cos[3 t]}, {t, 0, 10}, PlotStyle -> {Blue, Red}]

Plot of functions $$r_1(\theta)=\cos(3\theta),~r_2(\theta)=-\cos(3\theta),$$ over $$\theta\in[0,10]$$.

ParametricPlot accepts pairs of functions that together describe points. For example, we might have $$x(t)=\cos(t),~y(t)=\sin(t)$$. We can plot that easily:

ParametricPlot[{Cos[t], Sin[t]}, {t, Pi/4, 7 Pi/4}]

Plot of $$x(t)=\cos(t),~y(t)=\sin(t);~t\in[\pi/4,~7\pi/4]$$.

We can have multiple pairs of functions, as with other plotting functions above, but one extra feature we have is to actually have two-parameter functions, plotting over both. Using a slightly modified example, $$x(t,~u)=u\cos(t),~y(t,~u)=u\sin(t)$$, we can obtain plots like:

ParametricPlot[{u Cos[t], u Sin[t]}, {t, Pi/4, 7 Pi/4}, {u, 7, 10}]

Plot of $$x(t,~u)=u\cos(t),~y(t,~u)=u\sin(t);~t\in[\pi/4,~7\pi/4],~u\in[7,10]$$.

We have the ContourPlot, which has a few variants, each based around the idea of finding level curves of functions of two variables. If you have ever used a topographical map while hiking, this will seem familiar. For an example, let’s start with a simple, not-so-interesting function $$f(x,~y)=(x-1)^2+(y+2)^2$$. That has a vertex centered at $$(1,~-2)$$, but grows radially outward from there:

ContourPlot[(x - 1)^2 + (y + 2)^2, {x, -5, 5}, {y, -5, 5}]

Plot of $$f(x,~y)=(x-1)^2+(y+2)^2;~x,y\in[-5,5]$$.

In the default form, at least, this is largely uninteresting, just showing that the function grows bigger as it deviates from $$(1,~-2)$$. But, if we apply some more information, we can get customized information. In a moment, we’ll look at 3-dimensional graphs, which will help to visualize the actual function, but let’s now take $$f(x,~y)=|\sin(x)\sin(y)|$$. We should expect peaks of this function wherever both $$\sin(x)$$ and $$\sin(y)$$ are at their extrema ($$-1,~1$$), since in all other cases, $$f$$ will be less than $$1$$. But we know that $$\forall{x,y}:f(x,~y)\in[0,~1]$$ (that notation means “for all x and y, f is in that range”), so why don’t we see, for example, where $$f$$ is some specific values:

f[x_, y_] := Abs[Sin[x] Sin[y]]
ContourPlot[
{f[x, y] == .005,
f[x, y] == .05,
f[x, y] == .25,
f[x, y] == .45,
f[x, y] == .65,
f[x, y] == .85,
f[x, y] == .95},
{x, -2 Pi, 2 Pi},
{y, -2 Pi, 2 Pi},
PlotLegends -> "Expressions"]

Plot of $$f(x,~y)=|\sin(x)\sin(y)|;~x,y\in[-2\pi,2\pi]$$.

One other plot that is also interesting is the RegionPlot. This plot does not take a function, but rather a conditional expression. If true, the point is plotted. If not, the point is blank. For example:

RegionPlot[Or[Sqrt[x^2 + y^2] <= 10, x^2 > 144],
{x, -15, 15}, {y, -15, 15}]

Plot of the region statisfying either $$x^2+y^2\leq{100}$$ or $$|x|\geq{12}$$.

On some occasions, we may want to employ logic in addition to more familiar functions on real and complex numbers. While likely not needed for this course, it may help when dealing with complicated functions or with future programming projects in research, industry, and beyond. See the appendix for Mathematical Logic.

It should be noted that all of these graphing functions have other options available, which can always be found at the *Mathematica* Reference or using Mathematica’s help features.

While less frequently used in science, “business graphs” (pie charts, simple bar graphs, etc.) are provided in Mathematica. For example:

BarChart[{{1, 2, 3}, {2, 3, 1}, {3, 4, 1}, {1, 1, 8}}]
PieChart[{1, 1, .5, 1.7}]
PieChart3D[{1, 1, .5, 1.7}]

For more, search in Mathematica‘s documentation for the “Charting And Information Visualization” guide (in Mathematica, can use “guide/ChartingAndInformationVisualization” in the search bar).

## Basic 3D Graphs¶

We can do many of the things we did above in three-dimensional plots as well. The easiest example is Plot3D:

Plot3D[Sin[x y], {x, 0, 2 Pi}, {y, 0, 2 Pi}]

Plot of $$f(x,~y)=\sin(x\cdot y);~x,y\in[0,~2\pi]$$

We have many of the same options as in the 3D case. We can label the whole plot with PlotLabel, label the independent variable axes with AxesLabel, and set the colors of graphs with PlotStyle. But, we have a few additional options. We can easily add a gradient to the plot (the default is shown above). The built-in ones can be created with ColorFunction->"name" where "name" is one of the elements seen below.

Colors available for ColorFunction.

In those cases, the function is a function of the plotted value only (not of the independent variables). However, we can create custom color functions by using the RGBColor function. We create a new Function in three variables (the three axes - the first then second independent axes then the value of the plot at that point, scaled for ) that involves some other color function, for example RGBColor:

Plot3D[Sin[x], {x, 0, 2 Pi}, {y, 0, 2 Pi},
ColorFunction ->
Function[{x, y, z},
RGBColor[x, 0, 0]], (*Just produce red colors as a function of x*)
AxesLabel -> Automatic]

Plot of $$f(x,~y)=\sin(x);~x,y\in[0,~2 Pi]$$, with color as a function of $$x$$.

We can make these as complicated as possible, but generally want to make color easy to work with if used as a gradient. The built-in functions have built-in plot legends as well:

Plot3D[(x-2)^3 - .5(y-1)^3, {x, 0, 2 Pi}, {y, 0, 2 Pi},
ColorFunction -> "BeachColors",
AxesLabel -> Automatic,
PlotLegends -> Automatic]

Plot of $$f(x,~y)=(x-2)^3-\frac{1}{2}(y-1)^3;~x,y\in[0,2\pi]$$ with color legend.

We have a 3D-version of ListPlot as well, with ListPointPlot3D ( ListPlot3D gives a surface based on points on the surface rather than just points). For example:

ListPointPlot3D[Table[{i/10, Sin[i], Cos[i]}, {i, 0, 50, .05}],
PlotStyle -> PointSize[Medium],
BoxRatios -> Automatic (*Used to make the box scale better than default thin
rectangular prism*)]

Plot of spiral $$\left(\frac{i}{10},~\sin(i),~\cos(i)\right);~i\in[0,50]$$.

We have a 3D-version of RadialPlot with SphericalPlot3D, where we have a function $$r(\theta,~\phi)$$ as the radius as a function of angles.

SphericalPlot3D[t p, {t, 0, 2 Pi}, {p, 0, Pi}]

Plot of $$r(\theta,~\phi)=\theta\phi;~\theta\in[0,~2\pi],~\phi\in[0,~\pi]$$.

We have two versions of parametric plots in 3D. The first allows for three functions $$x(t),~y(t),~z(t)$$, such as:

ParametricPlot3D[{{t, Sin[t], Cos[t]}}, {t, 0, 10},
BoxRatios -> Automatic]

Plot of $$x(t)=t,~y(t)=\sin(t),~z(t)=\cos(t);~t\in[0,~10]$$.

But we can also have functions of two variables $$x(u,~v),~y(u,~v),~z(u,~v)$$:

ParametricPlot3D[{{v, u Sin[v], u Cos[v]}},
{u, 8, 10},
{v, 0, 8 Pi},
BoxRatios -> Automatic,
PlotStyle -> Blue]

Plot of $$\left(v,~u\sin(v),~u\cos(v)\right);~u\in[8,10],~v\in[0,~8\pi]$$.

We have a RegionPlot analogue in 3D as well with RegionPlot3D.

RegionPlot3D[
And[x^2 + y^2 >= 36,
x^2 + y^2 + z^2 <= 64],
{x, -9, 9},
{y, -9, 9},
{z, -5, 5},
ColorFunction -> "BrightBands"]

Plot of the intersection of regions $$x^2+y^2\geq36$$ and $$x^2+y^2+z^2\leq64$$.

We have a plot unique to 3D plots based on the notion of rotating a 2D curve in 3D space. RevolutionPlot3D has several variants, the simplest of which takes a single function $$z(r);~r^2=x^2+y^2$$:

Plot[Cos[r]^2/r, {r, 0, 8 Pi},
PlotRange -> Automatic]
RevolutionPlot3D[ Cos[r]^2/r, {r, 0, 8 Pi},
BoxRatios -> Automatic]

Plot of $$f(x)=\frac{\cos^2(x)}{x}$$.

Plot of $$z(r)=\frac{\cos^2(r)}{r};~r^2=x^2+y^2$$.

Practice with 3D Plots

Pick one of the code segments above and run it in Mathematica. Then, start playing. Change the function, click and drag the graph to view it from other angles, add labels, change the color scheme, add a legend. If you run into problems, use the Help feature on the graphing function (often, an option that works on one plot may need to be altered slightly to work on the other plot - use the “Details and Options” section of the documentation for each function to find out more).

For other variants of RevolutionPlot3D or any other plots, again, refer to Mathematica‘s documentation, or in Mathematica, use the “Basic Math Assistant” Pallete in the “Basic Commands” section for “2D” or “3D” then on the “More” option for “Visualizing Functions” or “Visualizing Data”. There, you will find many templates of these built-in graphing functions.

## Basic “1D” Graphs¶

Sometimes (read: most of the time) we have sampled data for the same set of values for our independent variables and arrive at different “answers”. We’ll have more on why that occurs later, but it stems from both our inability to measure things in a laboratory with infinite precision (including our “control” variables!) and natural fluctuations in the world around us from thermal energy and other sources, which leads us to a distribution in our results. We often want to check that the observed distribution fits the distribution we expect (many times, for reasons we’ll discuss later, we’ll assume a Gaussian distribution). To do that, we can turn to a “1D” graph like a histogram which plots the relative frequency of results (put another way, how often of particular results occur) versus the result values [I say “1D” because we only provide a list of numbers, not points so the data is one-dimensional even though the plot is not]. In Mathematica, this is done with Histogram. Some examples:

Histogram[{
1, 1, 1, 1, 1, 1,
2, 2, 2, 2,
3, 3, 3, 3, 3, 3, 3}]
Histogram[{
1, 1, 1, 1, 1, 1,
2, 2, 2, 2,
3, 3, 3, 3, 3, 3, 3,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5},
{1} (* set size of "bin" to 1*)]

Plot of first dataset as a Histogram.

Plot of second dataset as a Histogram, with size of bin specified.

We can also have Mathematica smooth our data to provide an estimate of the shape of the distribution with SmoothHistogram.

We will explore more on Gaussian Distributions and histograms in the section on Gaussian Distributions.

## Combining Plots¶

While we have seen how to combine similar plots (often just providing a list of functions to plot or two sets of data to the same plotting function), we might want to be smarter about our graphs, perhaps having an expected distribution plotted against real data. We can use the Show command to combine as many plots as we’d like. For example:

table={
{0, 0.0491203},
{1, 1.07251},
{2, 2.09226},
{3, 3.15284},
{4, 4.13291},
{5, 5.02879},
{6, 6.08815},
{7, 7.21867},
{8, 8.00343},
{9, 9.06134},
{10, 10.0896}};
Show[
Plot[x, {x, 0, 10}],
ListPlot[table,
PlotStyle -> {PointSize[Medium], Red}]
]

Plot of observed data and expected values using the Show function.

We can take things much farther too, by wrapping this in a Legended function, which allows us to easily label any type of data and have all those labels in a single spot. The following example is a little cumbersome, but is a good one for jumping in and trying things out for yourself. It’s more heavily commented for readability. This uses the more general Directive command, which allows you to make a line multiple things at once (thick, a color, dotted, etc.) in the most predictable way.

(*Fancy way of generating random data from a Normal Distribution*)
list = RandomVariate[NormalDistribution[0, 1], 50];

Legended[ (*Apply the graphic, then the legend*)
(*the graphic*)
Show[
(*Plot data as a histogram of relative frequencies*)
Histogram[list, Automatic, "PDF",
ChartStyle -> RGBColor[.41, .65, 1]], (*set the color of bins to blue*)

(*Plot smoothed data*)
SmoothHistogram[list, Automatic,
PlotStyle -> Directive[Thick, Green]], (*Set color to green AND make line thick*)

(*Plot actual Normal distribution - don't worry about the specifics here.*)
Plot[PDF[NormalDistribution[0, 1], x], {x, -8, 8},
PlotStyle -> Directive[Thick, Red]]], (*Set color to red and make line thick*)

(*End of the graphic, now for the legend*)
Column[{ (*Create a new column to the right of what we just drew*)
(*listing multiple items within a column will make them appear as rows within the column*)

(*create a box symbol with the given color, and label it "data"*)
SwatchLegend[{RGBColor[.41, .65, 1]}, {"data"}],

(*create a line legend that's thick ang green with the given name*)
LineLegend[{Directive[Thick, Green]}, {"smoothed data"}],

(*Last legend element, end of Legended plot*)
LineLegend[{Directive[Thick, Red]}, {"Normal Distribution"}]}]]

Plot of data drawn from a Normal distribution along with projected distribution from data and the actual distribution for reference, all in a Legended chart.

Practice Problem: Combining Graphs

Try adding other plots to the one above and then labeling them. For example, see if you can add in a plot for $$f(x)=x^2;~x\in[-2,20]$$, but then re-scale the image to make sure you can clearly the existing graph information (hint: you can add a PlotRange in exactly one function and have it work - you might want to provide the range though, rather than using the Automatic version).

## Vector Field Diagrams¶

We may have data that requires more dimensions to be displayed (for example, maybe we are tracking a particle’s velocity in 2D with respect to its 2D position). For this, we can turn to the VectorPlot function and its list-based and 3D cousins. First, an example:

VectorPlot[{y, -x}, {x, -5, 5}, {y, -5, 5}]

Vector-field plot for $$\frac{dx}{dt}=y,~\frac{dy}{dt}=-x$$

VectorPlot plots a vector at sampled points in the 2D domain as specified by the 2D function. The actual sizes of arrows are not necessarily useful, but their relative sizes are correct, giving a qualititave indication of strength of the velocity at the given points.

It has a handy feature of adding stream lines to the plot, doing a numerical approximation of the path that would be taken for a selection of points (user-specified or sampled):

VectorPlot[{10 Sin[y], -x^3}, {x, -5, 5}, {y, -5, 5},
StreamPoints -> {{2, 3}, (*Plot paths that cross specific points*)
{-3, .1},
{0, 1}}]

Vector-field plot for $$\frac{dx}{dt}=10\sin(y),~\frac{dy}{dt}=-x^3$$.

We can use a StreamPlot to look just at stream lines, rather than the field, providing possible trajectories rather than just the vector field values:

StreamPlot[{10 Sin[y], -x^3}, {x, -5, 5}, {y, -5, 5}]

Stream-line plot for $$\frac{dx}{dt}=10\sin(y),~\frac{dy}{dt}=-x^3$$.

We have a ListVectorPlot that takes a list of $$((x,~y),~(\frac{dx}{dt},~\frac{dy}{dt}))$$ to produce a plot. The 3D version is ListVectorPlot3D which takes $$((x,~y,~z),~(\frac{dx}{dt},~\frac{dy}{dt},~\frac{dz}{dt}))$$:

ListVectorPlot3D[
Table[{{x, y, z}, {x Tan[y], -x^3  y, z}},
{x, -5, 5},
{y, -5, 5},
{z, -5, 5}]]

3D vector-field plot for $$\frac{dx}{dt}=x\tan(y),~\frac{dy}{dt}=-x^3,~\frac{dz}{dt}=z$$.

## Error Bars¶

We’ll talk about the importance of error in measurement later, but first we can see how to present error in our data. There are few built-in ways to do this in Mathematica, however, advanced users may find it useful to create their own functions to draw error bars on data. We’ll focus on the built-in ones. For this, we need the “ErrorBarPlots” package:

Needs["ErrorBarPlots"]

We then get a single ListPlot variant called ErrorListPlot. It only accepts data in the form {{{x1,y1},ErrorBar[...]},{{x2,y2},ErrorBar[...]},...}, where the ErrorBar is:

ErrorBar[valv] (*valv is positive/negative error in vertical axis*)
ErrorBar[valh, valv] (*Each is pos/neg error, first horizontal then vertical*)

Where the values given are either real numbers or a 2-element list that gives {neg_error, pos_error} (to work properly, the first value should actually be negative and the second positive). For example, using the RandomReal function that generates random values over the range $$[0,1)$$:

ErrorListPlot[
Table[{{i, Sqrt[i]},
ErrorBar[{-RandomReal[]/5, RandomReal[]/5},
{-RandomReal[]/5, RandomReal[]/5}]},
{i, 1, 16}],
PlotStyle -> Directive[PointSize[0], Blue]]`

Example ErrorListPlot.

Practice Plotting Errors

To practice putting plots together, using many of the sections above (Combining Graphs, Error Bars, and other basic concepts), try to reproduce the following graphic:

Plot to reproduce. The PointLegend function may prove useful. The function is just $$f(x)=x^2$$, and the size of error bars is not critical, just labeling and creating the right dataset.


text:
# How are Spice and Spectre different?

Status
Not open for further replies.

#### amsdesign

##### Member level 3
Correct me if I'm wrong.

Spice is a modelling language and a simulator.
Spectre is a simulator from Cadence. Is spectre a language too? For example what is a spectre netlist?
Also, I am given to understand .scs files are spectre files.
Yet, how is it that I spectre is not compatible with a .scs model file?

#### pancho_hideboo

Spectre is a simulator from Cadence.
Is spectre a language too?
Yes.

Synopsys HSPICE can not read other language than HSPICE.

You can convert SPICE Netlist to Spectre Netlist by the following.
Code:
%spp -convert < spice_netlist.sp > spectre_netlits.scs

https://www.designers-guide.org/Forum/YaBB.pl?num=1284463608/3#3
This is Spectre Netlist.

https://www.designers-guide.org/Forum/YaBB.pl?num=1284463608/13#13
https://www.designers-guide.org/Forum/YaBB.pl?num=1284463608/19#19
This is HSPICE Netlist.

You can use HSPICE Netlist partially even in Spectre Netlist.

Also, I am given to understand .scs files are spectre files.
Yet, how is it that I spectre is not compatible with a .scs model file?
I can not understand what you want to mean at all.
Describe correctly.

Last edited:

#### amsdesign

##### Member level 3
I have a transistor model in a .scs file.
Yet when I try to run a analog simulation in .vams and include the model file as well, the parser throws an error saying the .scs file cannot be read.
If .scs is a spectre file, shouldn't the spectre simulator be able to read one of its own?

#### pancho_hideboo

Yet when I try to run a analog simulation in .vams
I can not understand what you want to mean at all.
Describe correctly using correct terminolgies.

"*.vams" is a Verilog-A(AMS) module.

Both Spectre Netlist and Verilog-AMS can be master netlist.
However it depends on what simulator you use.

What simulator do you use ?

If you use Cadence Spectre, master netlist has to be Spectre Netlist and Verilog-AMS is slave.
Some device models written by Cadence Spectre Syntax might call Verilog-A(AMS) modules in them.

If you use Cadence NCSim(so called AMSDesigner), Verilog-AMS can be master.

Anyway describe your situations correctly using correct terminolgies.

Last edited:

Status
Not open for further replies.


text:
# How could I know if this function is strictly decreasing in m?

I have the following function:

((-2 b m - 2 w1 - 5 w2 + 3 m w2 + 7 w3 - 3 m w3 + Sqrt[
4 b^2 m^2 + (-2 w1 + w2 - 3 m w2 + w3 + 3 m w3)^2 +
4 b m (2 w1 + (5 - 3 m) w2 + (-7 + 3 m) w3)])/(6 (-1 + m) (w2 - w3)))

Subject to the following parameters restrictions:

w2 > w3 && w1 > 2 w2 - w3 && 0 < m < 1 && w3 > b > 0

I am trying to show that the previous function is strictly decreasing in m, given the range of the parameters. I tried to derivate the function, but the result is a very long expression. All the plots I did of the function gave me a strictly decreasing function.

Does anyone have an idea of how to solve this problem?

Pau

Is this what you're looking for?

expr = ((-2 b m - 2 w1 - 5 w2 + 3 m w2 + 7 w3 - 3 m w3 +
Sqrt[4 b^2 m^2 + (-2 w1 + w2 - 3 m w2 + w3 + 3 m w3)^2 +
4 b m (2 w1 + (5 - 3 m) w2 + (-7 + 3 m) w3)])/(6 (-1 + m) (w2 -
w3)));
assumptions = w2 > w3 && w1 > 2 w2 - w3 && 0 < m < 1 && w3 > b > 0;
Reduce[
D[expr, m] < 0
&&
assumptions
]

w2 > 0 && 0 < w3 < w2 && w1 > 2 w2 - w3 && 0 < b < w3 && 0 < m < 1

Simplify[%, Assumptions -> assumptions]

True

# Edit

I modified the answer after I noticed that 0 < m < 1 is part of your assumptions.

• Thank you for your comment! However, I dont understand why the answer of your code is the assumptions of the parameters? Is not clear to me, why 0 < m < 1 should tell me that the function is not universally decreasing in m. Aug 13, 2020 at 8:55
• @pau1996 Reduce simply finds the a simpler way to state the same thing as you put in, so the assumptions you put in have to come back out again in some way. See, for example, Reduce[x^2 + y^2 < 1 && x > 0, {x, y}]. The fact that 0 < m < 1 is part of the output tells you that this is a requirement for D[expr, m] < 0. In other words, for other values of m is isn't true. Try adding m > 1 to the assumptions: Reduce will return False then. Aug 13, 2020 at 9:19
• @pau1996 Oh, wait. I didn't catch that 0 < m < 1 is part of your assumptions. In that case, the fact that the assumptions come back tells you that D[expr, m] < 0 is indeed true. Aug 13, 2020 at 9:22
• Ok, thank you! I did not make it sufficiently clear. Aug 13, 2020 at 9:35
• @pau1996 The line with Simplify takes the previous output (%) and, well, simplifies it using the assumptions given. Unlike Reduce, Simplify will not return the given assumptions but only reduce the target expression under the assumptions provided. You can also use FullSimplify for more complicated expressions. Reduce, on the other hand, is generally the most powerful. I recommend searching around in the documentation and on SE if you want to learn more. If you have a specific question about these functions, please post a new question. Aug 13, 2020 at 10:17


text:
### Tutorial

• To investigate your genetic association study design, use the sliders and text boxes in the inputs section to select your parameters.
• Given your inputs, the calculated statistical power, expected disease allele frequencies, and probability of disease will be displayed in the results section.
• Change the independent variable at the top of the graphs section to visualize the change in power over the range of the selected parameter. All the other parameters remain as indicated in the inputs section. For the 'Cases + Controls' option indicating the total sample size, the ratio of cases to controls is specified by the calculation of 'Cases/Controls' in the inputs section.
• Click the menu at the top right hand side of graph to download plot and data.
• See below for parameter definitions and an example of how to use GAS Power Calculator.
• Click here to view the relevant equations used in calculating the results of GAS Power Calculator.

### Definitions - Inputs

Cases:
Number of cases available to genotype for the study. Ranges from 100 to 100,000.

Controls:
Number of controls available to genotype for the study. Ranges from 100 to 100,000.

Signficance Level ($$\alpha$$):
Desired false positive rate per genetic marker. If all M markers are independent, and you want a genome-wide false positive rate of x, the significance level should be $$\frac{x}{M}$$ . Ranges from 1e-10 to 1.

Prevalence (prev):
Disease prevalence in the general population. This is the probability that a randomly sampled individual has the disease. Ranges from 0.0001 to 1.

Disease Allele Frequency (DAF):
Frequency of the disease risk allele in the general population. Disease allele frequency is usually higher in cases and lower in controls. Ranges from 0.0001 to 1.

Genotype Relative Risk (GRR):
The genotype relative risk depends on the disease model, where $$f_0, f_1,$$ and $$f_2$$ are the disease probabilities for individuals with 0,1, or 2 copies of the disease risk allele. Ranges from 0.0001 to 1.
Multiplicative: $$GRR = \frac{f_1}{f_0} = \frac{f_2}{f_1}$$
Additive: $$GRR = \frac{f_1}{f_0}$$
Dominant: $$GRR = \frac{f_1}{f_0} = \frac{f_2}{f_0}$$
Recessive: $$GRR = \frac{f_2}{f_0} = \frac{f_2}{f_1}$$

*Note: The lower bound for prevalence, disease allele frequency, and genotype relative risk is greater than 0 due to the fact that the study is irrelevant when there is no disease.

### Definitions - Results

Expected power for a one-stage study (P):
Estimated statistical power given the input parameters. One-stage study (all samples genotyped on all markers in a single stage) indicated since the CaTS power calculator version has two-stage study capability.

Expected disease allele frequency for cases (casesDAF):
Estimated frequency of the disease risk allele in the cases population.

Expected disease allele frequency for controls (controlsDAF):
Estimated frequency of the disease risk allele in the controls population.

Probability of disease for genotype A/A (with frequency AAfreq) (AAprob):
Probability that an individual with 2 copies of the disease risk allele will have the disease, and the frequency of this genotype in the general population.

Probability of disease for genotype A/B (with frequency ABfreq) (ABprob):
Probability that an individual with 1 copy of the disease risk allele will have the disease, and the frequency of this genotype in the general population.

Probability of disease for genotype B/B (with frequency BBfreq) (BBfreq):
Probability that an individual with 0 copies of the disease risk allele will have the disease, and the frequency of this genotype in the general population.

### Examples

The following is an example of how you could use the GAS Power Calculator.
Suppose you are conducting a genome-wide association study with 1500 cases and 1500 controls. You plan to genotype these samples on 300,000 independent SNPs and are willing to tolerate a genome-wide false positive rate of 3. Therefore, your significance level will be 3/300000, or 0.00001. From previous studies, you know that the disease follows a multiplicative model and its prevalence is 0.10 with an allele frequency of 0.30 in the general population. Finally, you want determine the genotype relative risk that will result in a power of 0.80. To do this, you can select "Genotype Relative Risk" in the drop-down menu of the graph section and zoom in to see that a 0.80 power lies between a GRR of 1.295 and 1.3. At this point, use the GRR slider in the inputs section to estimate a more precise value (around GRR=1.2961). See the screenshots below or try it yourself!
Of course this is not the only application. Play around with the input values and the independent variable in the graph section to see how they influence the power of the study and the additional output values in the results section.


text:
Canadian Mathematical Society www.cms.math.ca
 location:  Publications → journals → CJM
Abstract view

# General Preservers of Quasi-Commutativity

 Read article[PDF: 360KB]
Published:2010-05-20
Printed: Aug 2010
• Gregor Dolinar,
Faculty of Electrical Engineering, University of Ljubljana, Ljubljana, Slovenia
• Bojan Kuzma,
Institute of Mathematics, Physics, and Mechanics, Ljubljana, Slovenia
 Format: HTML LaTeX MathJax PDF

## Abstract

Let ${ M}_n$ be the algebra of all $n \times n$ matrices over $\mathbb{C}$. We say that $A, B \in { M}_n$ quasi-commute if there exists a nonzero $\xi \in \mathbb{C}$ such that $AB = \xi BA$. In the paper we classify bijective not necessarily linear maps $\Phi \colon M_n \to M_n$ which preserve quasi-commutativity in both directions.
 Keywords: general preservers, matrix algebra, quasi-commutativity
 MSC Classifications: 15A04 - Linear transformations, semilinear transformations 15A27 - Commutativity 06A99 - None of the above, but in this section

 top of page | contact us | privacy | site map |

© Canadian Mathematical Society, 2016 : https://cms.math.ca/


text:
You are currently browsing the tag archive for the ‘restriction theorem’ tag.

One of the most fundamental principles in Fourier analysis is the uncertainty principle. It does not have a single canonical formulation, but one typical informal description of the principle is that if a function ${f}$ is restricted to a narrow region of physical space, then its Fourier transform ${\hat f}$ must be necessarily “smeared out” over a broad region of frequency space. Some versions of the uncertainty principle are discussed in this previous blog post.

In this post I would like to highlight a useful instance of the uncertainty principle, due to Hugh Montgomery, which is useful in analytic number theory contexts. Specifically, suppose we are given a complex-valued function ${f: {\bf Z} \rightarrow {\bf C}}$ on the integers. To avoid irrelevant issues at spatial infinity, we will assume that the support ${\hbox{supp}(f) := \{ n \in {\bf Z}: f(n) \neq 0 \}}$ of this function is finite (in practice, we will only work with functions that are supported in an interval ${[M+1,M+N]}$ for some natural numbers ${M,N}$). Then we can define the Fourier transform ${\hat f: {\bf R}/{\bf Z} \rightarrow {\bf C}}$ by the formula

$\displaystyle \hat f(\xi) := \sum_{n \in {\bf Z}} f(n) e(-n\xi)$

where ${e(x) := e^{2\pi i x}}$. (In some literature, the sign in the exponential phase is reversed, but this will make no substantial difference to the arguments below.)

The classical uncertainty principle, in this context, asserts that if ${f}$ is localised in an interval of length ${N}$, then ${\hat f}$ must be “smeared out” at a scale of at least ${1/N}$ (and essentially constant at scales less than ${1/N}$). For instance, if ${f}$ is supported in ${[M+1,M+N]}$, then we have the Plancherel identity

$\displaystyle \int_{{\bf R}/{\bf Z}} |\hat f(\xi)|^2\ d\xi = \| f \|_{\ell^2({\bf Z})}^2 \ \ \ \ \ (1)$

while from the Cauchy-Schwarz inequality we have

$\displaystyle |\hat f(\xi)| \leq N^{1/2} \| f \|_{\ell^2({\bf Z})}$

for each frequency ${\xi}$, and in particular that

$\displaystyle \int_I |\hat f(\xi)|^2\ d\xi \leq N |I| \| f \|_{\ell^2({\bf Z})}^2$

for any arc ${I}$ in the unit circle (with ${|I|}$ denoting the length of ${I}$). In particular, an interval of length significantly less than ${1/N}$ can only capture a fraction of the ${L^2}$ energy of the Fourier transform of ${\hat f}$, which is consistent with the above informal statement of the uncertainty principle.

Another manifestation of the classical uncertainty principle is the large sieve inequality. A particularly nice formulation of this inequality is due independently to Montgomery and Vaughan and Selberg: if ${f}$ is supported in ${[M+1,M+N]}$, and ${\xi_1,\ldots,\xi_J}$ are frequencies in ${{\bf R}/{\bf Z}}$ that are ${\delta}$-separated for some ${\delta>0}$, thus ${\| \xi_i-\xi_j\|_{{\bf R}/{\bf Z}} \geq \delta}$ for all ${1 \leq i (where ${\|\xi\|_{{\bf R}/{\bf Z}}}$ denotes the distance of ${\xi}$ to the origin in ${{\bf R}/{\bf Z}}$), then

$\displaystyle \sum_{j=1}^J |\hat f(\xi_j)|^2 \leq (N + \frac{1}{\delta}) \| f \|_{\ell^2({\bf Z})}^2. \ \ \ \ \ (2)$

The reader is encouraged to see how this inequality is consistent with the Plancherel identity (1) and the intuition that ${\hat f}$ is essentially constant at scales less than ${1/N}$. The factor ${N + \frac{1}{\delta}}$ can in fact be amplified a little bit to ${N + \frac{1}{\delta} - 1}$, which is essentially optimal, by using a neat dilation trick of Paul Cohen, in which one dilates ${[M+1,M+N]}$ to ${[MK+K, MK+NK]}$ (and replaces each frequency ${\xi_j}$ by their ${K^{th}}$ roots), and then sending ${K \rightarrow \infty}$ (cf. the tensor product trick); see this survey of Montgomery for details. But we will not need this refinement here.

In the above instances of the uncertainty principle, the concept of narrow support in physical space was formalised in the Archimedean sense, using the standard Archimedean metric ${d_\infty(n,m) := |n-m|}$ on the integers ${{\bf Z}}$ (in particular, the parameter ${N}$ is essentially the Archimedean diameter of the support of ${f}$). However, in number theory, the Archimedean metric is not the only metric of importance on the integers; the ${p}$-adic metrics play an equally important role; indeed, it is common to unify the Archimedean and ${p}$-adic perspectives together into a unified adelic perspective. In the ${p}$-adic world, the metric balls are no longer intervals, but are instead residue classes modulo some power of ${p}$. Intersecting these balls from different ${p}$-adic metrics together, we obtain residue classes with respect to various moduli ${q}$ (which may be either prime or composite). As such, another natural manifestation of the concept of “narrow support in physical space” is “vanishes on many residue classes modulo ${q}$“. This notion of narrowness is particularly common in sieve theory, when one deals with functions supported on thin sets such as the primes, which naturally tend to avoid many residue classes (particularly if one throws away the first few primes).

In this context, the uncertainty principle is this: the more residue classes modulo ${q}$ that ${f}$ avoids, the more the Fourier transform ${\hat f}$ must spread out along multiples of ${1/q}$. To illustrate a very simple example of this principle, let us take ${q=2}$, and suppose that ${f}$ is supported only on odd numbers (thus it completely avoids the residue class ${0 \mod 2}$). We write out the formulae for ${\hat f(\xi)}$ and ${\hat f(\xi+1/2)}$:

$\displaystyle \hat f(\xi) = \sum_n f(n) e(-n\xi)$

$\displaystyle \hat f(\xi+1/2) = \sum_n f(n) e(-n\xi) e(-n/2).$

If ${f}$ is supported on the odd numbers, then ${e(-n/2)}$ is always equal to ${-1}$ on the support of ${f}$, and so we have ${\hat f(\xi+1/2)=-\hat f(\xi)}$. Thus, whenever ${\hat f}$ has a significant presence at a frequency ${\xi}$, it also must have an equally significant presence at the frequency ${\xi+1/2}$; there is a spreading out across multiples of ${1/2}$. Note that one has a similar effect if ${f}$ was supported instead on the even integers instead of the odd integers.

A little more generally, suppose now that ${f}$ avoids a single residue class modulo a prime ${p}$; for sake of argument let us say that it avoids the zero residue class ${0 \mod p}$, although the situation for the other residue classes is similar. For any frequency ${\xi}$ and any ${j=0,\ldots,p-1}$, one has

$\displaystyle \hat f(\xi+j/p) = \sum_n f(n) e(-n\xi) e(-jn/p).$

From basic Fourier analysis, we know that the phases ${e(-jn/p)}$ sum to zero as ${j}$ ranges from ${0}$ to ${p-1}$ whenever ${n}$ is not a multiple of ${p}$. We thus have

$\displaystyle \sum_{j=0}^{p-1} \hat f(\xi+j/p) = 0.$

In particular, if ${\hat f(\xi)}$ is large, then one of the other ${\hat f(\xi+j/p)}$ has to be somewhat large as well; using the Cauchy-Schwarz inequality, we can quantify this assertion in an ${\ell^2}$ sense via the inequality

$\displaystyle \sum_{j=1}^{p-1} |\hat f(\xi+j/p)|^2 \geq \frac{1}{p-1} |\hat f(\xi)|^2. \ \ \ \ \ (3)$

Let us continue this analysis a bit further. Now suppose that ${f}$ avoids ${\omega(p)}$ residue classes modulo a prime ${p}$, for some ${0 \leq \omega(p) < p}$. (We exclude the case ${\omega(p)=p}$ as it is clearly degenerates by forcing ${f}$ to be identically zero.) Let ${\nu(n)}$ be the function that equals ${1}$ on these residue classes and zero away from these residue classes, then

$\displaystyle \sum_n f(n) e(-n\xi) \nu(n) = 0.$

Using the periodic Fourier transform, we can write

$\displaystyle \nu(n) = \sum_{j=0}^{p-1} c(j) e(-jn/p)$

for some coefficients ${c(j)}$, thus

$\displaystyle \sum_{j=0}^{p-1} \hat f(\xi+j/p) c(j) = 0.$

Some Fourier-analytic computations reveal that

$\displaystyle c(0) = \frac{\omega(p)}{p}$

and

$\displaystyle \sum_{j=0}^{p-1} |c(j)|^2 = \frac{\omega(p)}{p}$

and so after some routine algebra and the Cauchy-Schwarz inequality, we obtain a generalisation of (3):

$\displaystyle \sum_{j=1}^{p-1} |\hat f(\xi+j/p)|^2 \geq \frac{\omega(p)}{p-\omega(p)} |\hat f(\xi)|^2.$

Thus we see that the more residue classes mod ${p}$ we exclude, the more Fourier energy has to disperse along multiples of ${1/p}$. It is also instructive to consider the extreme case ${\omega(p)=p-1}$, in which ${f}$ is supported on just a single residue class ${a \mod p}$; in this case, one clearly has ${\hat f(\xi+j/p) = e(-aj/p) \hat f(\xi)}$, and so ${\hat f}$ spreads its energy completely evenly along multiples of ${1/p}$.

In 1968, Montgomery observed the following useful generalisation of the above calculation to arbitrary modulus:

Proposition 1 (Montgomery’s uncertainty principle) Let ${f: {\bf Z} \rightarrow{\bf C}}$ be a finitely supported function which, for each prime ${p}$, avoids ${\omega(p)}$ residue classes modulo ${p}$ for some ${0 \leq \omega(p) < p}$. Then for each natural number ${q}$, one has

$\displaystyle \sum_{1 \leq a \leq q: (a,q)=1} |\hat f(\xi+\frac{a}{q})|^2 \geq h(q) |\hat f(\xi)|^2$

where ${h(q)}$ is the quantity

$\displaystyle h(q) := \mu(q)^2 \prod_{p|q} \frac{\omega(p)}{p-\omega(p)} \ \ \ \ \ (4)$

where ${\mu}$ is the Möbius function.

We give a proof of this proposition below the fold.

Following the “adelic” philosophy, it is natural to combine this uncertainty principle with the large sieve inequality to take simultaneous advantage of localisation both in the Archimedean sense and in the ${p}$-adic senses. This leads to the following corollary:

Corollary 2 (Arithmetic large sieve inequality) Let ${f: {\bf Z} \rightarrow {\bf C}}$ be a function supported on an interval ${[M+1,M+N]}$ which, for each prime ${p}$, avoids ${\omega(p)}$ residue classes modulo ${p}$ for some ${0 \leq \omega(p) < p}$. Let ${\xi_1,\ldots,\xi_J \in {\bf R}/{\bf Z}}$, and let ${{\mathcal Q}}$ be a finite set of natural numbers. Suppose that the frequencies ${\xi_j + \frac{a}{q}}$ with ${1 \leq j \leq J}$, ${q \in {\mathcal Q}}$, and ${(a,q)=1}$ are ${\delta}$-separated. Then one has

$\displaystyle \sum_{j=1}^J |\hat f(\xi_j)|^2 \leq \frac{N + \frac{1}{\delta}}{\sum_{q \in {\mathcal Q}} h(q)} \| f \|_{\ell^2({\bf Z})}^2$

where ${h(q)}$ was defined in (4).

Indeed, from the large sieve inequality one has

$\displaystyle \sum_{j=1}^J \sum_{q \in {\mathcal Q}} \sum_{1 \leq a \leq q: (a,q)=1} |\hat f(\xi_j+\frac{a}{q})|^2 \leq (N + \frac{1}{\delta}) \| f \|_{\ell^2({\bf Z})}^2$

while from Proposition 1 one has

$\displaystyle \sum_{q \in {\mathcal Q}} \sum_{1 \leq a \leq q: (a,q)=1} |\hat f(\xi_j+\frac{a}{q})|^2 \geq (\sum_{q \in {\mathcal Q}} h(q)) |\hat f(\xi_j)|^2$

whence the claim.

There is a great deal of flexibility in the above inequality, due to the ability to select the set ${{\mathcal Q}}$, the frequencies ${\xi_1,\ldots,\xi_J}$, the omitted classes ${\omega(p)}$, and the separation parameter ${\delta}$. Here is a typical application concerning the original motivation for the large sieve inequality, namely in bounding the size of sets which avoid many residue classes:

Corollary 3 (Large sieve) Let ${A}$ be a set of integers contained in ${[M+1,M+N]}$ which avoids ${\omega(p)}$ residue classes modulo ${p}$ for each prime ${p}$, and let ${R>0}$. Then

$\displaystyle |A| \leq \frac{N+R^2}{G(R)}$

where

$\displaystyle G(R) := \sum_{q \leq R} h(q).$

Proof: We apply Corollary 2 with ${f = 1_A}$, ${J=1}$, ${\delta=1/R^2}$, ${\xi_1=0}$, and ${{\mathcal Q} := \{ q: q \leq R\}}$. The key point is that the Farey sequence of fractions ${a/q}$ with ${q \leq R}$ and ${(a,q)=1}$ is ${1/R^2}$-separated, since

$\displaystyle \| \frac{a}{q}-\frac{a'}{q'} \|_{{\bf R}/{\bf Z}} \geq \frac{1}{qq'} \geq \frac{1}{R^2}$

whenever ${a/q, a'/q'}$ are distinct fractions in this sequence. $\Box$

If, for instance, ${A}$ is the set of all primes in ${[M+1,M+N]}$ larger than ${R}$, then one can set ${\omega(p)=1}$ for all ${p \leq R}$, which makes ${h(q) = \frac{\mu^2(q)}{\phi(q)}}$, where ${\phi}$ is the Euler totient function. It is a classical estimate that

$\displaystyle G(R) = \log R + O(1).$

Using this fact and optimising in ${R}$, we obtain (a special case of) the Brun-Titchmarsh inequality

$\displaystyle \pi(M+N)-\pi(M) \leq (2+o_{N \rightarrow \infty}(1)) \frac{N}{\log N}$

where ${\pi(x)}$ is the prime counting function; a variant of the same argument gives the more general Brun-Titchmarsh inequality

$\displaystyle \pi(M+N;a,q)-\pi(M;a,q) \leq (2+o_{N \rightarrow \infty;q}(1)) \frac{q}{\phi(q)} \frac{N}{\log N}$

for any primitive residue class ${a \mod q}$, where ${\pi(M;a,q)}$ is the number of primes less than or equal to ${M}$ that are congruent to ${a \mod q}$. By performing a more careful optimisation using a slightly sharper version of the large sieve inequality (2) that exploits the irregular spacing of the Farey sequence, Montgomery and Vaughan were able to delete the error term in the Brun-Titchmarsh inequality, thus establishing the very nice inequality

$\displaystyle \pi(M+N;a,q)-\pi(M;a,q) \leq 2 \frac{q}{\phi(q)} \frac{N}{\log N}$

for any natural numbers ${M,N,a,q}$ with ${N>1}$. This is a particularly useful inequality in non-asymptotic analytic number theory (when one wishes to study number theory at explicit orders of magnitude, rather than the number theory of sufficiently large numbers), due to the absence of asymptotic notation.

I recently realised that Corollary 2 also establishes a stronger version of the “restriction theorem for the Selberg sieve” that Ben Green and I proved some years ago (indeed, one can view Corollary 2 as a “restriction theorem for the large sieve”). I’m placing the details below the fold.


text:
###### Example6.2.14Profit, Revenue, and Costs

From Example 6.2.11, we know the ketchup company's production costs, $$C$$ (in thousands of dollars), for producing $$x$$ thousand jars of ketchup is modeled by $$C=0.15x^2+6x+30\text{.}$$ The revenue, $$R$$ (in thousands of dollars), from selling the ketchup can be modeled by $$R=13x\text{,}$$ where $$x$$ stands for the number of thousands of jars of ketchup sold. The company's net profit can be calculated using the concept:

\begin{equation*} \text{net profit} = \text{revenue} - \text{costs} \end{equation*}

Assuming all products produced will be sold, a polynomial to model the company's net profit, $$P$$ (in thousands of dollars) is:

\begin{align*} P \amp= R-C\\ \amp= \left(13x\right)-\left(0.15x^2+6x+30\right)\\ \amp= 13x-0.15x^2-6x-30\\ \amp= -0.15x^2+\left(13x+(-6x)\right)-30\\ \amp=-0.15x^2+7x-30 \end{align*}
in-context


text:
#### Vol. 7, No. 9, 2013

 Recent Issues
 The Journal About the Journal Subscriptions Editorial Board Editors' Addresses Editors' Interests Scientific Advantages Submission Guidelines Submission Form Editorial Login Contacts Author Index To Appear ISSN: 1944-7833 (e-only) ISSN: 1937-0652 (print)
Vinberg's representations and arithmetic invariant theory

### Jack A. Thorne

Vol. 7 (2013), No. 9, 2331–2368
##### Abstract

Recently, Bhargava and others have proved very striking results about the average size of Selmer groups of Jacobians of algebraic curves over $ℚ$ as these curves are varied through certain natural families. Their methods center around the idea of counting integral points in coregular representations, whose rational orbits can be shown to be related to Galois cohomology classes for the Jacobians of these algebraic curves.

In this paper we construct for each simply laced Dynkin diagram a coregular representation $\left(G,V\right)$ and a family of algebraic curves over the geometric quotient $V∕∕G$. We show that the arithmetic of the Jacobians of these curves is related to the arithmetic of the rational orbits of $G$. In the case of type ${A}_{2}$, we recover the correspondence between orbits and Galois cohomology classes used by Birch and Swinnerton-Dyer and later by Bhargava and Shankar in their works concerning the 2-Selmer groups of elliptic curves over $ℚ$.

##### Keywords
arithmetic invariant theory, Galois cohomology, arithmetic of algebraic curves
Primary: 20G30
Secondary: 11E72


text:
### Home > PC3 > Chapter 4 > Lesson 4.2.2 > Problem4-74

4-74.

Compare and contrast $j(x)=\frac{x}{x+2}$ and $k(x)=\frac{x^2-2x}{x^2-4}$. How are the functions similar? How are they different?

$k(x)=\frac{x(x-2)}{(x+2)(x-2)}$

Graph each of the functions and compare them. Be sure to consider the locations of any discontinuities.


text:
0

# What is the ratio of a circle's circumference called?

Wiki User

2014-07-10 17:00:57

Best Answer

The ratio of a circle's circumference to its area is called the reciprocal of half the radius. The ratio of the circumference to its radius is called two times pi.

Wiki User

2014-07-10 17:00:57
This answer is:
Study guides

20 cards

➡
See all cards
3.75
1011 Reviews

## Add your answer:

Earn +20 pts
Q: What is the ratio of a circle's circumference called?
Write your answer...
Submit
Still have questions?
People also asked


text:
# Open and Equitable Scholarly Communications: Creating a More Inclusive Future – ACRL Insider

“ACRL is pleased to announce the release of “Open and Equitable Scholarly Communications: Creating a More Inclusive Future,” prepared for ACRL by Nancy Maron and Rebecca Kennison with Paul Bracke, Nathan Hall, Isaac Gilman, Kara Malenfant, Charlotte Roh, and Yasmeen Shorish. Developed over the course of a year with leadership from the Research and Scholarly Environment Committee (ReSEC) and with a high degree of community involvement, this powerful new action-oriented research agenda encourages the community to make the scholarly communications system more open, inclusive, and equitable by outlining trends, encouraging practical actions, and clearly identifying the most strategic research questions to pursue.

This report is an important contribution to ACRL’s core commitment to equity, diversity and inclusion which includes valuing different ways of knowing and identifying and working to eliminate barriers to equitable services, spaces, resources, and scholarship. The full research agenda is freely available on the ACRL website and will be available for purchase in print in the ALA store….”

# “Open and Equitable Scholarly Communications: Creating a More Inclusive” by Nancy Maron, Rebecca Kennison et al.

Abstract:  For many years, the academic and research library workforce has worked to accelerate the transition to more open and equitable systems of scholarship. While significant progress has been made, barriers remain. The Association of College and Research Libraries (ACRL) seeks to stimulate further advances through this action- oriented research agenda, which is designed to provide practical, actionable information for academic librarians; include the perspectives of historically underrepresented communities in order to expand the profession’s understanding of research environments and scholarly communication systems; and point librarians and other scholars toward important research questions to investigate. This report represents a yearlong process of reviewing the scholarly and practice-based literature to take into account established investigation coupled with extensive public consultation to identify the major problems facing the academic library community. Through interviews, focus groups, workshops, and an online survey, over 1,000 members of the ACRL community offered their thoughts and expertise to shape this research agenda. Incorporating guidance and input from ACRL’s Research and Scholarly Environment Committee and an advisory panel, this document recommends ways to make the scholarly communications and research environment more open, inclusive, and equitable.

# [Open letter to Donald Trump]

“On behalf of the undersigned national and regional library, research, publishing, and advocacy organizations, we are writing to express our commitment to ensuring that American taxpayers are guaranteed immediate, free, and unfettered access to the results of scientific research that their tax dollars support, and to encourage the Administration to support continued progress towards this shared goal. We strongly endorse updating existing U.S. policy to eliminate the current 12-month embargo period on articles reporting on publicly funded research, and to ensure that they are made immediately available under terms and conditions that allow their full reuse. To unlock the full value of our collective investment in science, the underlying data needed to validate an article’s conclusions, along with any corresponding software or code, should also be made immediately available….”

# ACRL/SPARC Forum: Collective Reinvestment in Open Infrastructure (ACRL)

Libraries are increasingly considering scaling back their subscriptions or cancelling big deals altogether. Yet, the question of how and where to reinvest the resources that become available is both far from settled and increasingly pressing. As we start to move away from the subscription model, we should be intentional about crafting the vision for open research communication we strive to build and how we intend to build it.

This forum, “If I Had A Million Dollars: Collective Reinvestment in Open Infrastructure,” will invite active participation throughout the session in a facilitated discussion with experts representing both libraries and research funders. …”

# Open and Equitable Scholarly Communications: Creating a More Inclusive Future

“For many years, the academic and research library workforce has worked to accelerate the transition to more open and equitable systems of scholarship. While significant progress has been made, barriers remain. The Association of College and Research Libraries (ACRL) seeks to stimulate further advances through this action-oriented research agenda, which is designed to provide practical, actionable information for academic librarians; include the perspectives of historically underrepresented communities in order to expand the profession’s understanding of research environments and scholarly communication systems; and point librarians and other scholars toward important research questions to investigate.

This report represents a yearlong process of reviewing the scholarly and practice-based literature to take into account established investigation coupled with extensive public consultation to identify the major problems facing the academic library community. Through interviews, focus groups, workshops, and an online survey, over 1,000 members of the ACRL community offered their thoughts and expertise to shape this research agenda. Incorporating guidance and input from ACRL’s Research and Scholarly Environment Committee and an advisory panel, this document recommends ways to make the scholarly communications and research environment more open, inclusive, and equitable….”

# Feedback on Draft ACRL Research Agenda – Deadline Extended to January 11 – ACRL Insider

“ACRL’s Research and Scholarly Environment Committee together with Rebecca Kennison and Nancy Maron – the authors selected by ACRL to design, develop, and deliver a new ACRL research agenda for scholarly communications and the research environment – are grateful for the feedback received thus far on the draft document for public comment. To ensure the robust community engagement continues, the deadline to comment has been extended to COB Friday, January 11, 2019….

Your input is crucial for ensuring the final document is as helpful as possible both in guiding academic librarians on actions that can be taken now to promote a more open system of scholarship and identifying essential areas that merit further investigation….”


text:
# Question applying Inverse trigonometry to show ${d\theta\over{dt}}={v\sin\theta\over L}$

There is a car moving along a straight road at the speed of $$v$$. There is a tree with the distance of $$L(t)$$ from the car. The angle the car is facing towards the tree is $$\theta(t)$$. Show that the following equation holds true: $${d\theta\over{dt}}={v\sin\theta\over L}$$

(This question is in another language from my book, so if the question isn't clear enough due to my bad translation, please ask for additional details in the comments)

I tried to use inverse trigonometric functions to solve this question since the book was talking about inverse trigonometric functions right before this question. I came up with this equation: $$\cos\theta(t) = {a-vt\over{L(t)}}$$ where $$a=L(t_{0})\cos\theta(t_{0})$$ and $$t_{0}$$ is the time when the car started moving towards the tree. Then, $$\theta(t)=\arccos{a-vt\over{L(t)}}$$ Therefore, $${d\theta\over{dt}}={d\over{dt}}\arccos{a-vt\over{L(t)}}$$ With intuition I thought that the above equation came pretty close to the question's given equation. But this is the point where I met a brick wall because I have no idea how to get the derivative of this particular $$\arccos$$. I learned about the inverse function theorem and have only dealt with much simpler functions like $$\arctan x$$.

Edit: The question didn't come with a picture or drawing, but this is what I imagine the picture would be like:

• Could you draw the setup? – Botond Aug 28 '19 at 13:03
• @Botond Check out my edit - I tried my best to draw what I imagine the question would be talking about. Though I think my drawing is too bad to give any more insight to the question :( – linearAlg Aug 28 '19 at 13:16
• Nice picture. Like it! – Quanto Aug 28 '19 at 14:46

It is kind of cumbersome to work out the derivatives in your equation since there are three time-dependent variables $$\theta(t), t$$ and $$L(t)$$. Also, you want to avoid taking the derivative of the inverse function directly.

Instead, it'd be much easier to start with just two time-dependent variables $$\theta(t)$$ and $$t$$,

$$\cot \theta (t) = \frac{a-vt}{b}$$

where $$b$$ is the vertical distance to the tree, a constant.

Then, take the derivatives with $$d(\cot \theta)/d\theta = -1/\sin^2 \theta$$ to get

$$\frac{1}{\sin^2\theta}\frac{d\theta}{dt} = \frac{v}{b}$$

$$\frac{d\theta}{dt} = \frac{v}{b}\sin^2\theta = \frac{v}{L}\frac{L}{b}\sin^2\theta=\frac{v}{L}\sin\theta$$

where $$\sin\theta = b/L$$ is used.

$$\theta (t) = \cot^{-1}\left(\frac{a-vt}{b}\right)$$
With $$d(\cot^{-1}x)/dx = -1/(1+x^2)$$,
$$\frac{d\theta}{dt} = \frac{\frac{v}{b}}{1+\left(\frac{a-vt}{b}\right)^2}= \frac{vb}{b^2+ (a-vt)^2}=\frac{vb}{L^2}=\frac{v}{L}\sin\theta$$
• Wow that is such great insight to solving the question! Just one follow-up question though, could you get ${d\theta\over{dt}}$ using the inverse function theorem on arccot? Or is it not possible to get it by going down that route – linearAlg Aug 28 '19 at 14:32