text:
1. ## iNow

Senior Members

9

23762

Moderators

8

47855

3. ## studiot

Senior Members

6

14381

4. ## joigus

Senior Members

5

2378

## Popular Content

Showing content with the highest reputation since 09/15/21 in Posts

1. ## What taxes a billionaire?

There are several parallel issues here. One is that wealth acquired by the ultra wealthy tends to get put into tax shelters and nebulous investments so it grows (but remains outside the system), whereas that same money in the hands of the less fortunate goes IMMEDIATELY into the community around them. They spend it on groceries and vehicle repairs and school clothes for kids and paying the electricity bill so it’s not dark in their apartment anymore at night and their kids can read. The providers of those goods and services in that community where this money is being spent ALSO spend the money once received for THEIR groceries and THEIR service needs and on THEIR kids. Dollar for dollar / unit for unit… the money in the hands of the less fortunate does more net good than money in the hands of the already fortunate. Yes, spending from the wealthy also creates jobs and injects money back into the system, but very little relative to money used in “trickle up” stimulation packages. Also, a bit of extra money in the hands of someone who already has a bunch of it doesn’t tend to change their behavior or encourage extra spending. Getting $1,000 tax break when you’re sitting on$50M isn’t going to suddenly result in them finally making a call to a plumber or the purchasing a new dishwasher… but for the person living paycheck to paycheck that money literally changes lives, gets spent and injected back into the system quickly, and results in lasting reductions in poverty and suffering. When you’re living at the margins, every dollar counts. It also costs a lot to be poor. When the washing machine breaks, you can’t afford a new one but you can afford to pump quarters into the machine at the laundromat… but that ends up being more expensive on net. When the car breaks down, you don’t get to work on time and you get fired. The rich, however, have tax protected ways of growing their wealth and can afford tax attorneys to hide it. Paying more tax has more impact on their ego than on their lived experience. The anger at the rich is out of hand, though. We need better policies and enforcement mechanisms, not more hate and vitriol directed at those doing better than us. Sadly, the anger is probably in large part intentionally being amplified by the very people on the receiving end. If they can keep everyone mad and focused on the wrong things, then the status quo remains stable and no progress or change gets made. Like most issues in economics, we make a huge mistake by treating it as a moral failure when at its core it’s a policy failure. Fixing the policy is just super hard because the people with the power to change the laws tend to be the same ones benefiting the most from them… and also because focusing on wonky policy details is hard for a public who’s often just trying to survive through to tomorrow and who’d much prefer throwing stones and being distracted with us/them tribalism. Perhaps this thread could try focusing on wonky policy details instead of distractions like yachts and steel boats… or not.
5 points
2. ## Why is there a growing movement to deny reality in America?

I think the biggest change is the internet. 20 years ago if you said the earth was flat your friends and family would laugh and say, "no that's not right" and you would find no one to agree with you. Now you can go on the internet and find hundreds or thousands of people who will agree with whatever batshit crazy idea you have.
3 points
3. ## Frank Sinatra is not a poached egg

Unless I'm misreading things, and adding in my own thoughts, I suspect it is not Davy that is missed but the conversations he generated among the other members. I'm thrilled he is gone as I hate his type of approach to discussion. I find it very rude and disingenuous. On the other hand, like with the many trolls who occasionally roam our halls, I learned a lot as people made honest attempts to educate him. It wasn't Davy who provided any insights, it was everyone else. I've never enjoyed burst water pipes, losing a job, or a serious illness in the family, but I am always better educated once it is over.
3 points
4. ## Game-changer for clean hydrogen production:

Hydrogen is not a power source. It’s a storage medium. Hydrogen technology is akin to battery technology. Hydrogen can only be as green as the power that creates it.
2 points
5. ## Game-changer for clean hydrogen production:

Just asking. Isn't Au (gold) a precious metal? It is good to see progress on better electrolyzers and I hope it flows through to renewable Hydrogen production. It won't become widely used without better electrolyzers. I see iron smelting and chemical feedstocks as the uses of most significance. I am less optimistic for H2 as transport fuel and as transportable fuel; iron production and chemical feedstocks can operate with on-site production and storage at low(er) pressure and therefore cheaper than bringing it from somewhere else. Battery electric looks better for vehicles - overall much higher energy efficiencies and piggy backs onto existing energy distribution networks. Hydrogen as transport fuel needs economy wide infrastructure built from zero. One more halving of battery costs will make existing type EV's unstoppable. One more doubling of energy density will make EV's unstoppable - and open up aviation to battery electric. Achieve both and it is game over for fossil fuels. Hydrogen won't be in that game. I'm cynical and think that, important as clean iron smelting and fertiliser production is too much is being made of Hydrogen - and the reason it has such widespread political support is that it can't do much any time soon. Those looking for empty gestures to follow up their empty gestures on zero emission targets like renewable Hydrogen sometime in the future, but so does the fossil fuel industry, that currently make most Hydrogen like it; it uses empty gestures on Carbon Capture and Storage to justify competing (with aid of subsidies from sympathetic politicians) against emerging clean Hydrogen and other clean energy.
2 points
6. ## Is this wise or appropriate?

I couldn't agree more. I think the sooner we make this discussion less political and passionate, the better for the flow of ideas on a topic that interests us all. I don't want to commit an opinion yet. I want to consider more arguments. Very interesting topic BTW.
2 points
7. ## [Math Challenge]: Prove to me that I am wrong.

! Moderator Note It still violates rule 2.7 ! Moderator Note This isn’t a treasure hunt site, it’s a discussion board.
2 points
8. ## Velocity and acceeration [ Vector calculus with applications ]

https://en.wikipedia.org/wiki/Whewell_equation Homework. No linear algebra or group theory here.
2 points
9. ## Curvature in space-time is shown as a "fabric"

No, this one is new to me. Thanks for bringing it up. Having skimmed through the link, my first impression is that this formalism is not nearly as elegant and intuitive as the standard one (and full equivalence with GR is yet to be shown). I kind of fail to see the advantage, though the point about substructure is interesting. See studiot’s comments on intrinsic vs extrinsic to begin with. Furthermore, there is not really any force involved in gravity - when you have initially parallel test particles in free fall, and attach an accelerometer to them, it will always read exactly zero, so no forces; nonetheless in the presence of gravity their geodesics will begin to deviate. Good question! This point is a bit subtle, and really the answer should be “both of the above, depending on context”. The physical manifestation of curvature is geodesic deviation - meaning that initially parallel world lines will begin to deviate as they extend into the future. It is thus necessary for world lines to have at least some extension in spacetime before “parallel” and “deviate” even make sense - you can’t speak of parallelism at a single event. Thus curvature has measurable meaning only across some distance. I’m highlighting the word ‘measurable’ because counterintuitively the mathematical object describing curvature (Riemann tensor) nonetheless is a local object, like all tensors. For clarification on this point, refer back to the example about calculus in my previous post. However, there are also scenarios where the effects of gravity are in some sense ‘relative’. Consider a hollow shell of matter, like a planet that has somehow been hollowed out (not very physical of course, but I’m just demonstrating a principle here). Birkhoffs Theorem tells us that spacetime everywhere in the interior cavity is perfectly flat, ie locally Minkowski. There’s no geodesic deviation inside the cavity. Now let’s place a clock into the cavity, and another reference clock very far way on the outside, so both clocks are locally in flat Minkowski spacetime. What happens? Even though both clocks are locally in flat spacetime (no gravity), the one inside the cavity is still gravitationally dilated with respect to the far way one! This is because while both local patches are flat, spacetime in between them is curved - if you were to draw an embedding diagram, you’d get a gravitational well with a ‘Mesa mountain’ at the bottom; and the flat top of that mountain sits at a lower level than the far away clock, thus the time dilation. So in this particular case one could reasonably say that gravitation effects are ‘relative’ between local patches. Or you can put it like this: both regions are Minkowski, but one is more Minkowski than the other The isn’t very intuitive, but mathematically perfectly consistent - if you look at the world lines of the clocks, you’ll find that while they appear parallel in space (they’re simply at rest wrt to one another), they deviate in spacetime. In GR it is crucially important that one fully understands local vs global, or else there’ll be no end to misunderstandings and problems. This point is where most, if not all, apparent ‘paradoxes’ in GR arise. In general, no, it’s not a scalar - it’s a rank-4 tensor field, the Riemann tensor. However, you can choose to look at only certain aspects of curvature, such as how volumes change (rank-2 Ricci tensor), or how areas differ from Euclidean counterparts (rank-0 Ricci scalar), or the average Gaussian curvature of a small region of space (rank-2 Einstein tensor). But to capture all aspects, you need the full rank-4 tensor with 20 independent components. Tensors are not invariant, but covariant - meaning their individual components do vary in just the right ways so that the relationships between the components remain, hence the overall object is the same for all observers. Remember a tensor is all about the relationships between its components.
2 points
10. ## Game-changer for clean hydrogen production:

https://phys.org/news/2021-09-game-changer-hydrogen-production.html Graphical abstract. Credit: DOI: 10.1016/j.nanoen.2021.106463: Curtin University research has identified a new, cheaper and more efficient electrocatalyst to make green hydrogen from water that could one day open new avenues for large-scale clean energy production. Typically, scientists have been using precious metal catalysts, such as platinum, to accelerate the reaction to break water into hydrogen and oxygen. Now Curtin research has found that adding nickel and cobalt to cheaper, previously ineffective catalysts enhances their performance, which lowers the energy required to split the water and increases the yield of hydrogen. Lead researcher Dr. Guohua Jia, from Curtin's School of Molecular and Life Sciences, said this discovery could have far-reaching implications for sustainable green fuel generation in the future. "Our research essentially saw us take two-dimensional iron-sulfur nanocrystals, which don't usually work as catalysts for the electricity-driven reaction that gets hydrogen from water, and add small amounts of nickel and cobalt ions. When we did this it completely transformed the poor-performing iron-sulfur into a viable and efficient catalyst," Dr. Jia said. more at link................................... the paper: https://www.sciencedirect.com/science/article/abs/pii/S2211285521007187?via%3Dihub Ni2+/Co2+ doped Au-Fe7S8 nanoplatelets with exceptionally high oxygen evolution reaction activity: Abstract: To overcome the limited potency of energy devices such as alkaline water electrolyzers, the construction of active materials with dramatically enhanced oxygen evolution reaction (OER) performance is of great importance. Herein we developed an ion diffusion-induced doping strategy that is capable of producing Ni2+/Co2+ doped two-dimensional (2D) Au-Fe7S8 nanoplatelets (NPLs) with exceptionally high OER activity outperforming the benchmark RuO2 catalyst. The co-existence of Co and Ni in Au-Fe7S8 NPLs led to the lowest OER overpotential of 243 mV at 10 mA cm-2 and fast kinetics with a Tafel slope of 43 mV dec-1. Density functional theory (DFT) calculations demonstrated that Ni2+/Co2+ doping improves the binding of OOH species on the {001} surfaces of Au-Fe7S8 NPLs and lowers the Gibbs free energy of the OER process, which are beneficial to outstanding OER activity of the nanoplatelets.
1 point
11. ## Making jelly (that's jello in USA I believe)

They were preserved in aspic.
1 point
12. ## Making jelly (that's jello in USA I believe)

My mother used to make jelly this way and it was tasty as well as having a pleasing texture. But in between her limited canning seasons, she bought a store brand jelly that was so stiff it ripped the bread when you tried to spread it. It tasted of grapes and children's tears. Ah, I forgot about how teeth can break down Jello viscosity! The culprit is one of your school's second grade teachers! I remember my eighth grade English teacher drawing a couple of stick figures holding a circle with a dot in the middle of it between them. She asked me what it was, and when I couldn't guess she said it was "two men walking abreast". Of course, this calls for my only jelly joke. In the midst of the Y2K panic in 1999, the KY Jelly company announced it was Y2K compliant. They called it Y2KY Jelly, and it allowed you to put all four digits in your date....
1 point
13. ## Why is there a growing movement to deny reality in America?

I think that is a big part of it. Fundamentally, we are utterly unprepared in dealing with social media. Or rather, our psychology is not well suited to deal with it. Fundamentally the issue at hand is one of trust. Few folks have the expertise and time to evaluate each claim they encounter and there is at best a superficial, intuitive evaluation of the facts. Moreover, we are prone to trust folks that we know or feel that we know more. In societies without with no mass media that makes a lot of sense. However, eventually mass media created celebrities. By seeing folks on a regular basis, even if one a screen, it creates the illusion of familiarity and this is why celebrities have a disproportionate influence on public opinion (see their role in promoting anti vaccination sentiments over the last decades). Now with social media, that effect further extends to random folks, youtubers and so on. Those folks are more trusted than individuals with actual expertise, in part because the latter are busy working in their field of expertise than using psychological tricks to make folks like (and subscribe) them. You can see that effect in classes now. College students increasingly cite random youtubers as sources of information, which I find rather worrying (and I used to be worried about wikipedia in the past). So the combination of a big network of trust without expertise and mistrust of gatekeepers seems to create a system where outrageous misinformation can speed happily along, leaving fact checking and similar slow measures in the dust. And I will also say that this is not an US-specific problem.
1 point
14. ## Do we need a new show on TV to get people interested in space exploration and science?

Colossus? 2010 was pretty good; in fact, one of the best depictions of AI and its potential problems. My SO's constant, rankling beef about Star Trek is the "synchronous orbit" where you see the planet rotate by underneath, and yet they never lose contact with the away team. That, and the "full stop" - in space. Mine is: You've developed warp drive and teleportation, but lost the concept of seatbelts and lanyards. Oddly, these niggles never stopped us watching the shows.
1 point
15. ## What taxes a billionaire?

This is for you @Peterkin...
1 point
16. ## Game-changer for clean hydrogen production:

Those were not incidents involving hydrogen. Hydrogen has one property which makes it rather more hazardous than natural gas- it has a very low ignition energy. On the other hand, the low molecular mass and comparatively low energy density (a litre of hydrogen carries less energy than a litre of methane) tend to reduce the risk. to exactly the same extent that it will leak through a badly made connection, it will also leak out of the area it is released into. There's a story of a demo where they emptied a tanker truck of liquid hydrogen onto the surface of a lake, waited 5 minutes and struck a match. They then invited anyone to do the same with petrol/ gasoline. Any fuel is, ipso facto, potentially dangerous. The way round that it to not let it escape. Not really. Once you tighten up the fittings so that the metal meets the metal, there's no hole. Practically speaking, Hydrogen won't diffuse through a mild steel pipe any more than propane will
1 point
17. ## Do we need a new show on TV to get people interested in space exploration and science?

Also it seems to me that OP sees SF in a very narrow context. The genre has almost always been more a commentary on society and its development rather than the application of science to a literary genres. In fact, more often than not, the "science" part is just the vehicle to make a point (similar to the purpose of, say, monsters in fantasy). There are of course notable exceptions where the science part is heavy and sometimes is considered under the genre of "hard" SF. As a whole it is but a small slice of the overall SF picture. As such one could expand the question to ask whether fiction or even literature is bad for society.
1 point
18. ## Do we need a new show on TV to get people interested in space exploration and science?

I'd put documentary above SF - they at least attempt (the ones I'm tempted by) to be factual, but I find I struggle to keep watching the doco's too; the last time I tried the overly dramatic background music and awestruck narration was just too much. And I was familiar with most of the content, so not much that was new. SF unfortunately presents a fantasy vision of Humans in Space that references the F of other SF far more than it references S. They get so much so wrong that I can't look past the mistakes. Whether back in my youth, when a space monster blocked the air intakes of the ship of Lost in Space - the Robinsons were going to asphyxiate (even then we thought it was stupid) - or my failed attempt to watch "Expanse", that others consider very good. Having the SF standard tyrannical and corrupt UN running Earth badly in Expanse was mildly irritating but I know most people who like SF will be Americans who have been taught to dislike and distrust the UN, so it hits their buttons (but annoy me) and there is an independent and powerful Mars (colonising Mars is inevitable, right?); these are the kind of tropes that get used to suit viewer tastes I don't share. But it was the water shortage on Ceres that lost me. Seriously? They are a major mining operation but they don't know you can heat carbonaceous chondrite material and get water? And don't they do recycling? There are some SF writers (of novels) that I enjoy a lot but very little of TV or cinema SF can grab me; it is the ones that don't take themselves seriously, that are unashamedly fantasy or comedy or both that are most likely to appeal to me.
1 point
19. ## Why is there a growing movement to deny reality in America?

The other side of this coin is that people are telling them not to trust, and to not get the vaccine…but the people at the top of the pyramid are vaccinated. It’s interesting seeing the shock of the drones at finding out e.g. FOX news has a vaccine mandate. It’s related to having authoritarians and grifters in power, and the way to show loyalty is to believe what they tell you rather than what you see with your lying eyes. It’s the price of belonging to the tribe.
1 point
20. ## Is it possible to take atoms out of an element to create another element?

Only in a rough sense; fission and particle ejection are classified as different reactions. Particle ejection can be endothermic, so you need an energetic particle to cause the proton to be removed. Almost certainly required if you eject more than one. Fissionable materials are typically very heavy nuclei, and fissile materials are a small subset. Particle ejection candidates are found over almost the whole range of the periodic table.
1 point
21. ## Is this wise or appropriate?

Well, I wonder then how reliable remote systems are. After all, presumably airplanes can also be controlled remotely and much of the flight is automated, anyway. In either case we presumably do not have real safety data to actually figure out whether having a manual backup (and hence a need for a pilot) would improve safety. As the flights are presumably very short and few in numbers it might not make much of a difference, but I think at this point one can only rely on massive extrapolation to form an opinion.
1 point
22. ## What taxes a billionaire?

It's a cognitive gap, apparently. The Craig. T. Nelson problem. Granted, he's only a millionnaire, so maybe that doesn't count.
1 point
23. ## The Official JOKES SECTION :)

(with thanks to new member @Doogles31731 for sending this)
1 point
24. ## Curvature in space-time is shown as a "fabric"

Correct - but with the caveat that the concept of ‘gravitational potential’ can only be meaningfully defined in certain highly symmetric spacetimes, such as Schwarzschild. It is not a generally applicable concept. Indeed. It vanishes locally in those regions, but not globally. Yes, correct. Think back to your math lessons in high school - remember how you drew simple graphs such as y=x^2. No question that the graph is globally curved. But now imagine you were to choose some point (eg x=2), and zoom into the graph there. What happens? The more you zoom in, the flatter it will begin to look. It’s just like that. This takes a while to really get your head around. I’m sorry I won’t try to offer a proper answer here, as typing LaTeX code on an on-screen phone keyboard is just too cumbersome and time consuming. What I will say though is don’t focus on the components, but on what objects you pass to the tensor, and what you get out as a result. Rough outline: Imagine you have two test particles, whose world lines are initially parallel. Now choose a point on one of these world lines - take the unit tangent vector at that point (which is physically just that particle’s 4-velocity). Then, still at that same point, take the perpendicular separation vector that connects it to the other particle’s world line. Now imagine the Riemann tensor as a machine with four slots (the four indices). Input the tangent vector into slots 2 & 4, and the separation vector into slot 3; leave the first slot empty. The output of the machine then is a new vector (because we left one index open) - it tells you how fast the separation between the test particles begins to change, and in what direction (relative acceleration between the test particles). Writing this down in math notation immediately gives you the geodesic deviation equation, bearing in mind that we need to use a covariant, not ordinary, second derivative. So the Riemann tensor is a machine that takes the tangent vector on one world line, and the separation vector between them as input; and produces as a result an acceleration vector that tells you how that separation between particles changes over time (geodesic deviation). This deviation can be a combination of any space and time direction, and can be complicated - you can get the world lines twisting around one another in a helix configuration, and all kinds of fancy stuff like that. This is really most of what there is to it in a GR context - Riemann has other uses as well (eg one can calculate tidal forces from it), but I won’t get into this here. It does in fact reflect all possible degrees of freedom of gravity. The individual components of the tensor represent tidal effects between various combinations of directions, but I really don’t think it’s helpful to try to look at it this way - it won’t help you understand. Better to think of it as a machine with slots that take an input, and produces an output; with the indices of the tensor being those slots. Any tensor can be conceptualised in that way - eg the Ricci tensor takes a future-pointing time-like unit vector into both slots, and produces a real number that is the rate at which a small volume changes when in free fall. In vacuum R(u,v)=0, so in vacuum a small volume in free fall is conserved (but its shape will get distorted, which is described by a different tensor). Inside a matter distribution, neither volume nor shape would be preserved. (Note carefully that this geometric interpretation only holds so long as there is no expansion, shear, or vorticity, which is true for most simple spacetimes) Hopefully this makes any kind of sense to you.
1 point
25. ## Is this wise or appropriate?

It's an obsession that is more akin to a religious obsession I suggest, in spamming his propaganda/philosophy, and ignoring the prime issue and question at hand. jealousy?? envy?? or a political obsession?
1 point
26. ## Is this wise or appropriate?

So kind of you to be willing to fall on your sword for such a noble cause but no one cares if your comment was political or religious or cultural. The point is it is off-topic. beecee is asking about technical risks, not your feeling about worthless rich people, the entertainment industry, or pollution.
1 point
27. ## Velocity and acceeration [ Vector calculus with applications ]

There are several ways to handle catenaries, but I often find that splitting the vertical axis into two with one section constant and the other parallel to the horizontala axis, as in the following.
1 point
28. ## Curvature in space-time is shown as a "fabric"

A very insightful comment, without any need to refer to index notation. +1
1 point
29. ## Velocity and acceeration [ Vector calculus with applications ]

Why is this not in Homework ? Hints What is s ? What is velocity in terms of s? What is acceleration in terms of velocity ?
1 point
30. ## Is this wise or appropriate?

I'm asking for opinions...You have given yours...thanks. Not everyone is as smart as you. 🤭Perhaps there decision/s are wrong. You take it easy, you sound rather edgy...🙄 Again the question/s stand.....Are they too confident in attempting a still rather dangerous venture, without a professional on board? Is it a wise and appropriate thing to do considering the safety of thehumans on board? [be they billionares or not] https://theconversation.com/spacex-inspiration4-mission-sent-4-people-with-minimal-training-into-orbit-and-brought-space-tourism-closer-to-reality-167611 The future of space tourism? Sending a crew of amateur astronauts into orbit is a significant step in the development of space tourism. However, despite the more inclusive feel of the mission, there are still serious barriers to overcome before average people can go to space. For one, the cost remains quite high. Though three of the four are not rich, Isaacman is a billionaire and paid an estimated \$200 million to fund the trip. The need to train for a mission like this also means that prospective passengers must be able to devote significant amounts of time to prepare – time that many ordinary people don’t have. Finally, space remains a dangerous place, and there will never be a way to fully remove the danger of launching people – whether untrained civilians or seasoned professional astronauts – into space. [Over 110,000 readers rely on The Conversation’s newsletter to understand the world. Sign up today.] Despite these limitations, orbital space tourism is coming. For SpaceX, Inspiration4 is an important proof of concept that demonstrated the safety and reliability of their autonomous rocket and capsule systems. Indeed, SpaceX has several tourist missions planned in the next few months, even though the company isn’t focused on space tourism. Some will even includes stops at the International Space Station. Even as space remains out of reach for most on Earth, Inspiration4 is an example of how billionaire space barons’ efforts to include more people on their journeys can give an otherwise exclusive activity a wider public appeal. <<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> https://phys.org/news/2021-09-spacex-tourist-crew-healthy-happy.html An Interesting mixture of the four all civilian crew.....
1 point
31. ## Global Economy (split from US Economics)

Pretty sure we had this same conversation about 6 years ago, but for purposes of this thread it suffices to say that it wasn’t debt. Summarized: It was forcing them to implement austerity from the outside when they needed the opposite. It was also a refusal to let them move to their own currency to make improving revenues more possible. Finally, the situation was made worse than it needed to be bc folks kept treating it as a moral / political issue instead of an economic one.
1 point
32. ## Is this wise or appropriate?

They don't seem to be clueless; I'm not terribly worried about their safety. I am, however, concerned that this is a one-off advertising gimmick - presumably to promote the newest fad in overpriced leisure activities, so that all future passengers are likely to be useless rich people, wasting jillions of dollars and fuel. Depending on the fuel used, they'll produce a significant to unacceptable amount of air pollution and CO2 emission . To no good purpose whatever.
1 point
33. ## Global Economy (split from US Economics)

A combination of reasons, as one would expect. Regulatory craziness is part of it, like how in the US you have to buy a car from a local dealership instead of a national chain or even direct from the manufacturer. Iirc, competition laws in Greece and Italy make forming large business groups difficult, so they don't benefit from economy of scale (such as small pharmacies that can't merge to form a CVS or Walgreen's). Then the small businesses have to employ a certain amount of people no matter what their industry is, and iirc more than half of Greeks work at small businesses. It's hard to make some efforts pay off if you have too many workers. They don't have a healthy mix of large and small business, imo. Unfortunately, corruption is worse usually in small business practices. Big corporations are more heavily watched and audited, and don't deal with as much cash. And corruption is what keeps many small businesses afloat that would otherwise have gone under. If you have a great business, it deserves to start small and grow on merit into a big business where it will be of more use to the economy, so the framework of small business tends to simultaneously give people a lot of potential to succeed and grow, as well as limiting their growth and making short cuts tempting. Plus the Greeks had borrowed heavily when they entered the EU (which they shouldn't have qualified for), and they suffered massive tax evasion from wealthy entrepreneurs so they had no revenue to pay back the loans. They also weren't as productive when using the new EU metrics, but still had access to all the borrowing power of an EU country.
1 point
34. ## Examples of Awesome, Unexpected Beauty in Nature

Try not to think about a fog that swirls around you quickly before vanishing, leaving you unexpectedly covered in bugs! STOP!
1 point
35. ## Solution to climate change?

Stromatolites. Amongst the first living organisms on earth circa 3.5 billion years ago and still going today. They were responsible for releasing the oxygen into a toxic (to us) atmousphere and making it breathable for oxygen breathers. https://www.bushheritage.org.au/species/stromatolites https://en.wikipedia.org/wiki/Stromatolite You may have seen the BBC series The Power of the Planet, presented by Iain Stewart https://www.bbc.co.uk/programmes/p00gczg5 An interesting reverse (geological not biological) process is the 'rusting of the rocks' https://www.newswise.com/articles/how-rocks-rusted-on-earth-and-turned-red
1 point
36. ## Should education be free?

You mention origami. There was an Institute of Origami in my home town, back in the 70s, but it folded.
1 point
37. ## Curvature in space-time is shown as a "fabric"

Thanks. Yes ,I thought of writing "Euclidean geometry" but was a bit uncertain as to the correct terminology "Natively" an auto misspelling for "naturally" I am guessing.(my bold)
1 point
38. ## What is friction

Look it up on the internet. There is no point in anyone here paraphrasing widely available basic science. If you have a more specific issue, by all means come back here and ask about it. If you are not a bot, that is.
1 point
39. ## Curvature in space-time is shown as a "fabric"

+1 to Markus for his patient conversation and explanations to Conscious Energy.
1 point
40. ## Curvature in space-time is shown as a "fabric"

There isn’t really any kind of ‘action’ in the mechanistic sense of the word. It’s just that test particles and their world lines are themselves part of spacetime, so they cannot do anything other than follow its underlying geometry. There’s no duality of any kind. See below analogy for clarity. As I’ve mentioned in my last post, there is information, in the form of the metric which determines the relationship between points. So it isn’t a ‘zero set’. This is true even very far from any sources - even spacetime without gravity has geometric structure that is different from that of Euclidean space. This is (eg) why you can’t accelerate to the speed of light - the fundamental reason for this is geometric, so geometry has real measurable consequences. It’s exactly like the calculus you learned at school - the derivative of a function is defined at a single point, yet gives you information about the slope of the entire function. That’s because what it really does is tell you about the relationship between neighbouring points on the graph of the function - how it changes from point to point. If you’re given just the (local) derivative, plus boundary conditions, you can reconstruct the entire function, even though any one single point of the function is just an (x,y) pair. To give an analogy (!!!) - suppose you have two people starting out on different points along the equator, and flying north simultaneously at a constant altitude. When they start out on the equator, let them be - say - 1000miles apart. What happens? The further north they get, the smaller the distance between them becomes. Eventually they’ll meet at the pole. Why? There is no detectable ‘action’ or force between the two planes. Each plane starts off at 90 degree angle from the equator (so their trajectories are initially parallel), and they always fly straight (there’s never any detectable change in direction from their initial trajectory). Yet they approach one another. That’s because they are both confined to the surface of the Earth, which is a sphere; so they must follow its intrinsic geometry. The metric governing this has real, detectable consequences. There is no detectable information about this at any one point on the Earth’s surface. This is because the geometry concerns relationships between points, so what you do is take measurements of path lengths, areas, or angles. For example, you’ll find that the sum of the angles in a triangle on Earth’s surface is no longer exactly 180 degrees - it’s possible to directly measure this deviation. But you can’t do it at a single point, you need to measure across some distance. That’s because the effects of a non-flat metric are accumulative - mathematically, you integrate components of the metric to obtain path lengths. To put it differently, the metric defines an inner product of tangent vectors, so it’s a local object, but with global effects across the manifold. Similar principles are true for curved spacetime as well. You can measure path lengths through spacetime pretty much directly (Shapiro delay, Pound-Rebka, gravitational wave detectors,...) and find that they differ from what you’d expect in a flat geometry. You can also directly measure angular distortions in the geometry, ie gyroscopic precessions, frame dragging etc. Gravitational light deflection is in effect a demonstration of the angle sum in a large triangle being different from 180 degrees close to a massive body. And so on.
1 point
41. ## Should education be free?

I expect that most people who don't want to pay taxes for taxpayer funded community education still like being part of a community that gets educated - they just want businesses and people other than themselves to pay for it, ie they want to get the benefits without paying for it. Businesses are advantaged by the availability of educated employees - as they benefit from healthy employees. Similarly they also benefit from employees of other companies being well paid, via strong consumer demand - but not want to pay their own well. I suspect the wealthy get more overall benefits from the services governments support through taxes than any other demographic - law and order to protect their wealth, infrastructure to support their business activities, educated workers, healthy workers. Programs that reduce inequality don't only divert money from the successful (deserving) to the unsuccessful (undeserving) they also reduce the risks of crime and social disruptions that, if allowed to grow can lead to riots, terrorism and militant uprisings. Education is a key pathway to sustainably reducing poverty across generations and that not only benefits the individuals and their families directly but benefits their neighbors and businesses and their owners and the State and Nation. I think the illusion that governments are like companies and running them like businesses would do it better is widely promoted and feeds popular opposition to taxpayer funded education and other "social" programs - but governments are not companies; where companies fire unproductive employees and costs are avoided they stay on the government's books whether they are productive or not and those kinds of costs resist being avoided.
1 point
42. ## Global Economy (split from US Economics)

Given that rates are historically low and practically zero, they have literally nothing BUT opportunity to raise them, significantly or otherwise. How so? One of the 'controls' used to keep inflation at manageable levels is variance of lending rates. Once the citizenry has taken on too much personal debt, the ability to raise lending rates has to be used very carefully ( or not at all ) as it would lead to massive defaulting on debt, bank failures and recession. As in 2008. We realized, then, that unrealistic debt levels were a problem, and stricter controls over borrowing were solutions, yet in my area, home ownership has become impossible or young pople, due to house prices doubling in the past two years ( over 1/2 Million is entry level ). Scarcity of rental property ownership has resulted in skyrocketing rents, and increased homelessness Have we already forgotten ?
1 point

1 point
44. ## Доказательство гипотезы Больших Чисел Дирака. Proof of the Hypothesis of Large Dirac Numbers.

70 posts, some of them have involved a lot of work and I still don't understand the basis of what you are saying about dimensions. Most of what you have posted assumes the reader understands and agrees with your basic statement about dimensions. I don't understand or agree. You mention unit analysis and also Tesla. There is a form of analysis in electrical power engineering called 'per unit' analysis. I don't know if you are trying to emulate this. The problem with 'unit analysis' is that the dimensions are hidden in the 'units' employed. They haven't really gone away. So can I respectfully suggest you put some of this effort into developing (proving) your underlying claim once and for all? Perhaps showing one simple example developed from start to fininsh, but involving as many as possible of the seven basic quantities in the LMTAθIN system. For your information here are two free websites where you build mathematical formulae and copy/paste into ScienceForums. http://www.sciweavers.org/free-online-latex-equation-editor https://www.codecogs.com/latex/eqneditor.php
1 point
45. ## Why bother with life when everything you do will get stolen anyway?

Possible? Yes. Probable? No. Please try going with just a little bit less ridiculousness and a little more reality in future posts. It will be appreciated.
1 point
46. ## Why bother with life when everything you do will get stolen anyway?

Did you just really suggest people are using deep fake video tech to falsely make it look like things in Afghanistan are kinda horrible for lots of people right now? GTFOH with that special brand of crazy sauce
1 point
47. ## Comparing Corona Virus Success Stories with Abysmal Failures

Interesting video by Dr. John Campbell on the current state of affairs with Covid. https://www.youtube.com/watch?v=VL8QnUM81Wo
1 point
48. ## Can some one explain this physics on how it works?

An ion lifter as described doesn't work in outer space; you need to ionize air molecules for them to work. But you are correct, it wouldn't be collisions that create the thrust, but the reaction from the motion of the ions you have created.
1 point
×


text:
# Manifolds covered by finitely many charts

Suppose $M$ is a connected topological manifold, which has a finite open cover $\{U_i\}$, where each $U_i$ is homeomorphic to $\mathbb{R}^n$. Is it necessarily true that $\pi_1(M)$ is finitely generated?

I tried to adapt the proof when $M$ is compact, but there are still subtleties I can't seem to get around; mainly, what happens in an intersection $U_i\cap U_j$. In the compact case you can refine the cover first to nicer sets, then take a finite subcover. But here that doesn't seem possible.

Consider $\Bbb R^2$ with a countable infinite discrete set removed, say the points $(n,0)$ for integer $n$. This can be covered by two sets homeomorphic to $\Bbb R^2$. But $\pi_1(M)$ is not finitely generated. A finite number of closed paths in $M$ will fail to wind about $(n,o)$ for $n$ large enough.

format: plain


text:
# Linear Model Selection and Regularization

An alternative fitting method to least squares, such as subset selection, shrinkage (ridge regression, lasso), and dimension reduction techniques (principle components analysis, partial least squares) can help prediction accuracy and model interpretability.

April 27, 2020 - 20 minute read -

### I. Overview

Why use an alternative fitting model to least squares?

• Prediction Accuracy
• If $n$ is not much larger than $p$, then least squares can have a lot of variability
• If $% $, then there is no longer a unique least squares coefficient estimate, and we must constrain or shrink the coefficients
• Model Interpretability
• Remove irrelevant variables with feature/variable selection

Alternatives to Least Squares

1. Subset selection: select a subset of predictors before fitting least squares
2. Shrinkage: fit model with all predictors, with coefficients shrunk toward 0 relative to the least squares estimate
3. Dimension reduction: projecting predictors onto an $M$-dimensional sbspace where $% $ by computing projections/linear combinations of the variables. These $M$ projections are then used as predictors for least squares.

### II. Subset Selection

Best Subset Selection

1. Let $M_0$ denote the null model.
2. For $k = 1, 2, ..., p$, fit all models with $k$ predictors, and choose the best one (smallest RSS/largest $R^2$), $M_k$.
3. Select the best model from $M_1, ..., M_k$ using a model selection metric such as adjusted $R^2$, AIC, BIC, or cross-validated prediction error.

Note: this is very computationally expensive, and infeasible for $p > 40$, since there are $2^p$ total models to check. In addition this method has high variance which can lead to overfitting.

Forward Stepwise Selection

1. Let $M_0$ denote the null model.
2. For $k = 0, 2, ..., p - 1$, consider all $p - k$ models that add one additional predictor to $M_k$, then choose the best one, $M_{k+1}$.
3. Select the best model from $M_0, ..., M_p$ using a model selection metric.

Note: this is much more computationally feasible than best subset selection with $1 + \frac{p(p+1)}{2}$ total models to check, but it’s not guaranteed to yield the “best” model for the training data. When $p>n$, this is the only feasible subset selection method.

Backward Stepwise Selection

1. Let $M_0$ denote the null model.
2. For $k = p, p-1, ..., 1$, consider all $k$ models that contain all but 1 of the predictors in $M_k$, a total of $k-1$ predictors, then choose the best one, $M_{k+1}$.
3. Select the best model from $M_0, ..., M_p$ using a model selection metric.

Note: Like forward selection, this only searches through $1 + \frac{p(p+1)}{2}$ models, and is not guaranteed to yield the best model. It cannot be used with $p>n$. Hybrid approaches (forward-backward) may be used as well.

Model selection statistics

We can choose the optimal model either by estimate the test error indirectly by adjusting the training error to account for overfitting bias, or directly by using a validation set or cross-validation.

• $C_p = \frac{1}{n} (\text{RSS} + 2 d \hat \sigma^2)$ ;
• Penalizes the model based on the number of predictors, $d$. Lower is better.
• If $\hat \sigma^2$ is an unbiased estimator of $\sigma^2$, then $C_p$ is an unbiased estimator of the test MSE.
• $\text{AIC} = \frac{1}{n \hat \sigma^2} (\text{RSS} + 2 d \hat \sigma^2)$ ;
• Use this for models fit by maximum likelihood.
• With gaussian errors, maximum likelihood = least squares.
• $\text{BIC} = \frac{1}{n \hat \sigma^2} (\text{RSS} + \log {n} d \hat \sigma^2)$ ;
• Use this for least squares model with $d$ predictors.
• Has a heavier penalty for models with many variables.
• $\text{Adj. } R^2 = 1 - \frac{\text{RSS} / (n - d - 1)} {TSS / (n-1)}$ ;
• Larger is better.

Note: These formulas are all for linear least squares, and can be generalized for additional model types.

Cross Validation or validation set error:

• Makes fewer assumptions about the underlying model, and can be used when the number of predictors is unknown, or $\hat \sigma^2$ cannot be estimated.
• One Standard Error Rule: choose the smallest model for which the estimated test MSE is within one standard error of the lowest point on the curve.

### III. Shrinkage

Shrinking coefficient estimates can significantly reduce model variance.

Ridge Regression

While least squares minimizes RSS, ridge regression picks coefficient estimates $\hat \beta^R$ to minimize:

Where:

• $\text{RSS} = \sum_{i = 1}^n \Bigl( _i - \beta_0 - \sum_{j = 1}^p \beta_j x_{ij} \Bigr) ^ 2$ ;
• $\lambda \geq 0$ is a tuning parameter
• $\lambda \sum_j \beta_j^2$ is the shrinkage penalty, and grows as $\lambda \to \infty$

It is best to perform ridge regression after standardizing the predictors (note the denomenator is the standard deviation of the $j$th predictor):

Improvements over least squares:

• Bias-variance tradeoff: as $\lambda$ increases, variance decreases and bias increases.
• In cases where relationships between predictors and response is approximate linear, then least squares will have low bias but may have high variance, in particular when the number of variables is almost as big, or bigger, than the sample size.
• Ridge regression works best when the least squares estimate has high variance.
• Computationally superior to best subset selection, since solving for all $\lambda$ is almost computationally equivalent to fitting least squares.

Drawback:

• Ridge regression will include all $p$ predictors in the final model, which presents challenges for interpretability.

Lasso

The lasso coefficients $\hat \beta_{\lambda}^L$ minimize the equation:

Where $\text{RSS } = \sum_{i = 1}^n \Bigl( _i - \beta_0 - \sum_{j = 1}^p \beta_j x_{ij} \Bigr) ^ 2$

Notes:

• Bias-variance tradeoff: as $\lambda$ increases, variance decreases and bias increases.
• Lasso uses an $l_1$ penalty instead of the $l_2$ penalty of ridge regression.
• The $l_1$ norm of coefficient vector $\beta$ is $\lVert \beta \rVert _1 = \sum \vert \beta_j \vert$.
• Performs variable selection by forcing some coefficients to 0, and yields sparse models.

Comparison of Ridge Regression and Lasso

Ridge Regression:

• $\min_{\beta} \text{\{RSS\}} \text{ subject to } \sum_{j = 1}^p \beta_j^2 \leq s$ ;
• uses $l_2$ penalty
• computationally feasible alternative to best subset selection
• outperforms lasso when all variables are related to the response, or when there are many predictors of relatively equal size.

Lasso:

• $\min_{\beta} \text{\{RSS\}} \text{ subject to } \sum_{j = 1}^p \vert \beta_j \vert \leq s$ ;
• uses $l_1$ penalty
• computationally feasible alternative to best subset selection
• outperforms ridge when only a few predictors have substantial coefficients, and the rest are very small or 0. It also has advantages in that it performs variable selection and is easier to interpret.

The tuning parameter $\lambda$ should be selected with cross validation by selecting a grid of $\lambda$ values, computing the cross-validation error for each $\lambda$, and selecting $\lambda$ for which cv error is smallest.

The classic image below1 illustrates the difference between ridge regression and lasso in two dimensions. Points along each red ellipse have equal RSS, and the blue areas represent the $l_1$ and $l_2$ constraints. The ridge and lasso solutions are where the red ellipses touch the blue areas.

Further intuition for a simple case is given below2 – we see that ridge regression shrinks every dimension of data by the same proportion, while lasso shrinks all coefficients toward 0 by a similar amount, and sufficiently small coefficients are shrunk to 0.

Extra Theory: a bayesian interpretation for ridge regression and lasso

Suppose that:

• a coefficient vector $\beta$ has a prior distribution $p(\beta)$, where $\beta = (\beta_0, ..., \beta_p)$
• the likelihood of the data can be written as $f(Y \vert X, \beta)$, where $X = (X_1, ..., X_p)$

Then, multipling the prior distribution by the likelihood gives the posterior distribution up to a proportionality constant:

Assume:

• $Y = \beta_0 + X_1 \beta_1 + ... + X_p \beta_p + \epsilon$ ; where $\epsilon \sim \text{iid} N(\mu, \sigma)$
• $p(\beta) = \Pi_{j = 1}^P g(\beta_j)$ for some density function $g$

Then,

• If $g$ is a gaussian distribution with mean 0 and standard deviation that is a function of $\lambda$, then the posterior mode (most likely value for $\beta$ given the data) for $\beta$ is given by the ridge regression solution.
• If $g$ is a double-exponential (Laplace) distribution with mean 0 and scale that is a function of $\lambda$, then the posterior mode for $\beta$ is given by the lasso solution.
• However, note that the lasso solution is not the posterior mean, and the posterior mean doesn’t yield a sparse coefficient vector.

A visualization of the gaussian and double-exponential distributions:3

### IV. Dimension Reduction Techniques

These techniques transform the predictors, before using least squares to fit a model with the transformed predictors. When the number of predictors is large relative to the sample size, then significantly reducing the number of dimensions can significantly reduce variance. In more formal terms…

Let $Z_1, ..., Z_m$ represent $% $ linear combinations of the original $p$ predictors:

Then using least squares, fit the linear regression model: $y_i = \theta_0 + \sum_{m = 1}^M \theta_m z_{im} + \epsilon_i$

• The regression coefficients are $\theta_0, ..., \theta_m$
• Dimensions are reduced from $p+1$ to $M+1$
• Coefficients are restrained by $\beta_j = \sum_{i = 1}^M \theta \phi_{jm}$

Principle Components Analysis

The first principle components vector is chosen from all combinations of predictors such that:

• $\phi_{11}^2 + ... + \phi_{pm}^2 = 1$ ;
• captures the highest variance of predictors
• defines the line that is as close as possible to the data
• the first principle components score for the $i$th observation is the distance in the $x$-direction of the $i$th projection from 0, the mean point of all predictors.
• all principle components vectors are orthogonal to each other

The second principle component $Z_2$ is a linear combination of the variables that is uncorrelated with $Z_1$ and has the largest variance, which means it must be orthogonal to the first principal component direction. Other principle components can be calculated in the same way.

Principle components regression

• assume that the directions in which $X_1, ..., X_p$ show the most variation are the directions that are associated with $Y$
• using more principle components means lower bias, higher variance
• this is NOT a feature selection method, since it combines all $p$ original features
• closely related to ridge regression

Notes:

• choose the number of principle components $M$ using cross validation
• standardize each predictor before generating principle components, so that high variance variables don’t dominate

Partial Least Squares

Partial Least Squares (PLS) is a supervised alternative to PCA that identifies new features $Z_1, ..., Z_m$ that are combinations of the original predictors and related to the response. The biggest drawback of PCA is that its components are not guaranteed to be the ones that best explain the response, since it’s unsupervised.

• compute the first PLS direction, $Z_1 = \sum_{j = 1}^p \phi_{j1} X_j$, by setting each $\phi_{j1}$ to the simple linear regression coefficients of $Y \sim X_j$.
• this places the highest weights on variables most strongly correlated with the response when calculating $Z_1$
• does not fit the predictors as well as PCA, but does a better job explaining the response
• compute the second PLS direction, $Z_2$, by regressing each variable on $Z_1$ and taking the residuals, then compute $Z_2$ by using the orthogonalized data in the same way as $Z_1$.
• Choose the number of predictors $M$ with cross-validation.

This method is popular in chemometrics, but in practice often performs no better than PCR or ridge regression. Relative to PCR, PLS has lower bias and higher variance.

Considerations in High Dimensions

What goes wrong when $p \geq n$?

• be careful of overfitting – always evaluate perfromance on an independent test set
• $C_p$, AIC, BIC cannot be used because estimating $\hat \sigma^2$ is problematic. Adjusted $R^2$ also can’t be used.

Tips:

• forward stepwise selection, ridge regression, lasso, and PCR are useful
• regularization/shrinkage plays a big role
• tuning parameter selection is very important
• test error will increase as dimensions increase unless additional features are truly predictive (curse of dimensionality)

Interpreting results

• In high dimensions, any variable can be written as a linear combination of the others. For this reason, we can’t know which variables are truly predictive of the outcome, or which coefficients are best.
• All models are only one of many possible models for prediction, and must be further validated on independent data sets.
• Never use the sum of squared errors, p-values, $R^2$, or others on training data as evidence of good fit. Instead, use either cross-validation results or test on an independent test set.

### V. Applications in R

1. Source: James et. al, Intro to Statistical Learning 7th edition, pg. 222

2. Source: James et. al, Intro to Statistical Learning 7th edition, pg. 226

3. Source: James et. al, Intro to Statistical Learning 7th edition, pg. 227


text:
# Math Help - Pythagorean theorem and an equilateral triangle

1. ## Pythagorean theorem and an equilateral triangle

Let ABC be an equilateral triangle and P be a point inside this triangle such that PA=x, PB=y and PC=z.

If $z^2 = x^2 + y^2$, find the length of the sides of triangle ABC in terms of x and y.

How do we go about this? AFAIK, the Pythagorean theorem can be applied to Right Angle Triangles. I am sure there is a Right Angle Triangle hidden somewhere in there...

2. ## Re: Pythagorean theorem and an equilateral triangle

1) It is an equilateral triangle. The Pythagorean Theorem will not do you much direct good.

2) If you construct a perpendicular on each of the three sides, through point P, you should start seeing Right Triangles in your dreams.

3. ## Re: Pythagorean theorem and an equilateral triangle

Yes I know I have to do something like that. But where in heavens name should point P be?

4. ## Re: Pythagorean theorem and an equilateral triangle

Originally Posted by cosmonavt
Let ABC be an equilateral triangle and P be a point inside this triangle
such that PA=x, PB=y and PC=z.
If $z^2 = x^2 + y^2$, find the length of the sides of triangle ABC in terms of x and y.
Say you take those 3 : PA, PB and PC, and form a triangle with them, what will you get?
A right triangle, agree? If not, then all I can say is you need basic help from your teacher.

OK, do some work:
draw equilateral triangle ABC, insert point P inside so that AP=3, CP=4 and BP = 5; like:
Code:
                 A

x=3

P

y=4            z=5

C                                  B
x^2 + y^2 = z^2
3^2 + 4^2 = 5^2
9 + 16 = 25
25 = 25 ; got that?

Now go calculate the side length of triangle ABC.
Once you "see" what's going on, do over in terms of x,y,z.

5. ## Re: Pythagorean theorem and an equilateral triangle

Well, before you edited ur post, I actually did some research on it.

As a general rule, for every equilateral triangle of side $a$, the area is given by $\frac{\sqrt{3}a^2}{4}$

If we make a point P at any random location in the triangle and draw three lines through it each perpendicular to a side, we end up in something like this (ignore the side lengths 1. Just assume them to be $a$)

Now the area of each separate triangle formed is

$\frac{1}{2}$ x a x h1

$\frac{1}{2}$ x a x h2 and

$\frac{1}{2}$ x a x h3

respectively.

Hence the equation:
$\frac{\sqrt{3}a^2}{4}$ = $\frac{1}{2}$ x a x h1 + $\frac{1}{2}$ x a x h2 + $\frac{1}{2}$ x a x h3

Multiplying both sides by $\frac{2}{a}$:

$\frac{\sqrt{3}}{2}$ $a$ = h1 + h2 + h3

in our case...

$\frac{\sqrt{3}}{2}$ $a$ = x + y + z

and the second equation is:

$z^2 = x^2 + y^2$

Now we can solve the two simultaneously to obtain a.

BUT

there are infinite values which satisfy the equation $z^2 = x^2 + y^2$

Putting those values in the equation $\frac{\sqrt{3}}{2}$ $a$ = x + y + z yields infinite values for a also.

6. ## Re: Pythagorean theorem and an equilateral triangle

Originally Posted by cosmonavt
> Well, before you edited ur post, I actually did some research on it.

The edit was to ADD stuff; all I had before the edit is still there...

> If we make a point P at any random location in the triangle......
>there are infinite values which satisfy the equation z^2 = x^2 + y^2

Yes; BUT in your problem's case, P cannot be at random,
since z^2 = x^2 + y^2; so x,y,z MUST be sides of a right triangle.

> Putting those values in the equation $\frac{\sqrt{3}}{2}$ $a$ = x + y + z yields infinite values for a also.

So what? You get a in terms of x,y,z; that's what you have been asked to do...
To wrap up, the problem is worded:
"find the length of the sides of triangle ABC in terms of x and y."
(notice that "z" is not part of final expression)

a = side length, k = SQRT(3)/2

a = [x + y + SQRT(x^2 + y^2)] / k

7. ## Re: Pythagorean theorem and an equilateral triangle

Yeah I just realized it :P Thanks man! I totally forgot the "in terms of x and y" part.

8. ## Re: Pythagorean theorem and an equilateral triangle

You're doing pretty good...what grade are you in?

9. ## Re: Pythagorean theorem and an equilateral triangle

Ahahaha, I am an A level student. U can say grade 12 in my country. But we are not taught much geometry in here. 90% of our syllabus is calculus. So yeah, it is something to be pleased at.

10. ## Re: Pythagorean theorem and an equilateral triangle

Originally Posted by cosmonavt
Ahahaha, I am an A level student. U can say grade 12 in my country. But we are not taught much geometry in here. 90% of our syllabus is calculus. So yeah, it is something to be pleased at.
"U" is not a word; should be "You":
may be important if you apply for a job in English !!

11. ## Re: Pythagorean theorem and an equilateral triangle

Originally Posted by cosmonavt
If we make a point P at any random location in the triangle
Another important word to get right.

You mean "an arbitrary point", not "a point...at any random location".

"Random" and "arbitrary" often are confused, but they are necessarily different.


text:
# Beamer - titlepage overlay?

I would like to have an overlay on the titlepage of my beamer presentation. More specifically I would like to have two versions of my title (one English, one German) that can be switched. Most preferably such that the surrounding box and the rest of this frame do not change (get shifted).

Schematically the document looks like this:

\documentclass{beamer}
\mode<presentation>
{
}
%more setup stuff

\title[]{Title A}
%\title[]{Title B}

\begin{document}
\begin{frame}
\titlepage
%some logos etc.
\end{frame}
\end{document}

Now my goal would be to have one slide with "Title A" and one with "Title B", just as if I would use overlay specifications on a normal slide. Is there a way to do this within beamer?

Edit:

Here's an explicit example of two titles that are of different length and for which there should be no change in the surrounding title box. See discussion below.

\title[]{%
\only<1>{This is a rather short title}%
\only<2>{Und dies ist eine deutlich längere Version, die sich über mehrere Zeilen erstreckt}%
}

Without any special treatment the titles are of different height and the rest of the frame shifts when switching.

-
With characteristic German efficiency Martin Scharrer has already answered this question: tex.stackexchange.com/questions/13793/… – Matthew Leingang May 12 '11 at 21:38

You could use \only inside \title:

\documentclass{beamer}
\mode<presentation>
{
}

\title[]{\only<1>{Title A}\only<2>{Title B}}

\begin{document}
\begin{frame}
\titlepage
%some logos etc.
\end{frame}
\end{document}

EDIT: here's a modified version when the titles have different length and have different heights; all the code between \makeatletter and \makeatother was written by Martin Scharrer in his answer to Beamer alt command like visible instead of like only (all the credit goes to him and to Matthew Leingang for pointing this out to me). The only modification I added was a new command to use \parboxes and to allow different vertical alignment for the titles.

\documentclass{beamer}
\mode<presentation>
{
}

% all the code between \makeatletter and \makeatother is from Martin Scharrer
\makeatletter
% Detect mode. mathpalette is used to detect the used math style
\renewcommand<>\Alt[2]{%
\begingroup
\ifmmode
\expandafter\mathpalette
\expandafter\math@Alt
\else
\expandafter\make@Alt
\fi
{{#1}{#2}{#3}}%
\endgroup
}

% Un-brace the second argument (required because \mathpalette reads the three arguments as one
\newcommand\math@Alt[2]{\math@@Alt{#1}#2}

% Set the two arguments in boxes. The math style is given by #1. \m@th sets \mathsurround to 0.
\newcommand\math@@Alt[3]{%
\setbox\z@ \hbox{$\m@th #1{#2}$}%
\setbox\@ne\hbox{$\m@th #1{#3}$}%
\@Alt
}

% Un-brace the argument
\newcommand\make@Alt[1]{\make@@Alt#1}

% Set the two arguments into normal boxes
\newcommand\make@@Alt[2]{%
\sbox\z@ {#1}%
\sbox\@ne{#2}%
\@Alt
}

% Place one of the two boxes using \rlap and place a \phantom box with the maximum of the two boxes
\newcommand\@Alt[1]{%
\alt#1%
{\rlap{\usebox0}}%
{\rlap{\usebox1}}%
\setbox\tw@\null
\ht\tw@\ifnum\ht\z@>\ht\@ne\ht\z@\else\ht\@ne\fi
\dp\tw@\ifnum\dp\z@>\dp\@ne\dp\z@\else\dp\@ne\fi
\wd\tw@\ifnum\wd\z@>\wd\@ne\wd\z@\else\wd\@ne\fi
\box\tw@
}

% syntax: \AltTitl[<position>]{<TitleA>}{<TitleA>}. Posible values for <position are> c,t,b
% default: c
\newcommand\AltTitle[3][c]{%
\Alt<2>{\parbox[#1]{.8\textwidth}{\Large\centering#2}}{\parbox[#1]{.8\textwidth}{\Large\centering#3}}
}
\makeatother

\title{\AltTitle[t]{Short Title A}{This is a really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really long Title B}}
\begin{document}

\begin{frame}
\titlepage
\end{frame}

\end{document}
-
Cool, I hadn't thought it to be possible to put overlay specifications into the title like this. However, one problem remains: the titles occupy a different number of lines and in the above solution this leads to a change in the size of the surrounding box. Could this be rectified somehow? Something like an overprint environment... (this does unfortunately not work out-of-the-box in the title). – janitor048 May 11 '11 at 8:22
@janitor048: You can always appropriately "complete" the shortest tile: \title[]{\only<1>{Title A\\\mbox{\strut}\\\mbox{\strut}}\only<2>{\strut Really really really really really really really really really really really really really really really really really really long Title B}} – Gonzalo Medina May 11 '11 at 11:40
I think this is getting close but the boxes are not exactly of equal size and the text still shifts. Maybe some savebox hack would do, I'll give it a try.. – janitor048 May 11 '11 at 12:57
@janitor048: with the example I just gave you there's no text shifting and the title box has the same size in both slides. If you are getting a different result, perhaps you could add an Edit to your question with the actual titles, so I could suggest you a solution. – Gonzalo Medina May 11 '11 at 13:01
@Gonzalo: I've edited my question to explicitly include an example for which the rest of the frame shifts (not my actual titles, but those might still change anyhow, so I would need a generic solution..). It also shifts, albeit only slightly, when using your \mbox approach. – janitor048 May 12 '11 at 20:05


text:
# Calculating the shear force of an impeller on cement mixture

1. Sep 19, 2010

### physicophile

Hello All,

I have a quick question for you. I have small sample of a cement-like-like-material and I am high shear mixing it using a power drill and a impeller blade. The material is placed a beaker and the impeller blade shears the cement of the bottom of the beaker. I would like to calculate the amount of shear I am imparting upon the cement while I am mixing it.

The impeller is shaped like a upper case T

Please tell me if I am approaching my problem in the correct manner.

Shear = F/Area
Force = Mass*Acceleration
Acceleration = (v)^2/r
V=(w*r)
w= RPS/(2*PI)

Therefore the shear force on the cement is ($$\int$$ mass *acceleration)/(area of impeller) = mass/(area of impeller)*$$\int$$ ((w*r)^2/r) = mass/(area of impeller)$$\int$$ (w^2*r^2)/r = w^2*mass/(area of impeller) $$\int$$ r^2/r
= w^2*mass/(area of impeller) $$\int$$ r = r^2*w^2*mass/(area of impeller)

The area of shear is the area of the bottom of the impeller in contact with the beaker, the cement is being mixed in.

Thank you very much for your help.

2. Sep 19, 2010

### nvn

physicophile: I didn't check the whole post, but shouldn't w be rps*(2*pi), instead of rps/(2*pi)? What does rps mean in your post?

3. Sep 19, 2010

### physicophile

Yes, you are right. Thanks for pointing that out to me. RPS = revolutions per second

4. Sep 19, 2010

### nvn

physicophile: First, you say you have a quick question. Why do you think this is a quick question? Anyway, I am currently not understanding all of your parameters. Wouldn't you need to draw, and post, a good free-body diagram, with the dimensions and vectors labeled and shown? Some of your quantities are not defined nor explained. Why do you think mass is one lumped mass, instead of, e.g., dm = rho*b*t*dr? Why do you think area is one, big (undefined) area, instead of, e.g., dA = b*dr? Why do you think integral(r) = r^2, with no dr? Why do you think force is just mass times acceleration, when much of the force is caused by a distributed shear force? You list a parameter called "Force" and one called "F," but we never see either in the derivation. You also listed capital V and lowercase v. Two ambiguous names for the same thing? Or two different parameters? Also, you seem to be mixed up regarding radial acceleration. Radial acceleration does not cause shear force here.

5. Sep 20, 2010

### physicophile

Please see attached pic for diagram set up and FBD

A= Power Drill – Contains a 8.5 AMP motor, No load speed of 3000 RPM. I do not know what the stall torque of the motor, nor do I have a motor toque /speed diagram

B= the impeller which is made of stainless steel. It has the following dimensions. Diameter = 2.300 inches, height of blade = 0.370, the width of blade = 0.10 inches. The mass of the impeller can be calculated using Mass= P*V=0.0056 kg/m^3 (assuming that p = 2700 kg/m^3 for AISI 304). The impeller is being scraped on the bottom of the mixing cup. I am physically pressing the cup into the impeller blade, so I am unsure of how much force the impeller blade is pressed into the cup with. If I had to guess I would say about 15 pounds.

C= Mixing Cup which has an diameter of 2.400 inches

D= Cement

“Why do you think mass is one lumped mass, instead of, e.g., dm = rho*b*t*dr? “
I am assuming the mass is the mass of the paddle blade shearing the mixture. This mass should not change. I the force acting upon my system in the x-y plane, therefore I was only taking the mass of the blade into consideration and am not factoring the force which I am pushing the bald into the mixing cup.

“ Why do you think integral(r) = r^2, with no dr?”
I did not add the dr because I forgot tothem into the equation.

As for the force, I was assuming the following.
Since I do not know the torque of my drill, I assumed the force acting upon the cement was
The angular acceleration of the blade times the mass of the blade. I thought that sense the mass of the blade was constant I did not have to use a double integral so I pulled it out of the equation.

#### Attached Files:

• ###### impeller FBD.gif
File size:
14.3 KB
Views:
148
6. Sep 20, 2010

### physicophile

Please let me know if you need me to clairfiy my post further. I am in a hurry right now to get to work now, so I did not have the time to compose a very good FBD or answer your questions in great detail.

Thanks

7. Sep 21, 2010

### nvn

physicophile: The angular velocity, w, is presumably constant. Therefore, the impeller mass is irrelevant. Integrate from zero to r1.

r1 = impeller radius = 29.21 mm = 0.029 21 m.
T = impeller shaft applied torque (N*m).
F1 = impeller shaft axial force = 67 N.
q1 = uniformly-distributed shear force on impeller due to cement viscosity and adhesion (N/m).
n1 = uniformly-distributed normal force on impeller due to pressing cup bottom against impeller (N/m) = F1/(2*r1).
mu = coefficient of friction between impeller and cup bottom.
q2 = uniformly-distributed shear force on impeller due to friction on cup bottom (N/m) = mu*n1 = 0.5*mu*F1/r1.

T = 2(q1 + q2)*integral(r*dr)
= 2(q1 + q2)(0.5*r1^2)
= (q1 + q2)*r1^2.

Unfortunately, I have no idea regarding the cement viscosity and adhesion; therefore, I have no idea regarding the value of q1. I also do not know the coefficient of friction, mu, for the impeller scraping against the cup bottom due to force F1. F1 is the normal force, due to you pressing the cup bottom against the impeller.

Perhaps the only way to obtain T is to attach some kind of torque measuring instrument between the impeller shaft and the power drill.


text:
## LaTeX forum ⇒ Page Layout ⇒ Multiple pagestyles in one document Topic is solved

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
ispacewalker
Posts: 2
Joined: Sat Sep 04, 2021 9:43 am

### Multiple pagestyles in one document

When multiple \pagestyle in one document, the page styles become quite strange. How can I make the first work until the second, the 2nd until the 3rd, and so on? Please run the following code to view the effect.

\documentclass{report}

\begin{document}

\newcommand*{\name}{plain}
\pagestyle{\name}
\chapter{\name}
Some stuff.
\newpage
{\Huge \name}

\pagestyle{\name}
\chapter{\name}
Some stuff.
\newpage
{\Huge \name}

\renewcommand*{\name}{empty}
\pagestyle{\name}
\chapter{\name}
Some stuff.
\newpage
{\Huge \name}
\end{document}

Bartman
Posts: 240
Joined: Fri Jan 03, 2020 2:39 pm
In this one-sided document, insert the \clearpage command before changing the page style, so that the changed style will only take effect from the new chapter.

Since the page style of the first page of each chapter is set to plain, the style selected by pagestyle is not set until the second chapter page.

A suggestion:

\documentclass{report}
\usepackage{etoolbox}

\newcommand*{\name}{plain}
% If the selected style should also apply to the first chapter page.
%\patchcmd{\chapter}{plain}{\name}{}{}
% or
%\patchcmd{\chapter}{\thispagestyle{plain}}{}{}{}

\begin{document}
\pagestyle{\name}
\chapter{\name}
Some stuff.
\newpage
{\Huge \name}

\pagestyle{\name}
\chapter{\name}
Some stuff.
\newpage
{\Huge \name}

\renewcommand*{\name}{empty}
\pagestyle{\name}
\chapter{\name}
Some stuff.
\newpage
{\Huge \name}
\end{document}

If I am right with my assumption concerning the first chapter page, it should work even much shorter:

\documentclass{report}
\usepackage{etoolbox}

\newcommand*{\name}{plain}
% If the selected style should also apply to the first chapter page.
\patchcmd{\chapter}{\thispagestyle{plain}}{\pagestyle{\name}}{}{}

\begin{document}
\pagestyle{\name}
\chapter{\name}
Some stuff.
\newpage
{\Huge \name}

\chapter{\name}
Some stuff.
\newpage
{\Huge \name}

\renewcommand*{\name}{empty}
\chapter{\name}
Some stuff.
\newpage
{\Huge \name}
\end{document}

The source code I replaced can be found in the report.cls file.

ispacewalker
Posts: 2
Joined: Sat Sep 04, 2021 9:43 am
Thank you very much! This problem had stressed me out for days.


text:
# Voxel traversal for parabolic projectile arc under constant gravity

For linear polynomials, there's a bunch of algorithms for efficiently determining which voxels to test for collision (eg. A Fast Voxel Traversal Algorithm for Ray Tracing ). I'm having troubles though, searching for algorithms that work for any other case, such as a parabolic projectile arc under constant gravity.

Are there any algorithms for that case, or am I stuck just trying to sample at a high enough frequency that only rarely will a projectile travel though a wall without getting detected.

If your gravity vector is purely vertical (let's call this the Y axis) and there's no sideways wind to account for, then the projectile's XZ position follows a straight line. If you don't have air resistance, then it moves along this line at a constant rate - just like our nice friendly linear raycasts!

So we can cast a "shadow" of the projectile straight down onto the XZ plane. We can work out which squares of the grid on this plane this line passes through using your ordinary raycasting/marching algorithm in 2D (or another line rasterization algorithm like Bresenham's). I show an example of this type of raymarching in this answer.

With this, we can work out the time-of-flight when the shadow crosses into each new square along its path. This tells us when the 3D projectile itself enters a new column of voxels.

By computing the height at each column-entry timestamp, using:

$$\vec p(t) = \vec h_0 + \vec v_0 \cdot t + \frac {\vec a} 2 \cdot t^2$$

...then we can get the height at which the projectile enters and exits each column.

The one other height we need is the height at the apex of the parabola. This is the one point where the projectile might touch voxels in a column outside the range from its entry to exit height. We can find this point with:

$$t_* = \frac {-v_y} {a_y}$$

Now we can walk through each of these key timestamps in sequence, from the entry into a new column of voxels, and up/down that column to the next timestamp in sequence (be it the apex or the entry into the next column over). This ensures we visit every voxel touched by the parabola, with only a small amount of work beyond the basic 2D raycast.


text:
# A common integral in disguise

Calculus Level 3

$\large \int_0^{\pi/2}\ln(\cos(x))\, dx$

If the above integral can be expressed as $$-\frac{\pi}{a} \log (z)$$ for positive integers $$a,z$$, find $$a+z$$.

×


text:
# Subgoals

## Section3.13Selection-WE6-P1

### Subsection3.13.1Subgoals for Evaluating Selection Statements

1. Diagram which statements go together.
2. For if-statement, determine whether expression is true or false.
3. If true, follow true branch. If false, follow else branch (OR do nothing if there is no else branch).

### Subsection3.13.2Select-WE6-P1

#### ExercisesExercises

##### 2.
Use this given setup for each of the questions below.
int alpha = 2, beta = 1, delta = 3, eta = 0, gamma = 0;
double omega = 2.5, theta = -1.3, kappa = 3.0, lambda = 0.0, rho = 0.0;

##### 3.
Q18: After executing the following code, the value in variable eta is .
##### 4.
Q19: After executing the following code, the value in variable a is and the value in variable b is .
##### 5.
Q20: After executing the following code, the value in variable x is and the value in variable y is .
You have attempted of activities on this page.


text:
# Example

Determine the incongruent solutions, if they exist, to the following:

$$4183x \equiv 5781 \pmod{15087}$$

First, we translate things back into equation form.

$4183x \equiv 5781 \pmod{15087}$ implies $5781 - 4183x = 15087n$ for some integer $n$. This in turn, suggests that we can write 5781 as a linear combination of 15087 and 4183:

$$4183x + 15087n = 5781$$

It is not clear by inspection, what the gcd of 4183 and 15087 is, so we proceed with the Euclidean algorithm to find out.

\begin{align} 15087 &= 3 \cdot 4183 + 2538\\ 4183 &= 1 \cdot 2538 + 1645\\ 2538 &= 1 \cdot 1645 + 893\\ 1645 &= 1 \cdot 893 + 752\\ 893 &= 1 \cdot 752 + 141\\ 752 &= 5 \cdot 141 + \fbox{47} \leftarrow \textrm{gcd}\\ 141 &= 3 \cdot 47 + 0 \end{align}

This tells us that the gcd of 4183 and 15087 is 47, so we verify that 5781 is a multiple of 47, which it is ($5781 = 123 \cdot 47$). We are thus guaranteed some solution, so we continue. We will first try to find a single solution to the intermediate equation: $4183x_1 + 15087n_1 = 47$, using the results of the Euclidean algorithm above.

\begin{align} 47 &= 752 - 5 \cdot 141\\ &= 752 - 5 \cdot (893 - 752)\\ &= 6 \cdot 752 - 5 \cdot 893\\ &= 6 \cdot (1645 - 893) - 5 \cdot 893\\ &= 6 \cdot 1645 - 11 \cdot 893\\ &= 6 \cdot 1645 - 11 \cdot (2538 - 1645)\\ &= 17 \cdot 1645 - 11 \cdot 2538\\ &= 17 \cdot (4183 - 2538) - 11 \cdot 2538\\ &= 17 \cdot 4183 - 28 \cdot 2538\\ &= 17 \cdot 4183 - 28 \cdot (15087 - 3 \cdot 4183)\\ &= 101 \cdot 4183 - 28 \cdot 15087 \end{align}

So $x_1=101$, $n_1=-28$ is a solution to $4183x_1 + 15087n_1 = 47$

Now we can use this to find a solution to our original equation: $4183x +15087n = 5781$. Simply multiply both $x_1$ and $n_1$ by 123 (since $5781 = 123 \cdot 47$).

Thus $x=12423$, $n=-3444$ is a solution to $4183x +15087n = 5781$

Adding the appropriate multiples to find all solutions from this one solution, we get

$$x=12423+\dfrac{15087}{47}k \textrm{ and }n=-3444-\dfrac{4183}{47}k$$

Simplifying, we find, $x=12423+321k$ and $n=-3444-89k$ gives all solutions to $4183x +15087n = 5781$

Of course, we don't really care what $n$ is, since it doesn't appear in our original congruence. Further, we are only considering the possible values of $x \pmod{15087}$, of which there are 47 that fit the $12423+321k$ form. Given the large number of solutions, we don't list them all. Instead, we can simply write our solution as:

$$x \equiv 12423 + 321k \pmod{15087} \textrm{, where k is any integer}$$

If we want an even tighter form, we might subtract off as many 321's from 12423 as we can without going negative, so that smaller numbers are used:

$$x \equiv 225 + 321k \pmod{15087} \textrm{, where k is any integer}$$


text:
# Chapter 3 :- Evaluating Properties¶

## Example 3.1 Page no-80¶

In [49]:
# Given:-
# Those with 1 are of state 1 and 2 are with state 2

# State 1
p1 = 10**5                     # initial pressure in pascal
x1 = 0.5                       # initial quality

T1 = 99.63                     # temperature in degree celcius, from table A-3
v = 0.5                        # volume of container in m3
vf1 = 1.0432*(10**(-3))        # specific volume of fluid in state 1 in m3/Kg(from table A-3)
vg1 = 1.694                    # specific volume of gas in state 1 in m3/kg(from table A-3)

# State 2
p2 = 1.5*(10**5)               # pressure after heating in pascal

T2 = 111.4                     # temperature in degree celcius in state 2, from A-3
vf2 = 1.0582*(10**(-3))        # specific volume of fluid in state 2 in m3/Kg, from A-3
vg2 = 1.159                    # specific volume of gas in state 2 in m3/Kg,from A-3

# Calculations

v1 = vf1 + x1*(vg1-vf1)        # specific volume in state 1 in m3/Kg
v2 = v1                        # specific volume in state 2 in m3/Kg
m = v/v1                       # total mass in Kg
mg1 = x1*m                     # mass of vapour in state 1 in Kg

x2 = (v1-vf2)/(vg2-vf2)        # quality in state 2
mg2 = x2*m                     # mass of vapor in state 2 in Kg

# State 3
p3 = 2.11                      # pressure in state 3 from table A-3

# Results
print '-> The temperature in state 1 is ',round(T1,2),'degree celcius.'
print '-> The temperature in state 2 is ',round(T2,2),'degree celcius.'
print '-> The mass of vapour in state 1 is',round(mg1,2),'kg.'
print '-> The mass of vapour in state 2 is',round(mg2,2),'kg.'
print '-> The pressure corresponding to state 3 is',round(p3,2),'bar.'

-> The temperature in state 1 is  99.63 degree celcius.
-> The temperature in state 2 is  111.4 degree celcius.
-> The mass of vapour in state 1 is 0.29 kg.
-> The mass of vapour in state 2 is 0.43 kg.
-> The pressure corresponding to state 3 is 2.11 bar.

## Example 3.2 Page no-81

In [50]:
# Given:-
m = 0.05                       # mass of ammonia in kg
p1 = 1.5*(10**5)               # initial pressure of ammonia in pascal
v1 = 0.7787                    # specific volume in state 1 in m3/kg from table A-14
v2 = 0.9553                    # specific volume in state 2 in m3/kg from table A-15
T2 = 25.0                      # final temperature in degree celcius

# Calculations

V1 = m*v1                      # volume occupied by ammonia in state 1 in m3
V2 = m*v2                      # volume occupied by ammonia in state 2 in m3
w = (p1*(V2-V1))/1000          # work in KJ

# Results
print '-> The volume occupied by ammonia in state 1 is ',round(V1,2),'m^3.'
print '-> The volume occupied by ammonia in state 2 is ',round(V2,2),'m^3.'
print '-> The work done for the process is',round(w,2),'KJ.'

-> The volume occupied by ammonia in state 1 is  0.04 m^3.
-> The volume occupied by ammonia in state 2 is  0.05 m^3.
-> The work done for the process is 1.32 KJ.

## Example 3.3 Page no-87¶

In [51]:
# Given:-
V = 0.25             # volume of tank in m3
v = 1.673            # specific volume in m3/kg obtained using table A-2

# State 1
T1 = 100.0            # initial temperature in degree celcius
u1 = 2506.5           # specific internal energy in state 1 in KJ/Kg obtained from table A-2

# State 2
p2 = 1.5              # final pressure in bars
T2 = 273.0            # temperature in state 2 in degree celcius obtained from table A-4
u2 = 2767.8           # specific internal energy in state 2 in KJ/Kg obtained from table A-4

# Calculations
m = V/v               # mass of the system in kg
DeltaU = m*(u2-u1)    # change in internal energy in KJ
W = - DeltaU          # from energy balance

# Results
print '-> The temperature at the final state in is',round(T2,2),' degree celcius.'
print '-> The work during the process is',W,'KJ.'

-> The temperature at the final state in is 273.0  degree celcius.
-> The work during the process is -39.0466228332 KJ.

## Example 3.4 Page no-88

In [52]:
# Given:-
# State
P1 = 10*(10**5)                        # initial pressure in pascal
T1 = 400.0                             # initial temperature in degree celcius
v1 = 0.3066                            # specific volume in state 1 in m3/kg obtained from table A-4
u1 = 2957.3                            # specific internal energy in state 1 in KJ/Kg obtained from table A-4

# State 2

v2 = 0.1944                            # specific volume in state 2 in m3/kg obtained from table A-3
w2to3 = 0                              # work in process 2-3

# State 3
v3 = v2
vf3 = 1.0905*(10**(-3))                # specific volume of fluid in state 3 from table A-2
vg3 = 0.3928                           # specific volume of gas in state 3 from table A-2
uf3 = 631.68                           # specific internal energy for fluid in state 3 from table A-2
ug3 = 2559.5                           # specific internal energy for gas in state 3 from table A-2

# Calculations
w1to2 = (P1*(v2-v1))/1000              # work in KJ/Kg in process 1-2
W = w1to2 + w2to3                      # net work in KJ/kg
x3 = (v3-vf3)/(vg3-vf3)
u3 = uf3+x3*(ug3-uf3)                  # specific internal energy in state 3 in Kj/Kg
q = (u3-u1) + W                        # heat transfer in Kj/Kg

# Results
print '-> The work done in the overall process is',W,'KJ/kg.'
print '-> The heat transfer in the overall process is',q,'KJ/kg.'

-> The work done in the overall process is -112.2 KJ/kg.
-> The heat transfer in the overall process is -1486.43658885 KJ/kg.

## Example 3.6 Page no-98

In [53]:
# Given:-
# State 1
p1 = 20.0                      # initial pressure in MPa
T1 = 520.0                     # initial temperature in degree celcius
Z1 = 0.83                      # compressibility factor
R = 8.314                      # universal gas constant in SI unit
n = 1000.0/18.02               # number of moles in a kg of water

# State 2
T2 = 400.0                     # final temperature in degree celcius

# From table A-1
Tc = 647.3                     # critical temperature in kelvin
pc = 22.09                     # critical pressure in MPa

# Calculations
Tr = (T1+273)/Tc               # reduced temperature
Pr = p1/pc                     # reduced pressure
v1 = (Z1*n*R*(T1+273))/(p1*(10**6))
vr = v1*(pc*(10**6))/(n*R*Tc)
Tr2 = (T2+273)/Tc
PR = 0.69                       # at above vr and Tr2
P2 = pc*PR

# Results
print '-> The specific volume in state1 is',v1,'m3/kg and the corresponding value obtained from table A-4 is .01551 m^3/Kg'
print '-> The pressure in MPa in the final state is',P2,' MPa and the corresponding value from the table is 15.16Mpa'

-> The specific volume in state1 is 0.0151836616537 m3/kg and the corresponding value obtained from table A-4 is .01551 m^3/Kg
-> The pressure in MPa in the final state is 15.2421  MPa and the corresponding value from the table is 15.16Mpa

## Example 3.7 Page no:-101

In [54]:
%matplotlib inline

Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].
For more information, type 'help(pylab)'.
In [55]:
# Given:-
T1 = 300.00                                 #temperature in state 1 in kelvin
P1 = 1.00                                   #pressure in state 1 in bar
P2 = 2.00                                   #pressure in state 2 in bar
R = 287.00                                  #gas constant of air in SI units

# Calculations
v1 = (R*T1)/(P1*10**5)                    #specific volume in state 1
v = []
P = []
vv = []
Pa = []
pp = []
pcommon = []
vcommon = []
from numpy import linspace
from pylab import *
P = linspace(1,2,50)
for i in range(0,50):
v.append(i)
v[i] = v1

T2 = (P2*10**5*v1)/R
v3 = (R*T2)/(P1*10**5)
vv = linspace(v1,v3,50)
for i in range(0,50):
Pa.append(i)
Pa[i] = P1

#function[out]= f(inp)
#out = (R*T2)/(inp

VV = linspace(v1,v3,50)
for j in range(0,50):
pp.append(j)
pp[j] = (R*T2)/((VV[j])/(10**5))

vcommon = numpy.concatenate((v, VV))
pcommon = numpy.concatenate((P, pp))

plot(vcommon,pcommon)
xlabel('v')
ylabel('p(bar)')
show()
plot(vv,Pa)
xlabel('v')
ylabel('p(bar)')
show()
#The two steps are shown in one graph and the other on is shown in the other graph"""

print 'The temperature in kelvin in state 2 is T2 = ',T2
print 'The specific volume in state 3 in m^3/kg is  v = ',v3

The temperature in kelvin in state 2 is T2 =  600.0
The specific volume in state 3 in m^3/kg is  v =  1.722

## Example 3.8 Page no-108

In [56]:
# Given:-
# State 1
m = 0.9                               # mass of air in kg
T1 = 300.0                            # initial temperature in kelvin
P1 = 1.0                              # initial pressure in bar

# State 2
T2 = 470.0                            # final temperature in kelvin
P2 = 6.0                              # final pressure in bar
Q = -20.0                             # heat transfer in kj

# From table A-22
u1 = 214.07                           # in KJ/kg
u2 = 337.32                           # in KJ/Kg

# Calculations
deltaU = m*(u2-u1)                    # change in internal energy in kj
W = Q - deltaU                        # in KJ/kg

# Results

print '-> The work during the process is ',W,' KJ.'

-> The work during the process is  -130.925  KJ.

## Example 3.9 Page no-109

In [57]:
# Given:-
# State 1
m1 = 2.0                          # initial mass of gas in tank 1 in kg
T1 = 350.0                        # initial temperature in kelvin in tank1
p1 = 0.7                          # initial pressure in bar in tank 1

# State 2
m2 = 8.0                          # initial mass of gas in tank 2 in kg
T2 = 300.0                        # initial temperature in kelvin in tank 2
p2 = 1.2                          # initial pressure in bar in tank 2
Tf = 315.0                        # final equilibrium temperature in kelvin

# From table A-20
Cv = 0.745                        # in KJ/Kg.k

# Calculations
pf = ((m1+m2)*Tf)/((m1*T1/p1)+(m2*T2/p2))
Ui = (m1*Cv*T1)+(m2*Cv*T2)
Uf = (m1+m2)*Cv*Tf
deltaU = Uf-Ui
Q = deltaU

# Results
print '-> The final equilibrium pressure is',pf,'bar.'
print '-> The heat transfer for the process is',Q,'KJ.'

-> The final equilibrium pressure is 1.05 bar.
-> The heat transfer for the process is 37.25 KJ.

## Example 3.11 Page no-113

In [58]:
# Given:-
p1 = 1.0                               # initial pressure in bar
T1 = 295.0                             # initial temperature in kelvin
p2 = 5.0                               # final pressure in bar
n = 1.3                                # polytropic constant
R = 8314/28.97                         # gas constant for air in SI units

# From table A-22
u2 = 306.53
u1 = 210.49

# Calculations
T2 = T1*(p2/p1)**((n-1)/n)
w = R*(T2-T1)/(1-n)
Q = u2-u1+w/1000

# Results
print '-> The work done per unit mass is ',w/1000,'KJ/kg.'
print '-> The heat transfer per unit mass is',Q,'KJ/kg.'

-> The work done per unit mass is  -126.928201465 KJ/kg.
-> The heat transfer per unit mass is -30.888201465 KJ/kg.


text:
# Modifying XNAT to Run on Tomcat 8.5 and Later

This page describes how to modify the XNAT war or deployed application to run under different versions of Tomcat.

As of version 1.8.2 (currently in development), XNAT is built to work with Tomcat 8.5 by default. If you are running Tomcat 7.0, support for it ended on 31 March, 2021 and it will be removed from many repositories before too long. You should consider migrating to Tomcat 8.5 as soon as possible. There are no known issues with running on Tomcat 9.0, but this is not yet an officially supported deployment scenario.

# Running XNAT 1.8.1 and earlier with Tomcat 8.5 and later

The default war for XNAT 1.8.1 and earlier is built to run under Tomcat 7. If you need to use Tomcat 8.5 or 9, you should consider upgrading to XNAT 1.8.2, but if you can't:

1. Extract the file META-INF/context.xml (this requires having the Java JDK available on your path):

$jar xf xnat-web-1.8.1.war META-INF/context.xml This file should look something like this (edited for clarity): <?xml version="1.0" encoding="utf-8"?> <Context> <Loader className="org.apache.catalina.loader.VirtualWebappLoader" searchVirtualFirst="true" virtualClasspath="${xnat.home}/plugins/*.jar"/>
<JarScanner scanAllDirectories="true" />
<Parameter name="xnatHome" value="${xnat.home}"/> <Manager pathname="" /> </Context> 2. Edit META-INF/context.xml and delete the line with the <Loader> element. 3. Add the following lines to the file right after the <Context> element: <Resources> <PostResources className="org.apache.catalina.webresources.DirResourceSet" base="${xnat.home}/plugins" webAppMount="/WEB-INF/lib" />
</Resources>
<CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" />
4. Save the file and close your editor.
5. Update the war file with your modified META-INF/context.xml file:

$jar uf xnat-web-1.8.1.war META-INF/context.xml 6. Continue with your deployment/installation using the updated war file in place of the standard XNAT application. The standard releases of XNAT 1.8.1 and earlier already have the lines required for Tomcat 8 compatibility, but they're commented out. Delete the <Loader> element then delete the "!--" string at the beginning of the <Resources> element and the "--" string at the end of the <CookieProcessor> element. The final version of your modified configuration file should look like this: <?xml version="1.0" encoding="utf-8"?> <Context> <Resources> <PostResources className="org.apache.catalina.webresources.DirResourceSet" base="${xnat.home}/plugins" webAppMount="/WEB-INF/lib" />
</Resources>
</Context>


text:
# Prove that if a, b, x, y are integers with ax + by = gcd(a, b) then gcd(x,y)= 1

How would I go about proving this: Prove that if a, b, x, y are integers with ax + by = gcd(a, b) then gcd(x,y)= 1

-

Hint: $\gcd(a,b)$ divides both $a$ and $b$, so if you divide both sides of the equation by $\gcd(a,b)$ ...

-
So since ax+by=gcd(a,b) if I divide by the gcd(a,b) the equation that I am left with is equal to 1. Would this prove that gcd(x,y) must be 1? –  Anthony Nov 5 '12 at 22:30
I think you got it from Brian Scott's helpful response. But yes, if you know that $a' x + b' y = 1$, then $\gcd(x,y)=1$ because you hopefully proved a theorem in your class that $\gcd(x,y)$ is the smallest positive integer that can be written in the form $rx + sy$ with $r,s \in \mathbb{Z}$. So if you can write $1$ in this form, it must be the $\gcd$. –  Michael Joyce Nov 5 '12 at 23:16

HINT: Show that $\gcd(a,b)\cdot\gcd(x,y)$ divides $ax+by$ and therefore divides $\gcd(a,b)$.

Added: Let $d=\gcd(a,b)$; by definition there are integers $a'$ and $b\,'$ such that $a=a'd$ and $b=b\,'d$, so $a'dx+b\,'dy=d$. (At this point I’ll depart from my hint to follow an even easier path.) Dividing through by $d$, we see that $a'x+b\,'y=1$.

Now let $e=\gcd(x,y)$. As before, there are integers $x'$ and $y\,'$ such that $x=ex'$ and $y=ey\,'$. Substituting these into the previous equation, we get $a'ex'+'ey\,'=1$, or $e(a'x'+b\,'y\,')=1$. Since $a'x'+b\,'y\,'$ is an integer, this implies that $e=1$ or $e=-1$: these are the only divisors of $1$. But $e$ is a greatest common divisor and hence by definition positive, so $e=1$.

Most of this is just using basic definitions. What does it mean to say that $d$ is $\gcd(a,b)$? It means very specifically that there are integers $a'$ and $b\,'$ such that $a=a'd$ and $b=b\,'d$, so we try to make use of this, and we get the equation $a'x+b\,'y=1$. With a little experience you can look at that and say immediately that $x$ and $y$ cannot have a common factor greater than $1$, because then the lefthand side would be divisible by that factor, and therefore $1$ would be as well $-$ which is clearly impossible. With less experience you simply investigate, as I did in the proof above, what $\gcd(x,y)$ can be.

-
How would I show this? I'm even worse at proofs than I am at Congruence. Would that simply be enough? Or would I need more detail –  Anthony Nov 5 '12 at 22:26
@Anthony: Let me write this one up in detail to give you an idea of the kinds of argument that you can expect to be asked to make. –  Brian M. Scott Nov 5 '12 at 22:28
OK thank you I appreciate it. –  Anthony Nov 5 '12 at 22:33
Thank you very much my proofs are quite weak and this was very helpful. –  Anthony Nov 5 '12 at 22:46
@Anthony: My pleasure; I’m glad that it helped. –  Brian M. Scott Nov 5 '12 at 22:50

Hint $\rm\ ax\!+\!by = c\:|\:a,b,\ d|\:x,y\:\Rightarrow\: cd\:|\:ax\!+\!by=c\:\Rightarrow\: d\:|\:1.\ \$ Let $\rm\:c = (a,b),\ d = (x,y)\ \$ QED

-

We can prove a general result just using the basic facts: $d|k$, $d|k'$ implies $d|km$ and $d|k+k'$.

Theorem For all $a,b,x,y,m \in \mathbb Z$, $ax+by=m$ implies $(a,b)|m$ and $(x,y)|m$.

proof $(a,b)|a$ and $(a,b)|b$ so $(a,b)|ax$ and $(a,b)|by$ so $(a,b)|ax+by$, symmetry gives us $(x,y)|m$.

Corollary If $ux+vy=1$ then $(x,y)=1$

Given $ax+by=(a,b)$ put $a=(a,b)u$, $b=(a,b)v$ and divide by $(a,b)$ to get $ux+vy=1$.

-