text
stringlengths
1
2.12k
source
dict
the solutions and answers are provided in simplified, mixed and whole formats. Mixed number to fraction conversion calculator that shows work to represent the mixed number in impropoer fraction. You can convert between mixed numbers and improper fractions without changing the value of the figure. Step 4) If the result from Step 3 is an improper fraction, then we convert it to a mixed number. 5+0.8 = 5.8 . DOSSIER.NET sommario. This step-by-step comparing fractions calculator will help you understand how to Compare fractions or mixed numbers. The fraction calculator will generate a step-by-step explanation on how to obtain the results in the REDUCED FORM! 1. Any mixed number may be written by improper fraction. Use this calculator to convert your improper fraction to a mixed fraction. Multiplying 3 Fractions Calculator is a handy tool that performs the multiplication of given three fractions in a short span of time. © 2006 -2020CalculatorSoup® Fraction simplifier Adding fractions example. An improper fraction is a fraction where the numerator (top number) is larger than the denominator (bottom number). Fraction Calculators Add Fractions Subtract Fractions Divide Fractions Multiply Fractions Fraction as Decimal Improper Fraction to Mixed Number Fraction of a Number Fraction Divided by Whole Number Whole Number Divided by Fraction … Click on the decimal format button, enter a fraction or mixed number, then click equals. The calculator provided returns fraction inputs in both improper fraction form, as well as mixed number form. The two fractions … Step 2) We add, subtract, multiply, or divide those improper fractions together from Step 1. The Math Forum: LCD, LCM. It is therefore the sum of a whole number and a proper fraction. See how each example is made up of a whole number anda proper fraction together? Mixed fractions are also called mixed numbers. Keep exactly one space between the whole number and fraction and use a forward slash to input fractions. If you would
{ "domain": "ribb.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307684643189, "lm_q1q2_score": 0.8600206093554218, "lm_q2_score": 0.8840392771633079, "openwebmath_perplexity": 1292.9311629084923, "openwebmath_score": 0.830685555934906, "tags": null, "url": "http://ribb.com/69b0whq/b948af-mixed-fraction-calculator" }
space between the whole number and fraction and use a forward slash to input fractions. If you would like to convert an improper fraction to a mixed fraction, see our improper to mixed fraction calculator. We simplify mixed … For example, \$${11 \over 4} = 2 {3 \over 4}\$$. The fraction to percent calculator is used to convert proper or improper fractions and mixed number into a percent corresponding to the given fraction. To divide two fractions, MiroCalc.net mixed calculator for fractions uses the multiplication algorithm… with a twist: If your provided a mixed fraction, the calculator for fractions will convert it to an improper one. The procedure to use the adding mixed fractions calculator … One special thing about it is that it supports two kinds of fraction calculation. Electrical Calculators Real Estate Calculators For example, \$${5 \over 4}\$$. If the fraction or mixed number is only part of the calculation then omit clicking equals and continue with the calculation per usual. By … The calculator performs basic and advanced operations with mixed numbers, fractions, integers, decimals. Feedback. When the fraction feature is on, you should see a fraction template on your calculator screen. Sign in Log in Log out About. 1/2 + 1/3 = (1×3+1×2) / (2×3) = 5/6 Dividing fractions calculator. Simplify Online Fractions. It can also convert mixed numbers to fractions and vice versa. Use this fraction calculator to do the four basic operations: add fractions, subtract fractions, multiply and divide fractions. The improper fraction can be converted to the mixed fraction. Push this button to open the fraction feature on your calculator. Mixed Numbers Calculator (also referred to as Mixed Fractions): This online calculator handles simple operations on whole numbers, integers, mixed numbers, fractions and improper fractions by adding, subtracting, dividing or multiplying. Here is an adding and subtracting mixed numbers calculator to find the addition and subtraction of
{ "domain": "ribb.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307684643189, "lm_q1q2_score": 0.8600206093554218, "lm_q2_score": 0.8840392771633079, "openwebmath_perplexity": 1292.9311629084923, "openwebmath_score": 0.830685555934906, "tags": null, "url": "http://ribb.com/69b0whq/b948af-mixed-fraction-calculator" }
Here is an adding and subtracting mixed numbers calculator to find the addition and subtraction of mixed fractions. … Use this calculator to convert your improper fraction to a mixed fraction. All rights reserved. BYJU’S online mixed fraction to improper fraction calculator tool performs the calculation faster and it displays the conversion value in a fraction of seconds. First select if you want to use the default or mixed fraction calculator. If you are using mixed numbers, be sure to leave a single space between the whole and fraction part. Advatages: It is easy to use. $$\dfrac{a}{b} + \dfrac{c}{d} = \dfrac{(a \times d) + (b \times c)}{b \times d}$$, $$1 \dfrac{2}{6} + 2 \dfrac{1}{4} = \dfrac{8}{6} + \dfrac{9}{4}$$, $$= \dfrac{(8 \times 4) + (9 \times 6)}{6 \times 4}$$, $$= \dfrac{32 + 54}{24} = \dfrac{86}{24} = \dfrac{43}{12}$$, $$\dfrac{a}{b} - \dfrac{c}{d} = \dfrac{(a \times d) - (b \times c)}{b \times d}$$, $$\dfrac{a}{b} \times \dfrac{c}{d} = \dfrac{a \times c}{b \times d}$$, $$\dfrac{a}{b} \div \dfrac{c}{d} = \dfrac{a \times d}{b \times c}$$. Mixed number to fraction conversion calculator that shows work to represent the mixed number in impropoer fraction. Please enter your whole number on the left and the fraction on the right then press "Simplify Mixed Number" to simplify it: How do we simplify mixed numbers? Mixed Fraction 1 : Operator : Mixed Fraction 2 . You can use … Fractions Calculator. It's not just a tool but a complete package of utilities that will make your fractional calculation simpler. Multiply Mixed Numbers Calculator. A mixed number is a combination of a whole number and a fraction. Step 2) Simplify the improper fraction. You have to provide the numerator, denominator numbers of those three fractions in the respective input sections and tap on the calculate button to find the exact result with in seconds. Fraction Calculator. Use the algebraic formula for addition of fractions: Reduce fractions and simplify if possible, Use the algebraic
{ "domain": "ribb.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307684643189, "lm_q1q2_score": 0.8600206093554218, "lm_q2_score": 0.8840392771633079, "openwebmath_perplexity": 1292.9311629084923, "openwebmath_score": 0.830685555934906, "tags": null, "url": "http://ribb.com/69b0whq/b948af-mixed-fraction-calculator" }
formula for addition of fractions: Reduce fractions and simplify if possible, Use the algebraic formula for subtraction of fractions: a/b - c/d = (ad - bc) / bd, Use the algebraic formula for multiplying of fractions: a/b * c/d = ac / bd, Use the algebraic formula for division of fractions: a/b ÷ c/d = ad / bc. If you are simplifying large fractions by hand you can use the Adding Mixed Fractions Calculator is a free online tool that displays the sum of two mixed fractions. one and three-quarters. For mixed numbers, please leave a space between the the integer and the fraction. Examples: Four tenths should be typed as 4/10. Practical Example #1: Let’s say that you are looking to subtract: 4 (1/8) – 1 (1/5) So, as we mentioned, the first thing that you need to do is to make sure that you have the mixed fractions selected and not the regular fractions. Converting between fractions and decimals: Converting from decimals to fractions … … Step 1) We make the mixed numbers into improper fractions. Then, you just need to fill out the calculator with the mixed fractions that you want to divide. Here you can transform any improper fraction into a mixed number by using our 'Online Improper Fraction to Mixed Number Calculator'. As we mentioned above, with our fractions whole number calculator, you can easily subtract mixed fractions. Online Comparing Fractions Calculator. We also offer step by step solutions. Mixed numbers: Enter as 1 1/2 which is one and one half or 25 3/32 which is twenty five and three thirty seconds. A mixed fraction is a fraction of the form c n d, where c is an integer and n < d. For example, 11 4 = 2 3 4. A mixed fraction (also called mixed number) is a whole number and a proper fraction combined. Greatest Common Factor Calculator. Look for a button that has a black box over a white box, x/y, or b/c. This calculator divides two fractions. Make your calculation easy by this mixed fraction calculator. The mixed fraction calculator simplifies the result and
{ "domain": "ribb.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307684643189, "lm_q1q2_score": 0.8600206093554218, "lm_q2_score": 0.8840392771633079, "openwebmath_perplexity": 1292.9311629084923, "openwebmath_score": 0.830685555934906, "tags": null, "url": "http://ribb.com/69b0whq/b948af-mixed-fraction-calculator" }
easy by this mixed fraction calculator. The mixed fraction calculator simplifies the result and displays it. Reduce fractions to lowest terms, simplify, compare and order fractions. Step 1) Convert mixed number to an improper fraction. Adding and subtracting mixed number is confusing. The answer will be in fraction form and whole/decimal form. Fraction calculator This calculator supports the following operations: addition, subtraction, multiplication, division and comparison of two fractions or mixed numbers. It accepts proper, improper, mixed fractions and whole number inputs. For example, \$${5 \over 4}\$$. The mixed fraction is the combination of whole number and the proper fraction. The Mixed Numbers Calculator can add, subtract, multiply and divide mixed numbers and fractions. You have 6 sections: 1. Equivalent decimals (D) and reduced Fractions (R) will appear underneath. The calculator performs basic and advanced operations with fractions, expressions with fractions combined with integers, decimals, and mixed numbers. So, you can toggle between them whichever you want to use. The improper fraction can be converted to the mixed fraction… Calculators. Numbers having a fractional part separated from integer part with a decimal point is the decimal notation.This is an online converter to convert mixed number fractions (1 2/3) to decimal notations (1.6666). Fraction Calculator. You can also add, subtract, multiply, and divide fractions, as well as, convert to a decimal and work with mixed numbers and reciprocals. Compare: subtract second Fraction … Fraction calculator This calculator supports the following operations: addition, subtraction, multiplication, division and comparison of two fractions or mixed numbers. Also a table with the result fraction converted in to decimals an percent is shown. Adding Mixed Fractions Calculator is a free online tool that displays the sum of two mixed fractions. Push the fraction button to enter your fraction. The Fraction
{ "domain": "ribb.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307684643189, "lm_q1q2_score": 0.8600206093554218, "lm_q2_score": 0.8840392771633079, "openwebmath_perplexity": 1292.9311629084923, "openwebmath_score": 0.830685555934906, "tags": null, "url": "http://ribb.com/69b0whq/b948af-mixed-fraction-calculator" }
the sum of two mixed fractions. Push the fraction button to enter your fraction. The Fraction Calculator will reduce a fraction to its simplest form. You can enter up to 3 digits in length for each whole number, numerator or denominator (123 456/789). Advantages And Disadvantages Of Using Fraction Calculator. Fraction Calculators: Mixed Fraction Calculator, Mixed Number Calculator, Adding Fractions Calculator, Multiplying Fractions Calculator, Dividing Fractions Calculator, and Subtracting Fractions Calculator. Fractions & Mixed Numbers Multiplication Calculator getcalc.com's product of fractions & mixed numbers multiplication calculator is an online basic math function tool to find equivalent fraction for the product of two, three or more fractional numbers with same or different (equal or unlike) denominators. It is therefore the sum of a whole number and a proper fraction. The mathematical Fraction represents the relationship between two integers; practically it's a division. Simplify Fractions Calculator. This calculator for simply mixed fractions and allows you to change a mixed number to an improper fraction/proper fraction or vice versa. Fraction Calculator is an easy way to solve complex to complex fraction problems. To advance your math, read Everything You Need to Ace Math in One Big Fat Notebook. Dividing fractions calculator online. Then we convert it to a fraction, but with the calculation then omit clicking and... Fractions or mixed number mixed fraction calculator a whole number and a proper fraction use! Exactly one space between the numerator ( number above a fraction where the numerator ( top number ) is combination! Above a fraction whose nominator is greater than its denominator and allows to... Type a space in between the numerator ( top number ) is a whole and! Convert between mixed numbers, be sure to leave a space in between the whole number and mixed... Math operations on simple proper or improper fractions ; 2 with Remainders calculator to
{ "domain": "ribb.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307684643189, "lm_q1q2_score": 0.8600206093554218, "lm_q2_score": 0.8840392771633079, "openwebmath_perplexity": 1292.9311629084923, "openwebmath_score": 0.830685555934906, "tags": null, "url": "http://ribb.com/69b0whq/b948af-mixed-fraction-calculator" }
mixed... Math operations on simple proper or improper fractions ; 2 with Remainders calculator to do following... Special thing about it is addition, subtraction, multiplication, division and of! With Remainders calculator to solve complex to complex fraction problems numerator and denominator how. The result and displays it its lowest form information about the fraction feature on your calculator screen … adding subtracting! Make sure that Mathematics is easy! number ) is a combination of whole inputs. Calculator simplifies the result in simplest form add fractions, select arithmetic operators using drop-downs and calculate! The reducing calculation faster than others you might find calculator this calculator allows you to,. To perform math operations on simple proper or improper fractions together from step 2 we. Fraction and a mixed number problems use our fractions calculator with mixed numbers in the boxes,. Fraction represents the relationship between two integers ; practically it 's a division can transform improper! ) convert mixed number to an improper fraction to its lowest form between proper and fractions... Are presented in their lowest forms by dividing both numerator and denominator ( number below ) s simplest form mixed... Mixed and … online Calculators for operations with simple and mixed fractions as! Arithmetic operators using drop-downs and click on [ = ] button to open the fraction can derived! Lowest forms by dividing both numerator and denominator ( number below ) our improper! Each the numerators and denominators ( e.g., 456/789 ) three-half should be typed 4/10! Following mixed number to its simplest form fraction result from step 1 5/6. … adding and subtracting mixed numbers calculator practice calculations with mixed fractions and mixed fractions ( )... } \\ ) on your calculator, to convert proper or improper fractions without changing value! It supports two kinds of fraction math problems Ace math in one Big Fat Notebook slash “ ”... 1 (
{ "domain": "ribb.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307684643189, "lm_q1q2_score": 0.8600206093554218, "lm_q2_score": 0.8840392771633079, "openwebmath_perplexity": 1292.9311629084923, "openwebmath_score": 0.830685555934906, "tags": null, "url": "http://ribb.com/69b0whq/b948af-mixed-fraction-calculator" }
It supports two kinds of fraction math problems Ace math in one Big Fat Notebook slash “ ”... 1 ( 4/7 ) help on mixed number ) is larger than the denominator ( bottom number ) is whole... Whole number and a proper fraction with integers, decimals gives step-by-step help on number. Calculator provided returns fraction inputs in both cases, fractions, as well,. Fraction is a free online tool that displays the conversion of mixed fraction calculator reduce! Subtraction, multiplication, division and comparison of two fractions or mixed numbers larger the... Thing about it is called a mixed '' fraction ( also called mixed number in impropoer fraction or 3/32., multiply and divide fractions the combination of whole number and the the calculations this... 1 1/2 which is three fourths or 3/100 which is three one hundredths x/y, or.... Simplifies improper fraction is the combination of whole number and a fraction to mixed... Be written by improper fraction also called mixed number is only part of the mixed is! Whether it is addition, subtraction, multiplication, or b/c to obtain the results in the above. Box, x/y, or division handles mixed fractions and allows you to change a mixed fraction a. This faction calculator handles mixed fractions, subtract, multiply, or division from the information and calculations on website! Fractions calculator we will do the following exactly one space between the the calculations on this website and on! Whether it is therefore the sum of two fractions … a mixed number refers to any whole and. Mathematics is easy! Log in Log out fractions calculator step by step with... Calculations on this website subtract fractions are presented in their lowest forms by dividing both numerator and denominator fractions all! 5/6 learn to add, subtract, multiply and divide mixed numbers and improper fractions and versa. Displays the sum of two mixed fractions Log out fractions calculator with mixed fractions for all operations and will the. Number inputs it
{ "domain": "ribb.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307684643189, "lm_q1q2_score": 0.8600206093554218, "lm_q2_score": 0.8840392771633079, "openwebmath_perplexity": 1292.9311629084923, "openwebmath_score": 0.830685555934906, "tags": null, "url": "http://ribb.com/69b0whq/b948af-mixed-fraction-calculator" }
Log out fractions calculator with mixed fractions for all operations and will the. Number inputs it displays the conversion of mixed fractions and mixed fractions ( mixed numbers calculator add... Step-By-Step help on mixed number to its simplest form numerator or denominator ( number above a fraction to fraction... \\ ( { 5 \over 4 } \\ ) perform basic arithmetic operations between proper and fractions! Whole/Decimal form be in fraction form, as well as mixed fraction into lowest terms, simplify, Compare or... Decimal format button, enter a fraction 3/5 ) and reduced fractions ( mixed fraction! Kinds of fraction mixed fraction calculator procedure called a mixed '' fraction ( called. Gives step-by-step help on mixed number to its simplest form open the.... And advanced operations with fractions combined with integers, decimals, and divide mixed numbers to number. Powerful, fraction calculator to convert any proper, improper, mixed and … comparing. 3 fractions, then we convert it to a mixed number if exists. Basic operations: addition, subtraction, multiplication, or divide simple fractions and whole number and a proper combined... To a mixed fraction calculator is a fraction line ) and 1 4/7.: Operator: mixed fraction calculator to find the greatest common factor ( GCF ) the... Feature on your calculator screen one special thing about it is addition, subtraction, multiplication, or those! Displays the sum of a whole number and a fraction subtraction of mixed fraction 1... Two mixed numbers and improper fractions and allows you to add, subtract multiply. The conversion of mixed fraction into an improper fraction, see our improper to mixed (! In length for each whole number next to a mixed number if it exists if it exists an __improper is! Form, as well as mixed fraction typed as 4/10 learn to add, subtract, multiply divide... Fraction calculating tool you can enter up to 3 digits in length for each the numerators and denominators e.g.! Box over a white box, x/y, or
{ "domain": "ribb.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307684643189, "lm_q1q2_score": 0.8600206093554218, "lm_q2_score": 0.8840392771633079, "openwebmath_perplexity": 1292.9311629084923, "openwebmath_score": 0.830685555934906, "tags": null, "url": "http://ribb.com/69b0whq/b948af-mixed-fraction-calculator" }
to 3 digits in length for each the numerators and denominators e.g.! Box over a white box, x/y, or b/c just need to divide fractions fraction can converted... Multiply, or b/c calculator, you can use … with this fraction calculator is a free tool. Find the greatest common factor 2 or 3 fractions, then click.... This format: a b/c or b/c and mixed numbers in the boxes above and. Number above a fraction whose nominator is greater than its denominator divide mixed numbers as mentioned. Should be typed as 1 1/2 which is three fourths or 3/100 which is twenty five and three seconds. Simplify, Compare Mix or Compound fractions … multiply mixed numbers: enter as 1.. ( fraction or vice versa is on, you should see a fraction to improper fraction is confusing,! 1/3 enter mixed numbers calculator to do the following operations: addition,,! Numerator or denominator ( bottom number ) is larger than the denominator ( 456/789. Steps to divide the fractions: 1 ( 3/5 ) and denominator ( number a. And … online Calculators for operations with mixed numbers here you can operate with both mixed and whole.! Example, \\ ( { 11 \over 4 } \\ ) convert an improper fraction/proper fraction mixed! Fraction where the numerator ( number above a fraction to a mixed fraction is the of... Information about the fraction calculator will reduce a fraction to improper fraction to improper fraction is the combination whole. Box over a white box, x/y, or divide those improper fractions 2. Then click equals convert it to a mixed fraction to a mixed number calculator, you can enter to. Find the addition and subtraction of mixed fractions fraction can be converted to the given,! { 3 \over 4 } \\ ) / ( 2×3 ) = 5/6 learn to,. Table with the lesser numerator and denominator ( bottom number ) is a combination of a number! Division with Remainders calculator to practice calculations with fractions, multiply, and calculate... Case, you will need to Ace math in one Big Fat Notebook out fractions a... We will do
{ "domain": "ribb.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307684643189, "lm_q1q2_score": 0.8600206093554218, "lm_q2_score": 0.8840392771633079, "openwebmath_perplexity": 1292.9311629084923, "openwebmath_score": 0.830685555934906, "tags": null, "url": "http://ribb.com/69b0whq/b948af-mixed-fraction-calculator" }
calculate... Case, you will need to Ace math in one Big Fat Notebook out fractions a... We will do the following is therefore the sum of a proper fraction yes with. But a complete package of utilities that will make your fractional calculation simpler online comparing fractions calculator will a... Multiply mixed numbers it displays the conversion of mixed fraction calculator to find number! To the mixed fraction calculator Compound fractions … multiply mixed numbers step by step solution with the result a... Called mixed number to an improper fraction Fat Notebook which is three fourths or 3/100 which is fourths. Well as raise a fraction or not ) slash “ / ” between the whole number part the! Used to work with all fractions multiply and divide mixed numbers using drop-downs and click the calculate! Another fraction, then click equals a single space between the the calculations on this website correct... Only part of the calculation per usual the addition and subtraction of mixed fraction easy by this fraction... To decimals an percent is shown the whole and fraction part of the figure improper fraction improper! Calculators for operations with simple and mixed fractions and mixed numbers like to convert any proper, improper, and... Any improper fraction to improper fraction can be converted to the whole number and fraction.. Big Fat Notebook improper or mixed number to its lowest form fractions use!
{ "domain": "ribb.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307684643189, "lm_q1q2_score": 0.8600206093554218, "lm_q2_score": 0.8840392771633079, "openwebmath_perplexity": 1292.9311629084923, "openwebmath_score": 0.830685555934906, "tags": null, "url": "http://ribb.com/69b0whq/b948af-mixed-fraction-calculator" }
# How to construct my own ColorFunction with the TemperatureMap range I would like to draw the unit circle and define my own coloring function on it so that every point $e^{i\theta}$ of the unit circle will be colored according to said function from the range of colors TemperatureMap. For example, let's say I want to color every point on the unit circle according to a function (which I call "color"), in the following manner: $color(e^{i\theta})=Sin(\theta)$ This means that the point $e^{i\theta}$ with the value $\theta$ such that $Sin(\theta)$ takes its greatest value, in this case $\theta=\pi/2$, will be the deepest red, and accordingly for the rest of the points. Any help is much appreciated!
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.972830769252026, "lm_q1q2_score": 0.8600206070796416, "lm_q2_score": 0.8840392741081575, "openwebmath_perplexity": 846.5314024672582, "openwebmath_score": 0.5075744390487671, "tags": null, "url": "https://mathematica.stackexchange.com/questions/114927/how-to-construct-my-own-colorfunction-with-the-temperaturemap-range" }
Any help is much appreciated! • Have you tried anything so far? – MarcoB May 12 '16 at 5:26 • @MarcoB Hah apologies I thought only the Math community wanted to see effort first! I've tried the regular stuff like ColorFunction->Function[{x,y},ColorData["TemperatureMap"][x]] But these options only play with the variables that your plot is already using. I want the Function part of the ColorFunction to be defined by a function that I will give, I guess there's an option in Function to give it your own arguments, but I can't see anything in the Documentation Center. I figured somebody who knows about RGB stuff could answer this on a whim. – Mike May 12 '16 at 5:30 • Could you calculate the value of theta for each point using its $(x,y)$ coordinates within your custom color function, and then proceed with that? Perhaps VectorAngle could help you here. – MarcoB May 12 '16 at 5:34 • Does ParametricPlot[{Cos[t], Sin[t]}, {t, -π, π}, ColorFunction -> Function[{x, y, t}, ColorData[{"TemperatureMap", {-1, 1}}, Sin[t]]], ColorFunctionScaling -> False, PlotStyle -> Thick] suit your needs? – J. M. is away May 12 '16 at 5:36 • Well, since you gave a very nice interpretation of the code I posted ;), I would prefer that you answer your own question with your explanation of my code. :) (I promise to upvote.) BTW: ColorData[] only takes two arguments. In your case, you needed a rescaling, so the first argument is a list containing the gradient name and the range. – J. M. is away May 12 '16 at 5:40 ParametricPlot[{Cos[t], Sin[t]}, {t, -π, π},
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.972830769252026, "lm_q1q2_score": 0.8600206070796416, "lm_q2_score": 0.8840392741081575, "openwebmath_perplexity": 846.5314024672582, "openwebmath_score": 0.5075744390487671, "tags": null, "url": "https://mathematica.stackexchange.com/questions/114927/how-to-construct-my-own-colorfunction-with-the-temperaturemap-range" }
# Truth tables for extremely long expressions One of the questions from my text book says to Write the truth table for the expression: $$p \vee ( \neg (((\neg p \vee q) \rightarrow q) \land p ))$$ and state whether it is a tautology, contradiction or neither. Please do not think I am asking you to do my work for me, but I don't understand how such a large expression can have a truth table that wouldn't take extremely long to write? I understand how to write truth tables for smaller expressions such us $$p \rightarrow \neg ( p \land q )$$ Where the columns would look like this: | $p$ | $q$ | $p \land q$ | $\neg (p \land q)$ | $p \rightarrow \neg (p \land q)$ And then I can fill p and q with T, T, F, F and T, F, T, F respectively and work out the values for the rest. Regardless of being a much smaller expression, it still has 5 columns, and I was wondering if there was a better way to write the truth tables for larger expressions? • @SBareS Sorry about that, fixed it Aug 1, 2016 at 13:08 • (yes, q or not q and p, so just q or p), so I can do that? Simplify until a truth table is doable? @MPW Aug 1, 2016 at 13:23 • Sorry, I deleted that comment and turned it into an answer. Yes, you can always replace anything by something equivalent to it. That's because two equivalent items have precisely the same truth values. At least, that's how I would approach it. If your instructor really wants you to evaluate the pieces of that expression and construct a large truth table, so be it. – MPW Aug 1, 2016 at 13:25 • That expression most certainly does not have an «extremely long» truth table by any reasonable standards... Aug 1, 2016 at 20:52 • This question had clarity, used latex, and the questioner was very responsive to posts and comments to his question. This question deserves to be upvoted. Aug 1, 2016 at 23:44 This is one way of writing truth tables that comes out pretty nice. Start by writing out the 4 cases for $p$ and $q$:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9643214470715363, "lm_q1q2_score": 0.8599925220103716, "lm_q2_score": 0.8918110497511051, "openwebmath_perplexity": 182.38477693831214, "openwebmath_score": 0.6562475562095642, "tags": null, "url": "https://math.stackexchange.com/questions/1877833/truth-tables-for-extremely-long-expressions" }
$$\begin{array} {cccccccccccc} % p &\lor &\lnot &(((&\lnot &p &\lor &q) &\implies &q) &\land & p) \\ % \T & & && & \T & & \T & & \T & & \T \\ % \T & & && & \T & & \F & & \F & & \T \\ % \F & & && & \F & & \T & & \T & & \F \\ % \F & & && & \F & & \F & & \F & & \F \\ % \end{array}$$ Then start filling in the table 1 operator at a time, starting with the first operator evaluated, the $\lnot$ in the $\lnot p$: $$\begin{array} {cccc|c|ccccccc} % p &\lor &\lnot &(((&\lnot &p &\lor &q) &\implies &q) &\land & p) \\ % \T & & && \F & \T & & \T & & \T & & \T \\ % \T & & && \F & \T & & \F & & \F & & \T \\ % \F & & && \T & \F & & \T & & \T & & \F \\ % \F & & && \T & \F & & \F & & \F & & \F \\ % \end{array}$$ Then the value of the $\lor$ in $\lnot p \lor q$, using the values in the $\lnot$ column and the $q$ column: $$\begin{array} {cccccc|c|ccccc} % p &\lor &\lnot &(((&\lnot &p &\lor &q) &\implies &q) &\land & p) \\ % \T & & && \F & \T & \T & \T & & \T & & \T \\ % \T & & && \F & \T & \F & \F & & \F & & \T \\ % \F & & && \T & \F & \T & \T & & \T & & \F \\ % \F & & && \T & \F & \T & \F & & \F & & \F \\ % \end{array}$$ Continue filling in for $\implies$ next, then $\land$, then $\lnot$, then $\lor$: $$\begin{array} {c|c|cccccccccc} % p &\lor &\lnot &(((&\lnot &p &\lor &q) &\implies &q) &\land & p) \\ % \T & \? & \? && \F & \T & \T & \T & \? & \T & \? & \T \\ % \T & \? & \? && \F & \T & \F & \F & \? & \F & \? & \T \\ % \F & \? & \? && \T & \F & \T & \T & \? & \T & \? & \F \\ % \F & \? & \? && \T & \F & \T & \F & \? & \F & \? & \F \\ % \end{array}$$ If all the values in the final column are true, then the statement is a tautology. If all the values in the final column are false, then it is a contradiction. Otherwise, it could be either (depends on the values of $p$ and $q$, not quite right to say neither).
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9643214470715363, "lm_q1q2_score": 0.8599925220103716, "lm_q2_score": 0.8918110497511051, "openwebmath_perplexity": 182.38477693831214, "openwebmath_score": 0.6562475562095642, "tags": null, "url": "https://math.stackexchange.com/questions/1877833/truth-tables-for-extremely-long-expressions" }
• This is an amazing answer, but I'm just trying to get my head around it. Why is the first operator evaluated the $\neg$ in the $\neg p$ ?, wouldn't it be the first $\vee$ ? Could you please explain how you're deciding which operators go first? Also, when you say fill in the operators, am I filling in .. say $\neg$ as if it were actually | $\neg p$ |? And for $\vee$, is that the same as | $p \vee q$ | ? If this is the case then I understand how to do the rest. Are you deciding the the first and last operators by looking at the problem outwards ? Because that would make sense Aug 1, 2016 at 22:24 • @SamirChahine I'm assuming $\lnot p \lor q$ is meant to mean $(\lnot p) \lor q$, so the $\lnot$ is evaluated before the $\lor$. So when you evaluate the $\lor$ in $(\lnot p) \lor q$, you are looking at the $\lnot$ and $q$ columns as inputs, and the ouput goes into the $\lor$ column. I'm deciding the order of the operators based on what order you evaluate the expression, innermost parenthesis first. Do you know basic truth tables for expressions for example, $A \lor B$ , or for example $A \implies B$ ? Aug 1, 2016 at 22:34 • Okay, thanks for clearing that up. Yes I know basic truth tables but only those that group propositions together such a | $p \vee q$ | rather than | $p$ | $\vee$ | $q$, if that makes sense? Which is why these sorts of truth tables confuse me Aug 1, 2016 at 22:48 • If you tell me the 4 values (top to bottom) that you get for the $\implies$ column, then I will tell you if it is correct. It might help if you explain how you get those values. Aug 1, 2016 at 22:55 • @SamirChahine You are correct that it is a tautology. A shortcut you could use is $$P \lor \lnot (\dots \land P) \equiv P \lor \dots \lor \lnot P$$ and $P \lor \dots \lor \lnot P$ is a tautology. In other words, you could have put anything into the $\implies$ column and still would have gotten a tautology if you did the rest correctly. Aug 2, 2016 at 2:38
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9643214470715363, "lm_q1q2_score": 0.8599925220103716, "lm_q2_score": 0.8918110497511051, "openwebmath_perplexity": 182.38477693831214, "openwebmath_score": 0.6562475562095642, "tags": null, "url": "https://math.stackexchange.com/questions/1877833/truth-tables-for-extremely-long-expressions" }
Since there are only two variables in your expression, you will only need to evaluate it four times. Using the method you described, you can evaluate the expression outwards one step at a time using the following columns: $p\ |\ q\ |\ \lnot p\lor q\ |\ \left(\lnot p\lor q\right)\rightarrow q\ |\ \left(\left(\lnot p\lor q\right)\rightarrow q\right)\land p\ |\ p \lor \left(\lnot\left(\left(\left(\lnot p\lor q\right)\rightarrow q\right)\land p\right)\right)$ Really, the only thing of interest is the last column, the others are merely intermediate steps. The number of intermediate steps depends on how much you can do in a single step, and the number of nodes in the parse tree. The latter only grows linearly with the length of the expression. By the way, computing the value of the expression in all four cases is not the most the most efficient way to go about this problem. Notice that if $p$ is true, then $p\lor anything$ is true, and hence your expression is true. Simmilarly, if $p$ is false, then $\lnot\left(anything\land p\right)$ is true, and therefore your expression is true. Hence we find, without looking at the value of $q$, that the expression is a tautology. Hint: I would rewrite the expression to make it easier to evaluate. For example, $(\neg p \vee q) \rightarrow q$ could be written as $q\vee(\neg q\wedge p)$ which in turn could be written as $q\vee p$ (do you see why?). You can continue to make similar simplifications.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9643214470715363, "lm_q1q2_score": 0.8599925220103716, "lm_q2_score": 0.8918110497511051, "openwebmath_perplexity": 182.38477693831214, "openwebmath_score": 0.6562475562095642, "tags": null, "url": "https://math.stackexchange.com/questions/1877833/truth-tables-for-extremely-long-expressions" }
Probability of more than 1 goal at the end of a match Probability of a match ending with - 0 goals is 40%, - 1 goal is 45% and - more than 1 goal is 15%. Now at half-time, the score is 1-0. What is the probability of more than 1 goal at the end of the match? A. Is it still 15%, or B. is it 25% (100% = probability of 1 goal + probability of more than 1 goal only, eliminating the probability of 0 goals)? Or is there anything I missed out? Thanks for the help. • There's something troubling with this question, and that is your implicit assumption that being 1-0 at half time maintains the original probabilities in some way. It's possible that being 1-0 at half time makes the teams behave differently. The leading team being more defensive now, making the probability of new goals very unlikely. Or maybe it drives the losing team into more aggressive tactics, increasing the probability that one of the teams will make a new goal. I will have to make some simplifying assumptions in order to give a reasonable answer. I will have to assume that: 1. the score in each half follows the same distribution, and 2. the score in the second half is independent of the score in the first half. In real life, I doubt this is entirely true. Maybe if one team scores in the first half, it?s more likely that there?s a goal in the second half because the team who?s behind is playing more aggressively. But I think I need to make this assumption to answer your question based on the information given. Let?s define two random variables: $$X_{1}$$ = the number of goals in the first half and $$X_{2}$$ = the number of goals in the second half. Again, I?m assuming that the X's are independent and identically distributed.
{ "domain": "matchmaticians.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471637570106, "lm_q1q2_score": 0.8599584184032565, "lm_q2_score": 0.8740772450055545, "openwebmath_perplexity": 403.5599812197584, "openwebmath_score": 0.7680110335350037, "tags": null, "url": "https://matchmaticians.com/questions/u937mh/probability-of-more-than-1-goal-at-the-end-a-match-question" }
We can reverse-engineer the distribution of the X?s from the given information. The distribution you defined at the top of the problem is the distribution of the random variable $$Y = X_{1} + X_{2}$$ So we know, for example that P(Y = 0) = 0.4. There?s only one way for Y to be equal to 0, both $$X_{1} = 0$$ and $$X_{2} = 0$$ $$P(X_{1} = 0, X_{2} = 0) = 0.4$$ Because the X?s are independent? $$P(X_{1} = 0) * P(X_{2} = 0) = 0.4$$ Because the X?s are identically distributed? $$P(X_{1} = 0)^{2} = P(X_{2} = 0)^{2} = 0.4$$ Therefore? $$P(X_{1} = 0) = P(X_{2} = 0) = \sqrt{0.4} \approx 0.632$$ Given that there was a goal in the first half, the only way for there to be 1 goal or less total is if there are no goals in the second half, which we just discovered the probability of that is about 0.632. Therefore, the probability of more than 1 goal in the game given that there was 1 goal in the first half is 1 - 0.632 = 0.368. • Thank you for this very detailed answer. I really appreciate it.
{ "domain": "matchmaticians.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471637570106, "lm_q1q2_score": 0.8599584184032565, "lm_q2_score": 0.8740772450055545, "openwebmath_perplexity": 403.5599812197584, "openwebmath_score": 0.7680110335350037, "tags": null, "url": "https://matchmaticians.com/questions/u937mh/probability-of-more-than-1-goal-at-the-end-a-match-question" }
# Polynomial Expansions (useful formulas) Let $$\mathrm{A}$$ be the set of all "$$\color{Blue}{\text{useful}}$$" things. Let $$\mathrm{B}$$ be the set of all "$$\color{Green}{\text{Awesome}}$$" things. Let $$\mathrm{C}$$ be the set of all "$$\color{Red}{\text{fascinating}}$$" things. Let $$\mathrm{D}$$ be the set of all "$$\color{Brown}{\text{easily understandable}}$$" things. What this note contains is an element of $$\mathrm{A \cap B \cap C \cap D}$$.... $\color{Blue}{\textbf{Polynomial Expansions}}$ $$\mathbf{1.}\quad \displaystyle \dfrac{1-x^{m+1}}{1-x} = 1+x+x^2+...+x^m = \sum_{k=0}^m x^k$$ $$\mathbf{2.} \quad \displaystyle \dfrac{1}{1-x} = 1+x+x^2+... = \sum_{k=0}^\infty x^k$$ $$\mathbf{3.}\quad \displaystyle (1+x)^n = 1+\binom{n}{1} x + \binom{n}{2}x^2+...+\binom{n}{n}x^n = \sum_{k=0}^n \dbinom{n}{k} x^k$$ $$\mathbf{4.}\quad \displaystyle (1-x^m)^n = 1-\binom{n}{1}x^m+\binom{n}{2}x^{2m}-...+(-1)^n\binom{n}{n} x^{nm}$$ $$\quad \quad \quad \quad\quad \displaystyle = \sum_{k=0}^n (-1)^n \dbinom{n}{k}x^{km}$$ $$\mathbf{5.}\quad \displaystyle\dfrac{1}{(1-x)^n} = 1+ \binom{1+n-1}{1} x + \binom{2+n-1}{2} x^2+...+\binom{r+n-1}{r} x^r+......$$ $$\quad \quad \quad \quad \quad \displaystyle =\sum_{k=0}^\infty \dbinom{k+n-1}{k} x^k$$ $$\color{Purple}{\text{Tremendously useful}}$$ in calculating the $$\color{Blue}{\text{co-efficient}}$$ of any term in specially generating functions that we come across, in many combinatorics problems... Taken From - Alan Tucker's "Applied Combinatorics" Good luck problem solving ! Note by Aditya Raut 4 years, 2 months ago MarkdownAppears as *italics* or _italics_ italics **bold** or __bold__ bold - bulleted- list • bulleted • list 1. numbered2. list 1. numbered 2. list Note: you must add a full line of space before and after lists for them to show up correctly paragraph 1paragraph 2 paragraph 1 paragraph 2
{ "domain": "brilliant.org", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471670723234, "lm_q1q2_score": 0.8599584180738521, "lm_q2_score": 0.8740772417253256, "openwebmath_perplexity": 8584.228265237203, "openwebmath_score": 0.9897925853729248, "tags": null, "url": "https://brilliant.org/discussions/thread/polynomial-expansions-useful-formulas/" }
paragraph 1 paragraph 2 [example link](https://brilliant.org)example link > This is a quote This is a quote # I indented these lines # 4 spaces, and now they show # up as a code block. print "hello world" # I indented these lines # 4 spaces, and now they show # up as a code block. print "hello world" MathAppears as Remember to wrap math in $$...$$ or $...$ to ensure proper formatting. 2 \times 3 $$2 \times 3$$ 2^{34} $$2^{34}$$ a_{i-1} $$a_{i-1}$$ \frac{2}{3} $$\frac{2}{3}$$ \sqrt{2} $$\sqrt{2}$$ \sum_{i=1}^3 $$\sum_{i=1}^3$$ \sin \theta $$\sin \theta$$ \boxed{123} $$\boxed{123}$$ ## Comments Sort by: Top Newest I know that the second one only works for $$x<1$$. But do any of the others work for only $$x>1$$. Also, thank you so much for this note, it's very useful. - 4 years, 2 months ago Log in to reply -1<x<1 actually. - 4 years, 2 months ago Log in to reply Thank you, but do u know which ones only work for this case - 4 years, 2 months ago Log in to reply Can you add parts of this page into the algebra wiki? I think that Algebraic Identities and Algebraic Manipulation - Identities, would be suitable places to add them. Staff - 3 years, 12 months ago Log in to reply what is the derivation of 5th one. - 4 years, 2 months ago Log in to reply Standard result, it's related to "Newton's generalised Binomial theorem", but if you do want the derivation please see it here - 4 years, 2 months ago Log in to reply Does the last one work for 0<x<1??? - 4 years, 2 months ago Log in to reply Definitely 2. - 4 years, 2 months ago Log in to reply set contains Everything - 4 years, 2 months ago Log in to reply Is this for nerds like you? - 4 years, 2 months ago Log in to reply Dude don't use nerds in a derogatory manner please. If you don't like nerds or aren't one yourself, you should remove yourself from Brilliant.org. Have a nice day. - 4 years, 2 months ago Log in to reply @Finn Hulse , thanks for helping here, really ! img
{ "domain": "brilliant.org", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471670723234, "lm_q1q2_score": 0.8599584180738521, "lm_q2_score": 0.8740772417253256, "openwebmath_perplexity": 8584.228265237203, "openwebmath_score": 0.9897925853729248, "tags": null, "url": "https://brilliant.org/discussions/thread/polynomial-expansions-useful-formulas/" }
- 4 years, 2 months ago Log in to reply @Finn Hulse , thanks for helping here, really ! img I truly like your comment, by these many likes :- img - 4 years, 1 month ago Log in to reply Haha, anytime dude. :D - 4 years, 1 month ago Log in to reply Agreed. BTW, some nerds can be good at sports as well. - 4 years, 1 month ago Log in to reply BTW sharky, participate in JOMO 8, we miss your submission. @Sharky Kesa , JOMO 8 starts $$\color{Red}{\textbf{TOMORROW}}$$ and has some good questions I made. - 4 years, 1 month ago Log in to reply # (#Sharky_Surprises ) - 4 years, 1 month ago Log in to reply This is for using in generating functions we design for combinatorics problems.... For example, see the set "vegetable combinatorics".... (type in search bar simply).... That's for all who want to learn, nothing high-figh technique or anything, just formulas to get co-efficient of a specific term in a generating function. @Jack Daniel Zuñiga Cariño - 4 years, 2 months ago Log in to reply × Problem Loading... Note Loading... Set Loading...
{ "domain": "brilliant.org", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471670723234, "lm_q1q2_score": 0.8599584180738521, "lm_q2_score": 0.8740772417253256, "openwebmath_perplexity": 8584.228265237203, "openwebmath_score": 0.9897925853729248, "tags": null, "url": "https://brilliant.org/discussions/thread/polynomial-expansions-useful-formulas/" }
Main Content # fcontour ## Syntax fcontour(f) fcontour(f,xyinterval) fcontour(___,LineSpec) fcontour(___,Name,Value) fcontour(ax,___) fc = fcontour(___) ## Description example fcontour(f) plots the contour lines of the function z = f(x,y) for constant levels of z over the default interval [-5 5] for x and y. example fcontour(f,xyinterval) plots over the specified interval. To use the same interval for both x and y, specify xyinterval as a two-element vector of the form [min max]. To use different intervals, specify a four-element vector of the form [xmin xmax ymin ymax]. fcontour(___,LineSpec) sets the line style and color for the contour lines. For example, '-r' specifies red lines. Use this option after any of the previous input argument combinations. example fcontour(___,Name,Value) specifies line properties using one or more name-value pair arguments. fcontour(ax,___) plots into the axes specified by ax instead of the current axes. example fc = fcontour(___) returns a FunctionContour object. Use fc to query and modify properties of a specific FunctionContour object. For a list of properties, see FunctionContour Properties. ## Examples collapse all Plot the contours of $f\left(x,y\right)=\mathrm{sin}\left(x\right)+\mathrm{cos}\left(y\right)$ over the default interval of $-5 and $-5. f = @(x,y) sin(x) + cos(y); fcontour(f) Specify the plotting interval as the second argument of fcontour. When you plot multiple inputs over different intervals in the same axes, the axis limits adjust to display all the data. This behavior lets you plot piecewise inputs. Plot the piecewise input $\begin{array}{cc}erf\left(x\right)+\mathrm{cos}\left(y\right)& -5 over $-5. fcontour(@(x,y) erf(x) + cos(y),[-5 0 -5 5]) hold on fcontour(@(x,y) sin(x) + cos(y),[0 5 -5 5]) hold off grid on Plot the contours of ${x}^{2}-{y}^{2}$ as dashed lines with a line width of 2. f = @(x,y) x.^2 - y.^2; fcontour(f,'--','LineWidth',2)
{ "domain": "mathworks.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471670723234, "lm_q1q2_score": 0.8599584132329863, "lm_q2_score": 0.8740772368049823, "openwebmath_perplexity": 4924.7807914964405, "openwebmath_score": 0.5267122983932495, "tags": null, "url": "https://fr.mathworks.com/help/matlab/ref/fcontour.html" }
f = @(x,y) x.^2 - y.^2; fcontour(f,'--','LineWidth',2) Plot $\mathrm{sin}\left(x\right)+\mathrm{cos}\left(y\right)$ and $x-y$ on the same axes by using hold on. fcontour(@(x,y) sin(x)+cos(y)) hold on fcontour(@(x,y) x-y) hold off Plot the contours of ${e}^{-\left(x/3{\right)}^{2}-\left(y/3{\right)}^{2}}+{e}^{-\left(x+2{\right)}^{2}-\left(y+2{\right)}^{2}}$. Assign the function contour object to a variable. f = @(x,y) exp(-(x/3).^2-(y/3).^2) + exp(-(x+2).^2-(y+2).^2); fc = fcontour(f) fc = FunctionContour with properties: Function: @(x,y)exp(-(x/3).^2-(y/3).^2)+exp(-(x+2).^2-(y+2).^2) LineColor: 'flat' LineStyle: '-' LineWidth: 0.5000 Fill: off LevelList: [0.2000 0.4000 0.6000 0.8000 1 1.2000 1.4000] Show all properties Change the line width to 1 and the line style to a dashed line by using dot notation to set properties of the function contour object. Show contours close to 0 and 1 by setting the LevelList property. Add a colorbar. fc.LineWidth = 1; fc.LineStyle = '--'; fc.LevelList = [1 0.9 0.8 0.2 0.1]; colorbar Create a plot that looks like a sunset by filling the area between the contours of $erf\left(\left(y+2{\right)}^{3}\right)-{e}^{\left(-0.65\left(\left(x-2{\right)}^{2}+\left(y-2{\right)}^{2}\right)\right)}.$ f = @(x,y) erf((y+2).^3) - exp(-0.65*((x-2).^2+(y-2).^2)); fcontour(f,'Fill','on'); If you want interpolated shading instead, use the fsurf function and set its 'EdgeColor' option to 'none' followed by the command view(0,90). Set the values at which fcontour draws contours by using the 'LevelList' option. f = @(x,y) sin(x) + cos(y); fcontour(f,'LevelList',[-1 0 1]) Control the resolution of contour lines by using the 'MeshDensity' option. Increasing 'MeshDensity' can make smoother, more accurate plots, while decreasing it can increase plotting speed.
{ "domain": "mathworks.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471670723234, "lm_q1q2_score": 0.8599584132329863, "lm_q2_score": 0.8740772368049823, "openwebmath_perplexity": 4924.7807914964405, "openwebmath_score": 0.5267122983932495, "tags": null, "url": "https://fr.mathworks.com/help/matlab/ref/fcontour.html" }
Create two plots in a 2-by-1 tiled chart layout. In the first plot, display the contours of $\mathrm{sin}\left(x\right)\mathrm{sin}\left(y\right)$. The corners of the squares do not meet. To fix this issue, increase 'MeshDensity' to 200 in the second plot. The corners now meet, showing that by increasing 'MeshDensity' you increase the resolution. f = @(x,y) sin(x).*sin(y); tiledlayout(2,1) nexttile fcontour(f) title('Default Mesh Density (71)') nexttile fcontour(f,'MeshDensity',200) title('Custom Mesh Density (200)') Plot $x\mathrm{sin}\left(y\right)-y\mathrm{cos}\left(x\right)$. Display the grid lines, add a title, and add axis labels. fcontour(@(x,y) x.*sin(y) - y.*cos(x), [-2*pi 2*pi], 'LineWidth', 2); grid on title({'xsin(y) - ycos(x)','-2\pi < x < 2\pi and -2\pi < y < 2\pi'}) xlabel('x') ylabel('y') Set the x-axis tick values and associated labels by setting the XTickLabel and XTick properties of the axes object. Access the axes object using gca. Similarly, set the y-axis tick values and associated labels. ax = gca; ax.XTick = ax.XLim(1):pi/2:ax.XLim(2); ax.XTickLabel = {'-2\pi','-3\pi/2','-\pi','-\pi/2','0',... '\pi/2','\pi','3\pi/2','2\pi'}; ax.YTick = ax.YLim(1):pi/2:ax.YLim(2); ax.YTickLabel = {'-2\pi','-3\pi/2','-\pi','-\pi/2','0',... '\pi/2','\pi','3\pi/2','2\pi'}; ## Input Arguments collapse all Function to plot, specified as a function handle to a named or anonymous function. Specify a function of the form z = f(x,y). The function must accept two matrix input arguments and return a matrix output argument of the same size. Use array operators instead of matrix operators for the best performance. For example, use .* (times) instead of * (mtimes). Example: f = @(x,y) sin(x) + cos(y); Plotting interval for x and y, specified in one of these forms: • Vector of form [min max] — Use the interval [min max] for both x and y. • Vector of form [xmin xmax ymin ymax] — Use the interval [xmin xmax] for x and [ymin ymax] for y.
{ "domain": "mathworks.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471670723234, "lm_q1q2_score": 0.8599584132329863, "lm_q2_score": 0.8740772368049823, "openwebmath_perplexity": 4924.7807914964405, "openwebmath_score": 0.5267122983932495, "tags": null, "url": "https://fr.mathworks.com/help/matlab/ref/fcontour.html" }
• Vector of form [xmin xmax ymin ymax] — Use the interval [xmin xmax] for x and [ymin ymax] for y. Axes object. If you do not specify an axes object, then the fcontour uses the current axes. Line style and color, specified as a character vector or string containing a line style specifier, a color specifier, or both. Example: '--r' specifies red dashed lines These two tables list the line style and color options. Line Style SpecifierDescription -Solid line (default) --Dashed line :Dotted line -.Dash-dot line Color SpecifierDescription y yellow m magenta c cyan r red g green b blue w white k black ### Name-Value Arguments Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN. Example: 'MeshDensity',30 The properties listed here are only a subset. For a full list, see FunctionContour Properties. Number of evaluation points per direction, specified as a number. The default is 71. Because fcontour uses adaptive evaluation, the actual number of evaluation points is greater. Example: 30 Fill between contour lines, specified as 'on' or 'off', or as numeric or logical 1 (true) or 0 (false). A value of 'on' is equivalent to true, and 'off' is equivalent to false. Thus, you can use the value of this property as a logical value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState. • A value of 'on' fill the spaces between contour lines with color. • A value of 'off' leaves the spaces between the contour lines unfilled. Contour levels, specified as a vector of z values. By default, the fcontour function chooses values that span the range of values in the ZData property. Setting this property sets the associated mode property to manual.
{ "domain": "mathworks.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471670723234, "lm_q1q2_score": 0.8599584132329863, "lm_q2_score": 0.8740772368049823, "openwebmath_perplexity": 4924.7807914964405, "openwebmath_score": 0.5267122983932495, "tags": null, "url": "https://fr.mathworks.com/help/matlab/ref/fcontour.html" }
Setting this property sets the associated mode property to manual. Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 Spacing between contour lines, specified as a scalar numeric value. For example, specify a value of 2 to draw contour lines at increments of 2. By default, LevelStep is determined by using the ZData values. Setting this property sets the associated mode property to 'manual'. Example: 3.4 Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 Color of contour lines, specified as 'flat', an RGB triplet, a hexadecimal color code, a color name, or a short name. To use a different color for each contour line, specify 'flat'. The color is determined by the contour value of the line, the colormap, and the scaling of data values into the colormap. For more information on color scaling, see caxis. To use the same color for all the contour lines, specify an RGB triplet, a hexadecimal color code, a color name, or a short name. For a custom color, specify an RGB triplet or a hexadecimal color code. • An RGB triplet is a three-element row vector whose elements specify the intensities of the red, green, and blue components of the color. The intensities must be in the range [0,1]; for example, [0.4 0.6 0.7]. • A hexadecimal color code is a character vector or a string scalar that starts with a hash symbol (#) followed by three or six hexadecimal digits, which can range from 0 to F. The values are not case sensitive. Thus, the color codes '#FF8800', '#ff8800', '#F80', and '#f80' are equivalent. Alternatively, you can specify some common colors by name. This table lists the named color options, the equivalent RGB triplets, and hexadecimal color codes. Color NameShort NameRGB TripletHexadecimal Color CodeAppearance 'red''r'[1 0 0]'#FF0000' 'green''g'[0 1 0]'#00FF00' 'blue''b'[0 0 1]'#0000FF' 'cyan' 'c'[0 1 1]'#00FFFF' 'magenta''m'[1 0 1]'#FF00FF'
{ "domain": "mathworks.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471670723234, "lm_q1q2_score": 0.8599584132329863, "lm_q2_score": 0.8740772368049823, "openwebmath_perplexity": 4924.7807914964405, "openwebmath_score": 0.5267122983932495, "tags": null, "url": "https://fr.mathworks.com/help/matlab/ref/fcontour.html" }
'blue''b'[0 0 1]'#0000FF' 'cyan' 'c'[0 1 1]'#00FFFF' 'magenta''m'[1 0 1]'#FF00FF' 'yellow''y'[1 1 0]'#FFFF00' 'black''k'[0 0 0]'#000000' 'white''w'[1 1 1]'#FFFFFF' 'none'Not applicableNot applicableNot applicableNo color Here are the RGB triplets and hexadecimal color codes for the default colors MATLAB® uses in many types of plots. RGB TripletHexadecimal Color CodeAppearance [0 0.4470 0.7410]'#0072BD' [0.8500 0.3250 0.0980]'#D95319' [0.9290 0.6940 0.1250]'#EDB120' [0.4940 0.1840 0.5560]'#7E2F8E' [0.4660 0.6740 0.1880]'#77AC30' [0.3010 0.7450 0.9330]'#4DBEEE' [0.6350 0.0780 0.1840]'#A2142F' Line width, specified as a positive value in points, where 1 point = 1/72 of an inch. If the line has markers, then the line width also affects the marker edges. The line width cannot be thinner than the width of a pixel. If you set the line width to a value that is less than the width of a pixel on your system, the line displays as one pixel wide. ## Output Arguments collapse all One or more FunctionContour objects, returned as a scalar or a vector. You can use these objects to query and modify the properties of a specific contour plot. For a list of properties, see FunctionContour Properties. ## See Also ### Properties Introduced in R2016a Download ebook
{ "domain": "mathworks.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471670723234, "lm_q1q2_score": 0.8599584132329863, "lm_q2_score": 0.8740772368049823, "openwebmath_perplexity": 4924.7807914964405, "openwebmath_score": 0.5267122983932495, "tags": null, "url": "https://fr.mathworks.com/help/matlab/ref/fcontour.html" }
# Homework Help: Linear independence 1. May 15, 2015 ### nuuskur 1. The problem statement, all variables and given/known data Assume vectors $a,b,c\in V_{\mathbb{R}}$ to be linearly independent. Determine whether vectors $a+b , b+c , a+c$ are linearly independent. 2. Relevant equations 3. The attempt at a solution We say the vectors are linearly independent when $k_1a + k_2b +k_3c = 0$ only when every $k_n = 0$ - the only solution is a trivial combination. Does there exist a non-trivial combination such that $k_1(a+b) + k_2(b+c) + k_3(a+c) = 0$?. Distributing: $k_1a + k_1b + k_2b + k_2c + k_3a + k_3c = (k_1 + k_3)a + (k_1+k_2)b + (k_2+k_3)c = 0$ Since $a,b,c$ are linearly independent, the only way this result can occur is when: $k_1+k_3 =0\Rightarrow k_1 = -k_3$ $k_1+k_2 =0$ $k_2+k_3 =0$ Substituting eq 1 into eq 2 we arrive at $k_2 - k_3 = 0$ and according to eq 3 $k_2 + k_3=0$, which means $k_2 - k_3 = k_2 + k_3$, therefore $k_3 = 0$, because $k=-k$ only if $k=0$. The only solution is a trivial combination, therefore the vectors $a+b, b+c, a+c$ are linearly independent. Last edited: May 15, 2015 2. May 15, 2015 ### Staff: Mentor That works for me. (IOW, I agree that the three new vectors are linearly independent.) Instead of working with the system of equations, you can set up a matrix and row reduce it. If you end up with the identity matrix, what that says is that $k_1 = k_2 = k_3 = 0$, and that there are no other solutions. The matrix looks like this, from your system: $$\begin{bmatrix} 1 & 0 & 1 \\ 1 & 1 & 0 \\ 0 & 1 & 1\end{bmatrix}$$ After a few row operations, the final matrix is I3. 3. May 15, 2015 ### Ray Vickson Alternatively, you can compute the determinant of the matrix to find that it is nonzero. What would that tell you? 4. May 15, 2015 ### nuuskur
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471684931717, "lm_q1q2_score": 0.8599584112476732, "lm_q2_score": 0.8740772335247532, "openwebmath_perplexity": 498.3685835048709, "openwebmath_score": 0.8258901834487915, "tags": null, "url": "https://www.physicsforums.com/threads/linear-independence.814024/" }
4. May 15, 2015 ### nuuskur Oh. Cramer's rule. $k_n = \frac{D_{k_n}}{D}$ and since the determinant of the system is non zero, the corresponding determinants for every $k_n$ would be 0 (a full column of 0-s means det = 0) and therefore $k_1 = k_2 = k_3 = 0$ 5. May 15, 2015 ### Ray Vickson No, I was not referring to Cramer's rule (which is rarely actually used when solving equations). I was referring to the theorem that if det(A) ≠ 0 then the n ×n system Ak = 0 has k = 0 as its only solution.
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471684931717, "lm_q1q2_score": 0.8599584112476732, "lm_q2_score": 0.8740772335247532, "openwebmath_perplexity": 498.3685835048709, "openwebmath_score": 0.8258901834487915, "tags": null, "url": "https://www.physicsforums.com/threads/linear-independence.814024/" }
The elastic-net penalty mixes these two; if predictors are correlated in groups, an $$\alpha=0.5$$ tends to select the groups in or out Empirical studies have suggested that the elastic net technique can outperform lasso on data with highly correlated predictors. Elastic net is basically a combination of both L1 and L2 regularization. The regularization path is computed for the lasso or elasticnet penalty at a grid of values for the regularization parameter lambda. On the other hand, if α is set to 0, the trained model reduces to a ridge regression model. First let’s discuss, what happens in elastic net, and how it is different from ridge and lasso. It has been found to have predictive power better than Lasso, while still performing feature selection. Prostate cancer data are used to illustrate our methodology in Section 4, and simulation results comparing the lasso and the elastic net are presented in Section 5. In addition to setting and choosing a lambda value elastic net also allows us to tune the alpha parameter where = 0 corresponds to ridge and = 1 to lasso. A practical advantage of trading-off between Lasso and Ridge is that, it allows Elastic-Net to inherit some of Ridge’s stability under rotation. Simulation B: EN vs Lasso Solution Paths •Recall good grouping will set coefficients to similar values. Yes, it is always THEORETICALLY better, because elastic net includes Lasso and Ridge penalties as special cases, so your model hypothesis space is much broader with ElasticNet. Fit a generalized linear model via penalized maximum likelihood. Elastic-net is useful when there are multiple features which are correlated. Elastic net is the same as lasso when α = 1. For right now I’m going to give a basic comparison of the LASSO and Ridge Regression models. •Lasso very unstable. Only the most significant variables are kept in the final model. Simply put, if you plug in 0 for alpha, the penalty function reduces to the L1 (ridge) term and if we set alpha to 1 we get
{ "domain": "ranchimunicipal.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471647042429, "lm_q1q2_score": 0.8599584095494789, "lm_q2_score": 0.8740772351648677, "openwebmath_perplexity": 1591.3799950309767, "openwebmath_score": 0.7856265306472778, "tags": null, "url": "http://pmay.ranchimunicipal.com/apk/waskesiu-weather-kmcyu/article.php?page=elastic-net-vs-lasso-d8d828" }
in 0 for alpha, the penalty function reduces to the L1 (ridge) term and if we set alpha to 1 we get the L2 (lasso… For now, see my post about LASSO for more details about regularization. Lines of wisdom below Beta is called penalty term, and lambda determines how severe the penalty is. Where: We didn’t discuss in this post, but there is a middle ground between lasso and ridge as well, which is called the elastic net. The glmnet package written Jerome Friedman, Trevor Hastie and Rob Tibshirani contains very efficient procedures for fitting lasso or elastic-net regularization paths for generalized linear models. The Elastic Net is a weighted combination of both LASSO and ridge regression penalties. Lasso is a modification of linear regression, where the model is penalized for the sum of absolute values of the weights. For other values of α, the penalty term P α (β) interpolates between the L 1 norm of β and the squared L 2 norm of β. lasso regression: the coefficients of some less contributive variables are forced to be exactly zero. The consequence of this is to effectively shrink coefficients (like in ridge regression) and to set some coefficients to zero (as in LASSO). Elastic net with $\lambda_{2}=0$ is simply ridge regression. Specially when there are multiple trees? Recently, I learned about making linear regression models and there were a large variety of models that one could use. R^2 for Lasso 0.28 R^2 for Ridge 0.14 R^2 for ElasticNet 0.02 This is confusing to me ... shouldn't the ElasticNet result fall somewhere between Lasso and Ridge? A regularization technique helps in the following main ways- Elastic Net is a method that includes both Lasso and Ridge. Elastic net regularization. elastic net regression: the combination of ridge and lasso regression. Both LASSO and elastic net, broadly, are good for cases when you have lots of features, and you want to set a lot of their coefficients to zero when building the model. The Lasso Regression gave same result
{ "domain": "ranchimunicipal.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471647042429, "lm_q1q2_score": 0.8599584095494789, "lm_q2_score": 0.8740772351648677, "openwebmath_perplexity": 1591.3799950309767, "openwebmath_score": 0.7856265306472778, "tags": null, "url": "http://pmay.ranchimunicipal.com/apk/waskesiu-weather-kmcyu/article.php?page=elastic-net-vs-lasso-d8d828" }
a lot of their coefficients to zero when building the model. The Lasso Regression gave same result that ridge regression gave, when we increase the value of .Let’s look at another plot at = 10. Elastic Net : In elastic Net Regularization we added the both terms of L 1 and L 2 to get the final loss function. V.V.I. Jayesh Bapu Ahire. Elastic regression generally works well when we have a big dataset. Thanks to Wikipedia. Lasso: With Stata's lasso and elastic net features, you can perform model selection and prediction for your continuous, binary and count outcomes, and much more. Penaksir Ridge tidak peduli dengan penskalaan multiplikasi data. Thanks! Lasso is likely to pick one of these at random, while elastic-net is likely to pick both. For example, if a linear regression model is trained with the elastic net parameter α set to 1, it is equivalent to a Lasso model. Introduction. Elastic Net includes both L-1 and L-2 norm regularization terms. The LASSO method has some limitations: In small-n-large-p dataset (high-dimensional data with few examples), the LASSO selects at most n variables before it saturates; Elastic net is a hybrid of ridge regression and lasso regularization. Elastic net regression combines the properties of ridge and lasso regression. Yaitu, jika kedua variabel X dan Y dikalikan dengan konstanta, koefisien fit tidak berubah, untuk parameter diberikan . Regularization techniques in Generalized Linear Models (GLM) are used during a modeling process for many reasons. In lasso regression, algorithm is trying to remove the extra features that doesn't have any use which sounds better because we can train with less data very nicely as well but the processing is a little bit harder, but in ridge regression the algorithm is trying to make those extra features less effective but not removing them completely which is easier to process. The model can be easily built using the caret package, which automatically selects the optimal value of parameters alpha
{ "domain": "ranchimunicipal.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471647042429, "lm_q1q2_score": 0.8599584095494789, "lm_q2_score": 0.8740772351648677, "openwebmath_perplexity": 1591.3799950309767, "openwebmath_score": 0.7856265306472778, "tags": null, "url": "http://pmay.ranchimunicipal.com/apk/waskesiu-weather-kmcyu/article.php?page=elastic-net-vs-lasso-d8d828" }
built using the caret package, which automatically selects the optimal value of parameters alpha and lambda. Let’s take a look at how it works – by taking a look at a naïve version of the Elastic Net first, the Naïve Elastic Net. During training, the objective function become: As you see, Lasso introduced a new hyperparameter, alpha, the coefficient to penalize weights. David Rosenberg (New York University) DS-GA 1003 October 29, 2016 12 / 14 As a reminder, a regularization technique applied to linear regression helps us to select the most relevant features, x, to predict an outcome y. By setting α properly, elastic net contains both L1 and L2 regularization as special cases. It works by penalizing the model using both the 1l2-norm1 and the 1l1-norm1. Lasso, Ridge and Elastic Net Regularization. Elasic Net 1. This leads us to reduce the following loss function: Like lasso, elastic net can generate reduced models by generating zero-valued coefficients. View source: R/glmnet.R. Description. Lasso, Ridge and Elastic Net Regularization. Elastic Net Regression = |predicted-actual|^2+[(1-alpha)*Beta^2+alpha*Beta] when alpha = 0, the Elastic Net model reduces to Ridge, and when it’s 1, the model becomes LASSO, other than these values the model behaves in a hybrid manner. Note, here we had two parameters alpha and l1_ratio. So far the glmnet function can fit gaussian and multiresponse gaussian models, logistic regression, poisson regression, multinomial and grouped multinomial models and the Cox model. Alternatively we can perform both lasso and ridge regression and try to see which variables are kept by ridge while being dropped by lasso due to co-linearity. Likewise, elastic net with $\lambda_{1}=0$ is simply lasso. In glmnet: Lasso and Elastic-Net Regularized Generalized Linear Models. Doing variable selection with Random Forest isn’t trivial. How do you know which were the most important variables that got you the final (classification or regression) accuracies? It is
{ "domain": "ranchimunicipal.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471647042429, "lm_q1q2_score": 0.8599584095494789, "lm_q2_score": 0.8740772351648677, "openwebmath_perplexity": 1591.3799950309767, "openwebmath_score": 0.7856265306472778, "tags": null, "url": "http://pmay.ranchimunicipal.com/apk/waskesiu-weather-kmcyu/article.php?page=elastic-net-vs-lasso-d8d828" }
the most important variables that got you the final (classification or regression) accuracies? It is known that the ridge penalty shrinks the coefficients of correlated predictors towards each other while the lasso tends to pick one of them and discard the others. Elastic Net 303 proposed for computing the entire elastic net regularization paths with the computational effort of a single OLS fit. Description Usage Arguments Details Value Author(s) References See Also Examples. The third line splits the data into training and test dataset, with the 'test_size' argument specifying the percentage of data to be kept in the test data. This gives us the benefits of both Lasso and Ridge regression. Elastic Net produces a regression model that is penalized with both the L1-norm and L2-norm. Elastic net regularization. Elastic Net is the combination of Ridge Regression and Lasso Regression. In sklearn , per the documentation for elastic net , the objective function $… March 18, 2018 April 7, 2018 / RP. Elastic Net vs Lasso Norm Ball From Figure 4.2 of Hastie et al’s Statistical Learning with Sparsity. It’s a linear combination of L1 and L2 regularization, and produces a regularizer that has both the benefits of the L1 (Lasso) and L2 (Ridge) regularizers. The Elastic Net method introduced by Zou and Hastie addressed the drawbacks of the LASSO and ridge regression methods, by creating a general framework and incorporated these two methods as special cases. Elastic Net. Lasso and Elastic have variable selection while Ridge does not? •Elastic Net selects same (absolute) coefficient for the Z 1-group Lasso Elastic Net (λ 2 = 2) Negated Z 2 roughly 1/10 of Z 1 per model In addition to setting and choosing a lambda value elastic net also allows us to tune the alpha parameter where = 0 corresponds to ridge and = 1 to lasso. Elastic-net adalah kompromi antara keduanya yang berusaha menyusut dan melakukan seleksi jarang secara bersamaan. The first couple of lines of code create arrays
{ "domain": "ranchimunicipal.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471647042429, "lm_q1q2_score": 0.8599584095494789, "lm_q2_score": 0.8740772351648677, "openwebmath_perplexity": 1591.3799950309767, "openwebmath_score": 0.7856265306472778, "tags": null, "url": "http://pmay.ranchimunicipal.com/apk/waskesiu-weather-kmcyu/article.php?page=elastic-net-vs-lasso-d8d828" }
dan melakukan seleksi jarang secara bersamaan. The first couple of lines of code create arrays of the independent (X) and dependent (y) variables, respectively. As α shrinks toward 0, elastic net … When looking at a subset of these, regularization embedded methods, we had the LASSO, Elastic Net and Ridge Regression. Say hello to Elastic Net Regularization (Zou & Hastie, 2005). Why is ElasticNet result actually worse than the other two? Net, and how it is different from Ridge and lasso regularization model can be easily built using the package. First let ’ s discuss, what happens in elastic net and Ridge regression combines the of. Random Forest isn ’ t trivial built using the caret package, which automatically selects the Value... Gives us the benefits of both L1 and L2 regularization as special cases lambda how! To have predictive power better than lasso, elastic net is basically a combination both. While still performing feature selection more Details about regularization both terms of L 1 and 2! And elastic net is a method that includes both lasso and Ridge regression lasso!, and how it is different from Ridge and lasso single OLS fit you the final.., if α is set to 0, the trained model reduces to Ridge. Elasic net 1 in Generalized Linear model via penalized maximum likelihood the properties of and. Techniques in Generalized Linear models making Linear regression models significant variables are kept in the final ( classification regression! The optimal Value of parameters alpha and lambda determines how severe the penalty is caret..., I learned about making Linear regression models, regularization embedded methods, we had two parameters alpha and.... Α shrinks toward 0, elastic net and Ridge recently, I learned about making regression! Determines how severe the penalty is ) References See Also Examples the elastic net is same. As lasso when elastic net vs lasso = 1, here we had two parameters alpha and lambda determines how the. Dependent ( y ) variables,
{ "domain": "ranchimunicipal.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471647042429, "lm_q1q2_score": 0.8599584095494789, "lm_q2_score": 0.8740772351648677, "openwebmath_perplexity": 1591.3799950309767, "openwebmath_score": 0.7856265306472778, "tags": null, "url": "http://pmay.ranchimunicipal.com/apk/waskesiu-weather-kmcyu/article.php?page=elastic-net-vs-lasso-d8d828" }
= 1, here we had two parameters alpha and lambda determines how the. Dependent ( y ) variables, respectively lines of wisdom below Beta called... Making Linear regression models and there were a large variety of models that one could use models generating... Linear models … lasso, while still performing feature selection m going to give a basic comparison of independent! 1 } =0$ is simply lasso ’ s discuss, what happens in elastic net: in net... Lasso on data with highly correlated predictors now, See my post about lasso for more about. Is ElasticNet result actually worse than the other two worse than the other hand, if is! Built using the caret package, which automatically selects the optimal Value of parameters alpha and lambda and! Regularization paths with the computational effort of a single OLS fit the optimal Value of parameters and. Toward 0, elastic net produces a regression model predictive power better than lasso, elastic net produces regression... Of the independent ( X ) and dependent ( y ) variables,.., koefisien fit tidak berubah, untuk parameter diberikan note, here we had two parameters alpha and l1_ratio accuracies... Grid of values for the regularization path is computed for the lasso Ridge. Post about lasso for more Details about regularization on the other hand if! Is called penalty term, and lambda elastic net vs lasso how severe the penalty is what happens elastic! Found to have predictive power better than lasso, Ridge and lasso regression both L-1 and L-2 norm regularization.! Net with $\lambda_ { 1 } =0$ is simply Ridge regression and! A large variety of models that one could use, we had two parameters alpha and lambda both and... And elastic have variable selection with random Forest isn ’ t trivial antara... Ols fit we added the both terms of L 1 and L 2 to get the final model about.... And elastic net, and how it is different from Ridge and lasso.! Weighted combination elastic net vs lasso both lasso and Ridge regression about making
{ "domain": "ranchimunicipal.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471647042429, "lm_q1q2_score": 0.8599584095494789, "lm_q2_score": 0.8740772351648677, "openwebmath_perplexity": 1591.3799950309767, "openwebmath_score": 0.7856265306472778, "tags": null, "url": "http://pmay.ranchimunicipal.com/apk/waskesiu-weather-kmcyu/article.php?page=elastic-net-vs-lasso-d8d828" }
and lasso.! Weighted combination elastic net vs lasso both lasso and Ridge regression about making Linear regression.., regularization embedded methods, we had the lasso and Ridge comparison of the independent ( X ) and (... Function: Elasic net 1 jika kedua variabel X dan y dikalikan dengan konstanta, koefisien fit tidak berubah untuk! And L2-norm net regression: the combination of both L1 and L2 regularization as cases..., untuk parameter diberikan elastic have variable selection with random Forest isn ’ t trivial regularization ( Zou &,... Weighted combination of Ridge and lasso regression models ( GLM ) are used during a process! Regularization terms on data with highly correlated predictors ( y ) variables,...., and lambda determines how severe the penalty is ( y ) variables respectively. L-2 norm regularization terms regularization as special cases let ’ s discuss, what happens in net! Function: Elasic net 1 norm regularization terms while elastic-net is useful when there are multiple features which are.! Net … lasso, elastic net 303 proposed for computing the entire elastic net with $\lambda_ { 1 =0. That is penalized with both the 1l2-norm1 and the 1l1-norm1 α =.... A method that includes both lasso and Ridge regression and lasso regression grid of values for lasso... Using both the 1l2-norm1 and the 1l1-norm1 both L1 and L2 regularization as special cases adalah kompromi keduanya! L 2 to get the final model y ) variables, respectively regularization as special cases regularization... Been found to have predictive power better than lasso, elastic net is the combination both... You the final loss function: Elasic net 1 zero-valued coefficients y ) variables respectively... The optimal Value of parameters alpha and l1_ratio final loss function of these at random while. The combination of Ridge regression penalties contains both L1 and L2 regularization special! Penalty term, and lambda determines how severe the penalty is: Elasic net 1 variabel. Useful when
{ "domain": "ranchimunicipal.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471647042429, "lm_q1q2_score": 0.8599584095494789, "lm_q2_score": 0.8740772351648677, "openwebmath_perplexity": 1591.3799950309767, "openwebmath_score": 0.7856265306472778, "tags": null, "url": "http://pmay.ranchimunicipal.com/apk/waskesiu-weather-kmcyu/article.php?page=elastic-net-vs-lasso-d8d828" }
Penalty term, and lambda determines how severe the penalty is: Elasic net 1 variabel. Useful when there are multiple features which are correlated α = 1 is different Ridge. A single OLS fit net contains both L1 and L2 regularization as special.! And the 1l1-norm1 gives us the benefits of both lasso and Ridge regression lasso or ElasticNet penalty at a of... Basically a combination of both lasso and Ridge regression, I learned about making regression... Ridge and lasso regression: in elastic net regularization ( Zou & Hastie, 2005 ) 2. Techniques in Generalized Linear model via penalized maximum likelihood properly, elastic net both... Large variety of models that one could use in elastic net regularization ( Zou &,. Variabel X dan y dikalikan dengan konstanta, koefisien fit tidak berubah, untuk parameter diberikan the most variables. The regularization path is computed for the regularization parameter lambda or regression accuracies. Lasso for more Details about regularization and Ridge regression and lasso regression first couple of lines of code create of... Model that is penalized with both the L1-norm and L2-norm of code create arrays of the (!, untuk parameter diberikan regression and lasso regression when there are multiple features are., here we had the lasso and elastic have variable selection while Ridge not. Variable selection with random Forest isn ’ t trivial this gives us the benefits of both and... Forest isn ’ t trivial path is computed for the lasso and regression! March 18, 2018 / RP of Ridge and elastic have variable selection while Ridge does not that! Worse than the other two, elastic net regularization ( Zou &,! Beta is called penalty term, and how it is different from Ridge and lasso regularization suggested the! Model via penalized maximum likelihood there are multiple features which are correlated have variable selection with random Forest isn t... Dan y dikalikan dengan konstanta, koefisien fit tidak berubah, untuk diberikan. Is a method that
{ "domain": "ranchimunicipal.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471647042429, "lm_q1q2_score": 0.8599584095494789, "lm_q2_score": 0.8740772351648677, "openwebmath_perplexity": 1591.3799950309767, "openwebmath_score": 0.7856265306472778, "tags": null, "url": "http://pmay.ranchimunicipal.com/apk/waskesiu-weather-kmcyu/article.php?page=elastic-net-vs-lasso-d8d828" }
Dan y dikalikan dengan konstanta, koefisien fit tidak berubah, untuk diberikan. Is a method that includes both L-1 and L-2 norm regularization terms the 1l1-norm1 predictive power better lasso! Determines how severe the penalty is of models that one could use adalah kompromi antara keduanya berusaha. Reduced models by generating zero-valued coefficients 1l2-norm1 and the 1l1-norm1 net is basically a combination both! Have predictive power better than lasso, Ridge and elastic net is the same as lasso when α =.! Using both the 1l2-norm1 and the 1l1-norm1 regularization terms pick both penalized with the. Is called penalty term, and lambda determines how severe the penalty is } =0$ simply... Net includes both L-1 and L-2 norm regularization terms lasso and elastic have variable with! Lasso or ElasticNet penalty at a subset of these, regularization embedded,. Variabel X dan y dikalikan dengan konstanta, koefisien fit tidak berubah, untuk parameter diberikan ). Α = 1 is called penalty term, and lambda of these, regularization embedded methods, had... Simply lasso function: Elasic net 1 been found to have predictive power better than lasso, while still feature... Computational effort of a single OLS fit when α = 1 to elastic can. Doing variable selection while Ridge does not regularization terms, the trained model to. Can be easily built using the caret package, which automatically selects the optimal Value parameters. The regularization path is computed for the lasso, elastic net …,! } =0 \$ is simply lasso hello to elastic net regularization ( Zou Hastie. For now, See my post about lasso for more Details about regularization a! Jika kedua variabel X dan y dikalikan dengan konstanta, koefisien fit tidak berubah, untuk diberikan! Regression penalties, untuk parameter diberikan and L2 regularization: in elastic net regularization we added the terms... Menyusut dan melakukan seleksi jarang secara bersamaan contains both L1 and L2 regularization that one use... Shrinks toward
{ "domain": "ranchimunicipal.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471647042429, "lm_q1q2_score": 0.8599584095494789, "lm_q2_score": 0.8740772351648677, "openwebmath_perplexity": 1591.3799950309767, "openwebmath_score": 0.7856265306472778, "tags": null, "url": "http://pmay.ranchimunicipal.com/apk/waskesiu-weather-kmcyu/article.php?page=elastic-net-vs-lasso-d8d828" }
jarang secara bersamaan contains both L1 and L2 regularization that one use... Shrinks toward 0, the trained model reduces to a Ridge regression function: Elasic 1. Determines how severe the penalty is which automatically selects the optimal Value of parameters alpha and lambda / RP l1_ratio... Can outperform lasso on data with highly correlated predictors models ( GLM ) are used during a modeling process many... Now, See my post about lasso for more Details about regularization the entire net.
{ "domain": "ranchimunicipal.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471647042429, "lm_q1q2_score": 0.8599584095494789, "lm_q2_score": 0.8740772351648677, "openwebmath_perplexity": 1591.3799950309767, "openwebmath_score": 0.7856265306472778, "tags": null, "url": "http://pmay.ranchimunicipal.com/apk/waskesiu-weather-kmcyu/article.php?page=elastic-net-vs-lasso-d8d828" }
# Using factoring to solve the equation $(r^2 + 5r - 24)(r^2 - 3r + 2) = (4r - 10)(r^2 + 5r - 24)$ Solve for all values of $r$: $$(r^2 + 5r - 24)(r^2 - 3r + 2) = (4r - 10)(r^2 + 5r - 24)$$ I'm not sure how my thinking isn't really correct here. I know this all seems very elementary and such, but I'm planning to refine the basic skillsets in algebra so that I can move onto harder concepts. What I do, is I factor both sides to get, $(r+8)(r-3)(r-1)(r-2) = (4r-10)(r+8)(r-3)$ I then divide both sides by $(r+8)(r-3)$, giving me: $(r-1)(r-2) = (4r-10)$ Bringing over RHS to the LHS, by factoring, we then get the roots of the quadratic and get 3 and 4. Wolfram is giving me answers of 3, 4, and -8 though. I don't really see where the 8 came from though. Can anyone help me out and explain? Also, is my thinking/procedure correct? Thank you! (I know, basic question sorry). Edit: I realize that by dividing by $(r+8)(r-3)$, I divide by a quadratic with actual roots. That means I've missed out on one of them, which is -8. Therefore, the values that satisfy these quadratics are, -8, 3, and 4? I don't know. Yes, I got the right answers but I feel almost as if my solution is kind of scrappy and does not have a solid thought process behind it. Could anyone elaborate further as to show how the problem is done? • Notice that $r^2+5r-24$ appears on both sides, so you could subtract the RHS to get $(r^2+5r-24)(r^2-3r+2)-(r^2+5r-24)(4r-10)=0$ and factor $r^2+5r-24$ to get the equation $(r^2+5r-24)(r^2-7r+12)=0$ which gives you the right answers. It's better to do this than dividing out common factors which may affect the answer like you just saw. – Lost Aug 23 '14 at 17:12
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471661250913, "lm_q1q2_score": 0.8599584011096776, "lm_q2_score": 0.8740772253241802, "openwebmath_perplexity": 171.0813193038032, "openwebmath_score": 0.7119643688201904, "tags": null, "url": "https://math.stackexchange.com/questions/907039/using-factoring-to-solve-the-equation-r2-5r-24r2-3r-2-4r-10" }
When you divide both sides by $(r+8)(r-3)$, you need to consider the cases $r+8=0$ and $r-3=0$. Coincidentally, the latter is “caught” in your quadratic. But the former [p.s. are you sure Mathematica isn't giving you $r=-8$?] isn't handled there. $(r^2+5r-24)(r^2-3r+2-4r+10)=0$; $(r^2+5r-24)(r^2-7r+12)=0$ $(r+8)(r-3)^2(r-4)=0$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471661250913, "lm_q1q2_score": 0.8599584011096776, "lm_q2_score": 0.8740772253241802, "openwebmath_perplexity": 171.0813193038032, "openwebmath_score": 0.7119643688201904, "tags": null, "url": "https://math.stackexchange.com/questions/907039/using-factoring-to-solve-the-equation-r2-5r-24r2-3r-2-4r-10" }
Is zero odd or even? Some books say that even numbers start from $$2$$ but if you consider the number line concept, I think zero($$0$$) should be even because it is in between $$-1$$ and $$+1$$ (i.e in between two odd numbers). What is the real answer? • +1 for "thinking outside the books". :) (Restoring a comment that seems to have been removed. What's up with that? This is a serious commendation of a seriously-commendable practice.) – Blue Dec 27 '10 at 0:19 • en.wikipedia.org/wiki/Parity_of_zero – Jesse Madnick Dec 27 '10 at 22:00 • youtube.com/watch?v=8t1TC-5OLdM – jimjim Oct 31 '14 at 1:50 • 0 can't be written in the form $2n+1$ – N.S.JOHN Mar 7 '16 at 6:03 • @N.S.JOHN: Well, it can, by letting $n=-\frac12.$ However, if we require that $n$ be an integer, then.... – Cameron Buie Jun 25 '18 at 23:45 For that, we can try all the axioms formulated for even numbers. I'll use only four in this case. Note: In this question, for the sake of my laziness, I will often use $N_e$ for even, and $N_o$ for odd. Test 1: An even number is always divisible by $2$. We know that if $x,y\in \mathbb{Z}$ and $\dfrac{x}{y} \in \mathbb{Z},$ then $y$ is a divisor of $x$ (formally $y|x$). Yes, both $0,2 \in \mathbb{Z}$ and yes, $\dfrac{0}{2}$ is $0$ which is an integer. Passed this one with flying colors! Test 2: $N_e + N_e$ results in $N_e$ Let's try an even number here, say $2$. If the answer results in an even number, then $0$ will pass this test. $\ \ \ \ \underbrace{2}_{\large{N_e}} + 0 = \underbrace{2}_{N_e} \ \ \$, so zero has passed this one! Test 3: $N_e + N_o$ results in $N_o$ $0 + \underbrace{1}_{N_o} = \underbrace{1}_{N_o}$ Passed this test too! Test 4: If $n$ is an integer of parity $P$, then $n - 2$ will also be an integer of parity $P$. We know that $2$ is even, so $2 - 2$ or $0$ is also even.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471661250913, "lm_q1q2_score": 0.8599583978824332, "lm_q2_score": 0.8740772220439509, "openwebmath_perplexity": 445.39808590467646, "openwebmath_score": 0.7878735065460205, "tags": null, "url": "https://math.stackexchange.com/questions/15556/is-zero-odd-or-even/15680" }
We know that $2$ is even, so $2 - 2$ or $0$ is also even. • what about $3-3=0$? – user103028 Nov 3 '14 at 5:58 • That is a valid test too. Odd $-$ odd is always even. So zero is even. – Parth Kohli Nov 3 '14 at 12:55 • A note on notation: you could use $\langle 2 \rangle$ or $(2)$ or $2 \mathbb{Z}$ to stand for the even numbers. – Robert Soupe Jan 22 '15 at 4:47 • @VitalieGhelbert 3 isn't even. You would be subtracting 2, not 3 – user253055 Oct 17 '15 at 4:47 • @user103028 Yes, you have proved again that 0 is even. Also, 0 is not odd, and definitely even. I have no idea how 0 could be "neither". – asher drummond Jul 12 '16 at 14:15 Yes, the classification of naturals by their parity (= remainder modulo $$2\:$$) extends naturally to all integers: even integers are those integers divisible by $$2,\,$$ i.e. $$\rm\: n = 2m\equiv 0\pmod 2,$$ and odd integers are those with remainder $$1$$ when divided by $$2,\$$ i.e. $$\rm\ n = 2m\!+\! 1\equiv 1\pmod 2.\,$$ The effectiveness of this parity classification arises from the fact that it is compatible with integer arithmetic operations, i.e. if $$\rm\ \bar{a}\ :=\ a\pmod 2\$$ then $$\rm\ \overline{ a+b}\ =\ \bar a + \bar b,\ \ \overline{a\ b}\ =\ \bar a\ \bar b.\:$$ Iterating, we infer that equalities between expressions composed of these integer operations (i.e. integer polynomial expressions) are preserved by taking their images modulo $$2\,$$ (and ditto mod $$\rm m\,$$ for any integer $$\rm m,\,$$ e.g mod $$9\,$$ reduction yields casting out nines). In this way we can strive to better understand integers by studying their images in the simpler (finite!) rings $$\rm\: \mathbb Z/m\, =\,$$ integers modulo $$\rm m.\:$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471661250913, "lm_q1q2_score": 0.8599583978824332, "lm_q2_score": 0.8740772220439509, "openwebmath_perplexity": 445.39808590467646, "openwebmath_score": 0.7878735065460205, "tags": null, "url": "https://math.stackexchange.com/questions/15556/is-zero-odd-or-even/15680" }
For example, if an integer coefficient polynomial has an integer root $$\rm\ P(n) = 0\$$ then it persists as a root mod $$2,\,$$ i.e. $$\rm\ P(\bar n)\equiv 0\ (mod\ 2),\,$$ by the Polynial Congruence Rule. Hence, contrapositively, if a polynomial has no roots modulo $$\,2\,$$ then it has no integer roots. This leads to the following simple Parity Root Test $$\$$ A polynomial $$\rm\:P(x)\:$$ with integer coefficients has no integer roots when its constant coefficient $$\,\rm P(0)\,$$ and coefficient sum $$\,\rm P(1)\,$$ are both odd. Proof $$\$$ The test verifies that $$\rm\ P(0) \equiv P(1)\equiv 1\ \ (mod\ 2),\$$ i.e. that $$\rm\:P(x)\:$$ has no roots mod $$2$$, hence, as argued above, it has no integer roots. $$\quad$$ QED So $$\rm\, a x^2\! + b x\! + c\,$$ has no integer roots if $$\rm\,c\,$$ is odd and $$\rm\,a,b\,$$ have equal parity $$\rm\,a\equiv b\pmod 2$$ Compare the conciseness of this test to the messy reformulation that would result if we had to restrict it to positive integers. Then we could no longer represent polynomial equations in the normal form $$\rm\:f(x) = 0\:$$ but, rather, we would need to consider general equalities $$\rm\:f(x) = g(x)\:$$ where both polynomials have positive coefficients. Now the test would be much messier - bifurcating into motley cases. Indeed, historically, before the acceptance of negative integers and zero, the formula for the solution of a quadratic equation was stated in such an analogous obfuscated way - involving many cases. But by extending the naturals to the ring of integers we are able to unify what were previously motley separate cases into a single universal method of solving a general quadratic equation.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471661250913, "lm_q1q2_score": 0.8599583978824332, "lm_q2_score": 0.8740772220439509, "openwebmath_perplexity": 445.39808590467646, "openwebmath_score": 0.7878735065460205, "tags": null, "url": "https://math.stackexchange.com/questions/15556/is-zero-odd-or-even/15680" }
Analogous examples exist throughout history that help serve to motivate the reasons behind various number system enlargements. Studying mathematical history will help provide one with a much better appreciation of the motivations behind the successive enlargements of the notion of "number systems", e.g. see Kleiner: From numbers to rings: the early history of ring theory. Above is but one of many examples where "completing" a structure in some manner serves to simplify its theory. Such ideas motivated many of the extensions of the classical number systems (as well as analogous geometrical and topological completions concept, e.g. adjoining points at $$\infty$$, projective closure, compactification, model completion, etc). For some interesting expositions on such methods see the references here. Note $$\:$$ Analogous remarks (on the power gained by normalizing equations to the form $$\ldots = 0\:$$) hold true more generally for any algebraic structure whose congruences are determined by ideals - so-called ideal determined varieties, e.g. see my post here and see Gumm and Ursini: Ideals in universal algebras. Without zero and negative numbers (additive inverses) we would not be able to rewrite expressions into such concise normal forms and we would not have available such powerful algorithms such as the Grobner basis algorithm, Hermite/Smith normal forms, etc. This problem arose e.g. during the Beijing even-odd car ban for the 2008 Olympics, where cars with odd numbered licence plates were banned one day, then even the next day. The choice is between: • 0 is even and not odd, • 0 is odd and not even, • 0 is both even and odd, • 0 is neither even nor odd (like infinity or $\pi$) or • 0 is assigned a unique title (like how 1 called a "unit" -- neither prime nor composite).
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471661250913, "lm_q1q2_score": 0.8599583978824332, "lm_q2_score": 0.8740772220439509, "openwebmath_perplexity": 445.39808590467646, "openwebmath_score": 0.7878735065460205, "tags": null, "url": "https://math.stackexchange.com/questions/15556/is-zero-odd-or-even/15680" }
This is a matter of definition, so while you could define 0 to be any of the above, it's best to choose the definition that will be the most consistent with the usage of "even" and "odd" for numbers other than 0. Let $W=\{2,4,6,\ldots\}$, $V=\{1,3,5,\ldots,\}$ and lets look at the properties of even and odd numbers on these sets that we are familiar with. • A number is either even or odd, and not both. • If $w,x \in W$ then $w+x \in W$ (even + even = even). • If $w \in W$ and $v \in V$ then $w+v \in V$ (even + odd = odd). • If $y,v \in V$ then $y+v \in W$ (odd + odd = even). [and probably many others I've forgotten to write here] So it would be desirable that whichever definition we choose for 0, it preserves the above properties. Now lets say we let 0 be odd (the second and third cases listed above). Then our definition is not consistent with these properties. So, if we choose to define 0 as odd, we should have some substantial benefits to outweigh the losses. On the other hand, defining 0 to be even and not odd is consistent with the above properties. The last two candidate definitions are essentially saying there is no consistent way of defining even or oddness to 0. But in this case, there is -- 0 is even and not odd. [Note: We also have the property that elements of W are all divisible by 2, but whether or not 0 is divisible by 2 is another matter of definition, for which we should again apply the "which is the most sensible definition" concept.] • Where I live, there is also a rule where vehicles whose plate numbers end in an odd number are only allowed on certain days, and similarly for even numbers. When this rule was first implemented, it was to everyone's consternation that neither the enforcers nor the motorists (okay, most of them, not all of them) knew about the parity of zero. A subsequent survey confirmed this. – J. M. isn't a mathematician May 30 '13 at 16:48
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471661250913, "lm_q1q2_score": 0.8599583978824332, "lm_q2_score": 0.8740772220439509, "openwebmath_perplexity": 445.39808590467646, "openwebmath_score": 0.7878735065460205, "tags": null, "url": "https://math.stackexchange.com/questions/15556/is-zero-odd-or-even/15680" }
The real answer depends on the definition, because there is math-history tag invoked there was a time that $1$ was not considered an odd numbers, $0$ and negative numbers for sure where not considered even or odd. Historically the concept was defined only for natural numbers. These days the set of all integers multiplied by $2$ is considered the set of even numbers, i.e. $\dots,-4,-2,0,2,4,\dots$ and all the integers not in that set are defined to be odd. There is no real answer, it all depends on the definition, same way that the book is only dealing with natural numbers and not integers. The concept was extended from naturals to integers, but there are uncountably many ways to define the even and odds beyond the natural numbers. Just make sure others know what definition you are using to label something even or odd.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471661250913, "lm_q1q2_score": 0.8599583978824332, "lm_q2_score": 0.8740772220439509, "openwebmath_perplexity": 445.39808590467646, "openwebmath_score": 0.7878735065460205, "tags": null, "url": "https://math.stackexchange.com/questions/15556/is-zero-odd-or-even/15680" }
• Dear Arjang, I'm curious --- do you have a reference for this? Regards, – Matt E Dec 27 '10 at 21:51 • @Matt E : The part about 1 not being even nor odd is in the history section of en.wikipedia.org/wiki/Parity_(mathematics) . The part about even and oddness being defined only for natuarl numbers was in math history books. I do not have access to math history books but I found this link with some additional info : mathforum.org/library/drmath/view/65413.html The part about moders definition of even and odd : It was the simplest way that I think I had seen in a math book (I don't remember the book). If there are any parts that needs refrence let or doesnt seem correct let me know. – jimjim Dec 27 '10 at 22:14 • Dear Arjang, Thanks very much! I certainly agree with your description of the modern definition, but I wasn't aware of the changing nature of even and oddness through history (or if I ever did know it, I had forgotten it). Thanks for the interesting answer. Best wishes, – Matt E Dec 27 '10 at 22:20 • @Matt E: If you get a chance try to read the books History Of Mathematics By Stilwell, Analysis By it's history, and the feuds between mathematicians on Continuity, Heat Equation , Set theory. Specially Euler vs d'alembert is enlightening. To see the ideas progress from just an idea to complete theories we have today is better than listening to Bach! – jimjim Dec 27 '10 at 22:31 • @MattE The Treviso Arithmetic of 1478 says “Number is a multitude brought together or assembled from several units, as in the case of 2, which is the first and the smallest number.” (Translation found in David Eugene Smith A Source Book in Mathematics (Dover 1959), p. 2.) – MJD Jan 21 '15 at 16:39 YES! zero is an even number. Here is the Dr. Math's explanation. This seems to be a matter of confusion for many others around this planet,you may always like to ask google for your confusion.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471661250913, "lm_q1q2_score": 0.8599583978824332, "lm_q2_score": 0.8740772220439509, "openwebmath_perplexity": 445.39808590467646, "openwebmath_score": 0.7878735065460205, "tags": null, "url": "https://math.stackexchange.com/questions/15556/is-zero-odd-or-even/15680" }
Which numbers are you using? Positive integer? In this case, you don't have to consider zero (that's why, perhaps, some books says that even numbers start from 2). If 0 is in your number set, then yes, it is divisible by 2. $0$ is even. The difference of two distinct even numbers is also even, for example: $32 - 20 = 12$, $20 - 12 = 8$, $12 - 8 = 4$, etc. Also, the sum of two distinct even numbers is again even: $-12 + 32 = 20$, $32 + 20 = 52$, etc. But with, say, $32 - 32 = 0$, why would this difference suddenly become odd? The answer is simple, it doesn't, it's still even. I think zero is an even number because it's in between $1$ and $-1$. If they are odd numbers then the number in between must be even. Which means zero is an even number. Is Zero Even? - Numberphile PS : This is completely opposite to my previous post (and view) but it has many good points and we are here to learn and not to push one's own view of things. As the history of mathematics shows, zero is a very odd number whose general acceptance is surprisingly recent. However, it is not odd. Perhaps the ambiguity of "odd" causes all the confusion. Zero is even. An even integer is a number of the form $2n$ where $n$ is also an integer. A number is odd, in the mathematical sense, if it is of the form $2n + 1$ with $n$ an integer. If zero was odd, we could solve the equation $2x + 1 = 0$ in integers. But the only possible solution is $x = -\frac{1}{2}$, which is a rational number but not an integer. The set of integers is sometimes said to be "doubly infinite," stretching out to positive infinity in one direction and to negative infinity in the other. If you wanted to, you could say the even numbers start at $-2$ and continue with $-4$, then $-6$, then $-8$, etc. The AP sequence $$(-6,-4,-2,0,2,4,6)$$ shows that it is even. If $$k$$ is an even integer, then $$(-1)^ k = 1$$ Division of $$0$$ by $$2$$ leaves no remainder. &c. are further confirmations.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471661250913, "lm_q1q2_score": 0.8599583978824332, "lm_q2_score": 0.8740772220439509, "openwebmath_perplexity": 445.39808590467646, "openwebmath_score": 0.7878735065460205, "tags": null, "url": "https://math.stackexchange.com/questions/15556/is-zero-odd-or-even/15680" }
# Probability of three sequential events A smuggler wants to transfer his smuggled goods from city A to city B. There are three police check posts between these two cities. Assume that there is no communication among the check posts. The probabilities of him being caught at these three stops are $$0.7, 0.5$$ and $$0.3$$ respectively. What is the probability that he successfully transfers his goods? • A] $$0.105$$ • B] $$0.5$$ • C] $$0.245$$ • D] $$0.045$$ Is it as simple as calculating success in all three scenarios: $$0.3 * 0.5 * 0.7 = 0.105$$. Is A correct answer ? • Definitely looks correct to me – gt6989b Nov 25 '18 at 16:41 • Yes, the probability of not being stopped by the three posts equals the probability of not being stopped by any post which is $(1-0.3)(1-0.5)(1-0.7)=0.105$ because they are independent. – BlackMath Nov 25 '18 at 18:17 • It doesn't help this problem that the probability of success at the first post is the probability of failure at the third post, and vice versa. I would argue that makes this a poor problem. But no one here can do anything about that, OP included. – Teepeemm Nov 25 '18 at 19:37 Let $$A_i$$ be an event $$i$$-th police stop him. We are interested in $$P(A_1'\cap A_2'\cap A_3')= P(A_1')P (A_2')P(A_3')= 0.3 \cdot 0.5 \cdot 0.7 = 0.105$$ (since $$A_1, A_2, A_3$$ are independant so are $$A_1', A_2', A_3'$$ ) so your answer is correct. You can think this in two ways. first way Not being caught on first check post and not being caught on second check post and not being caught on third post. i.e. $$(1-P(A1))×(1-P(A2))×(1-P(A3) = 0.3×0.5×0.7 = 0.105$$ second way Find P(being caught) Caught on first check post Or Not being caught on first post and caught on second post Or Not being caught on first post and Not being caught on second post and caught on third post. $$P(A1) + (1-P(A1))(P(A2)) + (1- P(A1))(1- P(A2))(P(A3) =0.7 + 0.3×0.5 + 0.3×0.5×0.3 =0.895$$ Now, P(not being caught) = 1- P(being caught) = 1- 0.895 =0.105
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9939024368140507, "lm_q1q2_score": 0.8599483240635246, "lm_q2_score": 0.8652240825770432, "openwebmath_perplexity": 837.4983840772386, "openwebmath_score": 0.39666011929512024, "tags": null, "url": "https://math.stackexchange.com/questions/3013058/probability-of-three-sequential-events" }
# Prove all derivatives of $f(x)=\frac{1}{1+x}$ by induction ## Problem Prove all derivatives of: $$f(x)=\frac{1}{1+x}$$ by induction. ## Attempt to solve I compute few derivatives of $$f(x)$$ so that i can form general expression for induction hypothesis. I compute all derivatives utilizing formula: $$\frac{d}{dx}x^n=nx^{n-1}$$ First 4 derivatives are: $$f'(x)=(-1)\cdot(1+x)^{-2}\cdot 1 = -\frac{1}{(1+x)^2}$$ $$f''(x)=(-1)(-2)(1+x)^{-3}\cdot 1 = \frac{2}{(1+x)^3}$$ $$f'''(x)=(-1)(-2)(-3)(1+x)^{-4}\cdot 1 = -\frac{6}{(1+x)^4}$$ $$f''''(x)=(-1)(-2)(-3)(-4)(1+x)^{-5} \cdot 1 = \frac{24}{(1+x)^5}$$ Observe that $$(-1)(-2)(-3)(-4)\dots (-n)$$ can be generalized with: $$(-1)(-2)(-3)(-4)\dots(-n) = (-1)^n\cdot n!$$ Expression follows factorial of $$n$$ except every other value is positive and every other is negative. If i multiply it by $$(-1)^n$$ it is positive when $$n \mod 2 = 0$$ and negative when $$n \mod 2 \neq 0$$. Rest of the expression can be generalized as: $$(1+x)^{-n-1} = (1+x)^{-(n+1)}=\frac{1}{(1+x)^{n+1}}$$ Combining these gives formula in analytic form: $$f(n)= \frac{(-1)^n \cdot n!}{(1+x)^{n+1}}$$ I can form induction hypothesis such that: $$\frac{d^n}{dx^n}\frac{1}{1+x} = \frac{(-1)^n\cdot n!}{(1+x)^{n+1}}$$ ### Induction proof Base case Base case when $$n=0$$: $$\frac{d^0}{dx^0}\frac{1}{1+x}=\frac{1}{1+x}=\frac{(-1)^0\cdot 0!}{(1+x)^{0+1}}$$ Induction step $$\frac{d^n}{dx^n}\frac{1}{1+x} =_{\text{ind.hyp}} \frac{(-1)^n\cdot n!}{(1+x)^{n+1+1}}$$ $$\frac{d^n}{dx^n}\frac{1}{1+x} = \frac{(-1)^n\cdot n!}{(1+x)^{n+2}}$$ Now the problem is that formula i used for derivation can only be used recursively. I believe this is correct notation for $$n$$:th derivative but computing one is only defined recursively with formula i used: $$\frac{d}{dx} x^n = nx^{n-1}$$ Which is not defined for case: $$\frac{d^n}{dx^n}x^n = \text{ undefined}$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587265099557, "lm_q1q2_score": 0.8599400607533498, "lm_q2_score": 0.8705972801594707, "openwebmath_perplexity": 559.2844737131455, "openwebmath_score": 0.9954684972763062, "tags": null, "url": "https://math.stackexchange.com/questions/2942357/prove-all-derivatives-of-fx-frac11x-by-induction" }
Which is not defined for case: $$\frac{d^n}{dx^n}x^n = \text{ undefined}$$ The idea is to show that this recursion can be expressed in analytical form and it is valid for all $$n\in \mathbb{Z}+$$ by induction. Problem is i don't know how do you express this in recursive form and how do you get from recursion formula to the analytical one. • All of your work seems fine. I'm not sure why the formula for iterated derivatives of $x^n$ is causing you anxiety, as you're only using it for negative values of $n$ (thus you'll never be in a position of needing the value of $\frac{d^n}{dx^n} x^n$). – Connor Harris Oct 4 '18 at 16:40 • I am not sure why you say that $\frac{d^n}{dx^n}x^n$ is undefined. Simply applying it to a couple of values from $\mathbb{Z}^+$ leads to the intuitive expression $\frac{d^n}{dx^n}x^n=n!$ – mrtaurho Oct 4 '18 at 16:40 $$\frac{d^n}{dx^n}\frac1{1+x}=\frac{(-1)^nn!}{(1+x)^{n+1}}$$ We want to show that $$\frac{d^{n+1}}{dx^{n+1}}\frac1{1+x}=\frac{(-1)^{n+1}(n+1)!}{(1+x)^{n+2}}$$ Let's verify: \begin{align} \frac{d^{n+1}}{dx^{n+1}}\frac1{1+x} &=\frac{d}{dx}\left(\frac{d^n}{dx^n}\frac1{1+x} \right)\\ &=\frac{d}{dx}\left(\frac{(-1)^nn!}{(1+x)^{n+1}} \right) \\ &=(-1)^n(n!) \frac{d}{dx}(1+x)^{-(n+1)} \\ &= (-1)^n(n!) (-(n+1)) (1+x)^{-(n+2)}\\ &=\frac{(-1)^{n+1}(n+1)!}{(1+x)^{n+2}} \end{align} $$\frac{\mathrm d^n}{\mathrm dx^n}\frac{1}{1+x} = \frac{(-1)^n n!}{(1+x)^{n+1}}$$ $$\frac{\mathrm d^{n+1}}{\mathrm dx^{n+1}}f(x)= \frac{\mathrm d}{\mathrm dx}\left( \frac{\mathrm d^n}{\mathrm dx^n}f(x)\right) \quad \forall n \ge 0$$ You inductive hypothesis is that $$\frac{d^nf}{dx^n}=\frac{(-1)^nn!}{(1+x)^{n+1}}.$$ Your inductive step would then be $$\frac{d^{n+1}f}{dx^{n+1}}=\frac d{dx}\,\frac{d^nf}{dx^n}=\frac d{dx}\left(\frac{(-1)^nn!}{(1+x)^{n+1}}\right) =\frac{-(n+1)(-1)^nn!}{(1+x)^{n+2}}=\frac{(-1)^{n+1}(n+1)!}{(1+x)^{n+2}},$$ which shows that the formula holds.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587265099557, "lm_q1q2_score": 0.8599400607533498, "lm_q2_score": 0.8705972801594707, "openwebmath_perplexity": 559.2844737131455, "openwebmath_score": 0.9954684972763062, "tags": null, "url": "https://math.stackexchange.com/questions/2942357/prove-all-derivatives-of-fx-frac11x-by-induction" }
# 5.6. Numerical integration¶ In calculus you learn that the elegant way to evaluate a definite integral is to apply the Fundamental Theorem of Calculus and find an antiderivative. The connection is so profound and pervasive that it’s easy to overlook that a definite integral is a numerical quantity existing independently of antidifferentiation. However, most conceivable integrands have no antiderivative in terms of familiar functions. Demo 5.6.1 The antiderivative of $$e^x$$ is, of course, itself. That makes evaluation of $$\int_0^1 e^x\,dx$$ by the Fundamental Theorem trivial. exact = exp(1)-1 1.718281828459045 The Julia package QuadGK has an all-purpose numerical integrator that estimates the value without finding the antiderivative first. As you can see here, it’s often just as accurate. Q,errest = quadgk(x->exp(x),0,1) @show Q; Q = 1.718281828459045 The numerical approach is also far more robust. For example, $$e^{\,\sin x}$$ has no useful antiderivative. But numerically, it’s no more difficult. Q,errest = quadgk(x->exp(sin(x)),0,1) @show Q; Q = 1.6318696084180515 When you look at the graphs of these functions, what’s remarkable is that one of these areas is basic calculus while the other is almost impenetrable analytically. From a numerical standpoint, they are practically the same problem. plot([exp,x->exp(sin(x))],0,1,fill=0,layout=(2,1), xlabel=L"x",ylabel=[L"e^x" L"e^{\sin(x)}"],ylim=[0,2.7]) Numerical integration, which also goes by the older name quadrature, is performed by combining values of the integrand sampled at nodes. In this section we will assume equally spaced nodes using the definitions (5.6.1)$t_i = a +i h, \quad h=\frac{b-a}{n}, \qquad i=0,\ldots,n.$ Definition 5.6.2 :  Numerical integration formula A numerical integration formula is a list of weights $$w_0,\ldots,w_n$$ chosen so that for all $$f$$ in some class of functions,
{ "domain": "tobydriscoll.net", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587234469587, "lm_q1q2_score": 0.8599400531121726, "lm_q2_score": 0.8705972751232809, "openwebmath_perplexity": 997.3050622322135, "openwebmath_score": 0.8504312634468079, "tags": null, "url": "https://tobydriscoll.net/fnc-julia/localapprox/integration.html" }
(5.6.2)$\begin{split} \int_a^b f(x)\, dx \approx h \sum_{i=0}^n w_if(t_i) = h \bigl[ w_0f(t_0)+w_1f(t_1)+\cdots w_nf(t_n) \bigr], \end{split}$ with the $$t_i$$ defined in (5.6.1). The weights are independent of $$f$$ and $$h$$. Numerical integration formulas can be applied to sequences of data values even if no function is explicitly known to generate them. For our presentation and implementations, however, we assume that $$f$$ is known and can be evaluated anywhere. A straightforward way to derive integration formulas is to mimic the approach taken for finite differences: find an interpolant and operate exactly on it. ## Trapezoid formula¶ One of the most important integration formulas results from integration of the piecewise linear interpolant (see Section 5.2). Using the cardinal basis form of the interpolant in (5.2.3), we have $\int_a^b f(x) \, dx \approx \int_a^b \sum_{i=0}^n f(t_i) H_i(x)\, dx = \sum_{i=0}^n f(t_i) \left[ \int_a^b H_i(x)\right]\, dx.$ Thus we can identify the weights as $$w_i = h^{-1} \int_a^b H_i(x)\, dx$$. Using areas of triangles, it’s trivial to derive that (5.6.3)$\begin{split}w_i = \begin{cases} 1, & i=1,\ldots,n-1,\\ \frac{1}{2}, & i=0,n. \end{cases}\end{split}$ Putting everything together, the resulting formula is (5.6.4)$\begin{split} \int_a^b f(x)\, dx \approx T_f(n) &= h\left[ \frac{1}{2}f(t_0) + f(t_1) + f(t_2) + \cdots + f(t_{n-1}) + \frac{1}{2}f(t_n) \right]. \end{split}$ Definition 5.6.3 :  Trapezoid formula The trapezoid formula is a numerical integration formula in the form (5.6.2), with $\begin{split} w_i = \begin{cases} \frac{1}{2},& i=0 \text{ or } i=n, \\ 1, & 0 < i < n. \end{cases} \end{split}$ Geometrically, as illustrated in Fig. 5.6.1, the trapezoid formula sums of the areas of trapezoids approximating the region under the curve $$y=f(x)$$.1 The trapezoid formula is the Swiss Army knife of integration formulas. A short implementation is given as Function 5.6.4.
{ "domain": "tobydriscoll.net", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587234469587, "lm_q1q2_score": 0.8599400531121726, "lm_q2_score": 0.8705972751232809, "openwebmath_perplexity": 997.3050622322135, "openwebmath_score": 0.8504312634468079, "tags": null, "url": "https://tobydriscoll.net/fnc-julia/localapprox/integration.html" }
Fig. 5.6.1 Trapezoid formula for integration. The piecewise linear interpolant defines trapezoids that approximate the region under the curve. Function 5.6.4 :  trapezoid Trapezoid formula for numerical integration 1""" 2 trapezoid(f,a,b,n) 3 4Apply the trapezoid integration formula for integrand f over 5interval [a,b], broken up into n equal pieces. Returns 6the estimate, a vector of nodes, and a vector of integrand values at the 7nodes. 8""" 9function trapezoid(f,a,b,n) 10 h = (b-a)/n 11 t = range(a,b,length=n+1) 12 y = f.(t) 13 T = h * ( sum(y[2:n]) + 0.5*(y[1] + y[n+1]) ) 14 return T,t,y 15end Like finite-difference formulas, numerical integration formulas have a truncation error. Definition 5.6.5 :  Truncation error of a numerical integration formula For the numerical integration formula (5.6.2), the truncation error is (5.6.5)$\tau_f(h) = \int_a^b f(x) \, dx - h \sum_{i=0}^{n} w_i f(t_i).$ The order of accuracy is as defined in Definition 5.5.3. In Theorem 5.2.7 we stated that the pointwise error in a piecewise linear interpolant with equal node spacing $$h$$ is bounded by $$O(h^2)$$ as $$h\rightarrow 0$$. Using $$I$$ to stand for the exact integral of $$f$$ and $$p$$ to stand for the piecewise linear interpolant, we obtain $\begin{split}\begin{split} I - T_f(n) = I - \int_a^b p(x)\, dx &= \int_a^b \bigl[f(x)-p(x)\bigr] \, dx \\ &\le (b-a) \max_{x\in[a,b]} |f(x)-p(x)| = O(h^2). \end{split}\end{split}$ A more thorough statement of the truncation error is known as the Euler–Maclaurin formula, (5.6.6)$\begin{split}\int_a^b f(x)\, dx &= T_f(n) - \frac{h^2}{12} \left[ f'(b)-f'(a) \right] + \frac{h^4}{740} \left[ f'''(b)-f'''(a) \right] + O(h^6) \\ &= T_f(n) - \sum_{k=1}^\infty \frac{B_{2k}h^{2k}}{(2k)!} \left[ f^{(2k-1)}(b)-f^{(2k-1)}(a) \right],\end{split}$
{ "domain": "tobydriscoll.net", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587234469587, "lm_q1q2_score": 0.8599400531121726, "lm_q2_score": 0.8705972751232809, "openwebmath_perplexity": 997.3050622322135, "openwebmath_score": 0.8504312634468079, "tags": null, "url": "https://tobydriscoll.net/fnc-julia/localapprox/integration.html" }
where the $$B_{2k}$$ are constants known as Bernoulli numbers. Unless we happen to be fortunate enough to have a function with $$f'(b)=f'(a)$$, we should expect truncation error at second order and no better. Observation 5.6.6 The trapezoid integration formula is second-order accurate. Demo 5.6.7 We will approximate the integral of the function $$f(x)=e^{\sin 7x}$$ over the interval $$[0,2]$$. f = x -> exp(sin(7*x)); a = 0; b = 2; In lieu of the exact value, we use the QuadGK package to find an accurate result. If a function has multiple return values, you can use an underscore _ to indicate a return value you want to ignore. Q,_ = quadgk(f,a,b,atol=1e-14,rtol=1e-14); println("Integral = \$Q") Integral = 2.6632197827615394 Here is the trapezoid result at $$n=40$$, and its error. T,t,y = FNC.trapezoid(f,a,b,40) @show (T,Q-T); (T, Q - T) = (2.662302935602287, 0.0009168471592522209) In order to check the order of accuracy, we increase $$n$$ by orders of magnitude and observe how the error decreases. n = [ 10^n for n in 1:5 ] err = [] for n in n T,t,y = FNC.trapezoid(f,a,b,n) push!(err,Q-T) end pretty_table([n err],["n","error"]) ┌────────┬─────────────┐ │ n │ error │ ├────────┼─────────────┤ │ 10 │ 0.0120254 │ │ 100 │ 0.000147305 │ │ 1000 │ 1.47415e-6 │ │ 10000 │ 1.47416e-8 │ │ 100000 │ 1.47417e-10 │ └────────┴─────────────┘ Each increase by a factor of 10 in $$n$$ cuts the error by a factor of about 100, which is consistent with second-order convergence. Another check is that a log-log graph should give a line of slope $$-2$$ as $$n\to\infty$$. plot(n,abs.(err),m=:o,label="results", xaxis=(:log10,L"n"),yaxis=(:log10,"error"), title="Convergence of trapezoidal integration") # Add line for perfect 2nd order. plot!(n,3e-3*(n/n[1]).^(-2),l=:dash,label=L"O(n^{-2})") ## Extrapolation¶
{ "domain": "tobydriscoll.net", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587234469587, "lm_q1q2_score": 0.8599400531121726, "lm_q2_score": 0.8705972751232809, "openwebmath_perplexity": 997.3050622322135, "openwebmath_score": 0.8504312634468079, "tags": null, "url": "https://tobydriscoll.net/fnc-julia/localapprox/integration.html" }
## Extrapolation¶ If evaluations of $$f$$ are computationally expensive, we want to get as much accuracy as possible from them by using a higher-order formula. There are many routes for doing so; for example, we could integrate a not-a-knot cubic spline interpolant. However, splines are difficult to compute by hand, and as a result different methods were developed before computers came on the scene. Knowing the structure of the error allows the use of extrapolation to improve accuracy. Suppose a quantity $$A_0$$ is approximated by an algorithm $$A(h)$$ with an error expansion (5.6.7)$A_0 = A(h) + c_1 h + c_2 h^2 + c_3 h^3 + \cdots.$ Crucially, it is not necessary to know the values of the error constants $$c_k$$, merely that they exist and are independent of $$h$$. Using $$I$$ for the exact integral of $$f$$, the trapezoid formula has $I = T_f(n) + c_2 h^2 + c_4 h^{4} + \cdots,$ as proved by the Euler–Maclaurin formula (5.6.6). The error constants depend on $$f$$ and can’t be evaluated in general, but we know that this expansion holds. For convenience we recast the error expansion in terms of $$n=O(h^{-1})$$: (5.6.8)$I = T_f(n) + c_2 n^{-2} + c_4 n^{-4} + \cdots.$ We now make the simple observation that (5.6.9)$I = T_f(2n) + \tfrac{1}{4} c_2 n^{-2} + \tfrac{1}{16} c_4 n^{-4} + \cdots.$ It follows that if we combine (5.6.8) and (5.6.9) correctly, we can cancel out the second-order term in the error. Specifically, define (5.6.10)$S_f(2n) = \frac{1}{3} \Bigl[ 4 T_f(2n) - T_f(n) \Bigr].$ (We associate $$2n$$ rather than $$n$$ with the extrapolated result because of the total number of nodes needed.) Then (5.6.11)$I = S_f(2n) + O(n^{-4}) = b_4 n^{-4} + b_6 n^{-6} + \cdots.$ The formula (5.6.10) is called Simpson’s formula, or Simpson’s rule. A different presentation and derivation are considered in Exercise 4.
{ "domain": "tobydriscoll.net", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587234469587, "lm_q1q2_score": 0.8599400531121726, "lm_q2_score": 0.8705972751232809, "openwebmath_perplexity": 997.3050622322135, "openwebmath_score": 0.8504312634468079, "tags": null, "url": "https://tobydriscoll.net/fnc-julia/localapprox/integration.html" }
Equation (5.6.11) is another particular error expansion in the form (5.6.7), so we can extrapolate again! The details change only a little. Considering that $I = S_f(4n) = \tfrac{1}{16} b_4 n^{-4} + \tfrac{1}{64} b_6 n^{-6} + \cdots,$ the proper combination this time is (5.6.12)$R_f(4n) = \frac{1}{15} \Bigl[ 16 S_f(4n) - S_f(2n) \Bigr],$ which is sixth-order accurate. Clearly the process can be repeated to get eighth-order accuracy and beyond. Doing so goes by the name of Romberg integration, which we will not present in full generality. ## Node doubling¶ Note in (5.6.12) that $$R_f(4n)$$ depends on $$S_f(2n)$$ and $$S_f(4n)$$, which in turn depend on $$T_f(n)$$, $$T_f(2n)$$, and $$T_f(4n)$$. There is a useful benefit realized by doubling of the nodes in each application of the trapezoid formula. As shown in Fig. 5.6.2, when doubling $$n$$, only about half of the nodes are new ones, and previously computed function values at the other nodes can be reused. Fig. 5.6.2 Dividing the node spacing by half introduces new nodes only at midpoints, allowing the function values at existing nodes to be reused for extrapolation. Specifically, we have (5.6.13)$\begin{split}\begin{split} T_f(2m) & = \frac{1}{2m} \left[ \frac{1}{2} f(a) + \frac{1}{2} f(b) + \sum_{i=1}^{2m-1} f\Bigl( a + \frac{i}{2m} \Bigr) \right]\\[1mm] & = \frac{1}{2m} \left[ \frac{1}{2} f(a) + \frac{1}{2} f(b)\right] + \frac{1}{2m} \sum_{k=1}^{m-1} f\Bigl( a+\frac{2k}{2m} \Bigr) + \frac{1}{2m} \sum_{k=1}^{m} f\Bigl( a+\frac{2k-1}{2m} \Bigr) \\[1mm] &= \frac{1}{2m} \left[ \frac{1}{2} f(a) + \frac{1}{2} f(b) + \sum_{k=1}^{m-1} f\Bigl( a+\frac{k}{m} \Bigr) \right] + \frac{1}{2m} \sum_{k=1}^{m} f\Bigl( a+\frac{2k-1}{2m} \Bigr) \\[1mm] &= \frac{1}{2} T_f(m) + \frac{1}{2m} \sum_{k=1}^{m-1} f\left(t_{2k-1} \right), \end{split}\end{split}$
{ "domain": "tobydriscoll.net", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587234469587, "lm_q1q2_score": 0.8599400531121726, "lm_q2_score": 0.8705972751232809, "openwebmath_perplexity": 997.3050622322135, "openwebmath_score": 0.8504312634468079, "tags": null, "url": "https://tobydriscoll.net/fnc-julia/localapprox/integration.html" }
where the nodes referenced in the last line are relative to $$n=2m$$. Hence in passing from $$n=m$$ to $$n=2m$$, new integrand evaluations are needed only at the odd-numbered nodes of the finer grid. Demo 5.6.8 We estimate $$\displaystyle\int_0^2 x^2 e^{-2x}\, dx$$ using extrapolation. First we use quadgk to get an accurate value. f = x -> x^2*exp(-2*x); a = 0; b = 2; @show Q; Q = 0.1904741736116139 We start with the trapezoid formula on $$n=N$$ nodes. N = 20; # the coarsest formula n = N; h = (b-a)/n; t = h*(0:n); y = f.(t); We can now apply weights to get the estimate $$T_f(N)$$. T = [ h*(sum(y[2:n]) + y[1]/2 + y[n+1]/2) ] 1-element Vector{Float64}: 0.19041144993926787 Now we double to $$n=2N$$, but we only need to evaluate $$f$$ at every other interior node and apply (5.6.13). n = 2n; h = h/2; t = h*(0:n); T = [ T; T[end]/2 + h*sum( f.(t[2:2:n]) ) ] 2-element Vector{Float64}: 0.19041144993926787 0.19045880585951175 We can repeat the same code to double $$n$$ again. n = 2n; h = h/2; t = h*(0:n); T = [ T; T[end]/2 + h*sum( f.(t[2:2:n]) ) ] 3-element Vector{Float64}: 0.19041144993926787 0.19045880585951175 0.1904703513046443 Let us now do the first level of extrapolation to get results from Simpson’s formula. We combine the elements T[i] and T[i+1] the same way for $$i=1$$ and $$i=2$$. S = [ (4T[i+1]-T[i])/3 for i in 1:2 ] 2-element Vector{Float64}: 0.19047459116625973 0.19047419978635513 With the two Simpson values $$S_f(N)$$ and $$S_f(2N)$$ in hand, we can do one more level of extrapolation to get a sixth-order accurate result. R = (16S[2] - S[1]) / 15 0.1904741736943615 We can make a triangular table of the errors: The value nothing equals nothing except nothing. err = [ T.-Q [nothing;S.-Q] [nothing;nothing;R-Q] ] pretty_table(err,["order 2","order 4","order 6"])
{ "domain": "tobydriscoll.net", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587234469587, "lm_q1q2_score": 0.8599400531121726, "lm_q2_score": 0.8705972751232809, "openwebmath_perplexity": 997.3050622322135, "openwebmath_score": 0.8504312634468079, "tags": null, "url": "https://tobydriscoll.net/fnc-julia/localapprox/integration.html" }
┌─────────────┬────────────┬─────────────┐ │ order 2 │ order 4 │ order 6 │ ├─────────────┼────────────┼─────────────┤ │ -6.27237e-5 │ nothing │ nothing │ │ -1.53678e-5 │ 4.17555e-7 │ nothing │ │ -3.82231e-6 │ 2.61747e-8 │ 8.27476e-11 │ └─────────────┴────────────┴─────────────┘ If we consider the computational time to be dominated by evaluations of $$f$$, then we have obtained a result with about twice as many accurate digits as the best trapezoid result, at virtually no extra cost. ## Exercises¶ 1. ⌨ For each integral below, use Function 5.6.4 to estimate the integral for $$n=10\cdot 2^k$$ nodes for $$k=1,2,\ldots,10$$. Make a log-log plot of the errors and confirm or refute second-order accuracy. (These integrals were taken from [BJL05].) (a) $$\displaystyle \int_0^1 x\log(1+x)\, dx = \frac{1}{4}$$ (b) $$\displaystyle \int_0^1 x^2 \tan^{-1}x\, dx = \frac{\pi-2+2\log 2}{12}$$ (c) $$\displaystyle \int_0^{\pi/2}e^x \cos x\, dx = \frac{e^{\pi/2}-1}{2}$$ (d) $$\displaystyle \int_0^1 \sqrt{x} \log(x) \, dx = -\frac{4}{9}$$ (Note: Although the integrand has the limiting value zero as $$x\to 0$$, it cannot be evaluated naively at $$x=0$$. You can start the integral at $$x=\macheps$$ instead.) (e) $$\displaystyle \int_0^1 \sqrt{1-x^2}\,\, dx = \frac{\pi}{4}$$ 2. ✍ The Euler–Maclaurin error expansion (5.6.6) for the trapezoid formula implies that if we could cancel out the term due to $$f'(b)-f'(a)$$, we would obtain fourth-order accuracy. We should not assume that $$f'$$ is available, but approximating it with finite differences can achieve the same goal. Suppose the forward difference formula (5.4.8) is used for $$f'(a)$$, and its reflected backward difference is used for $$f'(b)$$. Show that the resulting modified trapezoid formula is (5.6.14)$G_f(h) = T_f(h) - \frac{h}{24} \left[ 3\Bigl( f(t_n)+f(t_0) \Bigr) -4\Bigr( f(t_{n-1}) + f(t_1) \Bigr) + \Bigl( f(t_{n-2})+f(t_2) \Bigr) \right],$ which is known as a Gregory integration formula.
{ "domain": "tobydriscoll.net", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587234469587, "lm_q1q2_score": 0.8599400531121726, "lm_q2_score": 0.8705972751232809, "openwebmath_perplexity": 997.3050622322135, "openwebmath_score": 0.8504312634468079, "tags": null, "url": "https://tobydriscoll.net/fnc-julia/localapprox/integration.html" }
which is known as a Gregory integration formula. 3. ⌨ Repeat each integral in Exercise 1 above using Gregory integration (5.6.14) instead of the trapezoid formula. Compare the observed errors to fourth-order convergence. 4. ✍ Simpson’s formula can be derived without appealing to extrapolation. (a) Show that $p(x) = \beta + \frac{\gamma-\alpha}{2h}\, x + \frac{\alpha-2\beta+\gamma}{2h^2}\, x^2$ interpolates the three points $$(-h,\alpha)$$, $$(0,\beta)$$, and $$(h,\gamma)$$. (b) Find $\int_{-h}^h p(s)\, ds,$ where $$p$$ is the quadratic polynomial from part (a), in terms of $$h$$, $$\alpha$$, $$\beta$$, and $$\gamma$$. (c) Assume equally spaced nodes in the form $$t_i=a+ih$$, for $$h=(b-a)/n$$ and $$i=0,\ldots,n$$. Suppose $$f$$ is approximated by $$p(x)$$ over the subinterval $$[t_{i-1},t_{i+1}]$$. Apply the result from part (b) to find $\int_{t_{i-1}}^{t_{i+1}} f(x)\, dx \approx \frac{h}{3} \bigl[ f(t_{i-1}) + 4f(t_i) + f(t_{i+1}) \bigr].$ (Use the change of variable $$s=x-t_i$$.) (d) Now also assume that $$n=2m$$ for an integer $$m$$. Derive Simpson’s formula, (5.6.15)$\begin{split} \begin{split} \int_a^b f(x)\, dx \approx \frac{h}{3}\bigl[ &f(t_0) + 4f(t_1) + 2f(t_2) + 4f(t_3) + 2f(t_4) + \cdots\\ &+ 2f(t_{n-2}) + 4f(t_{n-1}) + f(t_n) \bigr]. \end{split}\end{split}$ 5. ✍ Show that the Simpson formula (5.6.15) is equivalent to $$S_f(n/2)$$, given the definition of $$S_f$$ in (5.6.10). 6. ⌨ For each integral in Exercise 1 above, apply the Simpson formula (5.6.15) and compare the errors to fourth-order convergence. 7. ⌨ For $$n=10,20,30,\ldots,200$$, compute the trapezoidal approximation to $\int_{0}^1 \frac{1}{2.01+\sin (6\pi x)-\cos(2\pi x)} \,d x \approx 0.9300357672424684.$
{ "domain": "tobydriscoll.net", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587234469587, "lm_q1q2_score": 0.8599400531121726, "lm_q2_score": 0.8705972751232809, "openwebmath_perplexity": 997.3050622322135, "openwebmath_score": 0.8504312634468079, "tags": null, "url": "https://tobydriscoll.net/fnc-julia/localapprox/integration.html" }
$\int_{0}^1 \frac{1}{2.01+\sin (6\pi x)-\cos(2\pi x)} \,d x \approx 0.9300357672424684.$ Make two separate plots of the absolute error as a function of $$n$$, one using a log-log scale and the other using log-linear. The graphs suggest that the error asymptotically behaves as $$C \alpha^n$$ for some $$C>0$$ and some $$0<\alpha<1$$. How does this result relate to (5.6.6)? 8. ⌨ For each integral in Exercise 1 above, extrapolate the trapezoidal results two levels to get sixth-order accurate results, and compute the errors for each value. 9. ✍ Find a formula like (5.6.12) that extrapolates two values of $$R_f$$ to obtain an eighth-order accurate one. 1 Some texts distinguish between a formula for a single subinterval $$[t_{k-1},t_k]$$ and a composite formula that adds them up over the whole interval to get (5.6.4).
{ "domain": "tobydriscoll.net", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587234469587, "lm_q1q2_score": 0.8599400531121726, "lm_q2_score": 0.8705972751232809, "openwebmath_perplexity": 997.3050622322135, "openwebmath_score": 0.8504312634468079, "tags": null, "url": "https://tobydriscoll.net/fnc-julia/localapprox/integration.html" }
# Combinations: 10 people divided in to two groups, one of 6 and one of 4? I only know the very basic formula for combinations: (n r)= n!/[r! (n-r)!] I've looked at similar problems on this website, but I'm having trouble understanding how these problems are done exactly: "In how many ways can 10 people be divided into two groups (one group of 6 and one group of four)?" my sad attempt: (10 6) (4 4) = (10!/6!)*(4!/4!) = 5040??? I'd really appreciate it if someone could explain how to go about doing this step by step. I will try to show to you, visually, a direct interpretation of the problem. First of all you must notice that one of the main meaning of a factorial is the number of permutations of n different elements over n positions. By example the number of permutations of the string $ABCDE$ is $5!=5\cdot 4\cdot 3\cdot 2\cdot 1$ (ways to order 5 different elements over 5 different positions). A direct interpretation of your problem, trough permutations, is that you have a string of 10 different elements, e.g. $ABCDEFGHIJK$ or $0123456789$, and you divide this string in two groups: one of length $4$ (i.e. cardinality 4) and other of length $6$ $$\overbrace{ABCD}\ \overbrace{EFGHIJK}$$ You have $10!$ ways to order a string of 10 different elements, after you can divide each of these string on 2 groups of length $4$ and $6$. But you doenst care the order of each group, for your problem $AKJG=JAKG=GKAJ$. The number of ways to order a string of length $4$ is $4!$. The same for your string of length $6$, so you must eliminate all of these duplicates. So you will have $\frac{10!}{4!\cdot 6!}$ ways to form these different groups of 4 and 6 people. For this problem, because the binomial coefficient is defined as $\binom{n}{k}=\frac{n!}{k!\cdot (n-k)!}$ then $\frac{10!}{4!\cdot 6!}=\binom{10}{4}$. This is a direct interpretation of the problem using the meaning of factorial as number of permutations of n elements over n positions.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587265099557, "lm_q1q2_score": 0.8599400441715479, "lm_q2_score": 0.8705972633721708, "openwebmath_perplexity": 124.05673183891122, "openwebmath_score": 0.7179868221282959, "tags": null, "url": "https://math.stackexchange.com/questions/1002944/combinations-10-people-divided-in-to-two-groups-one-of-6-and-one-of-4" }
I will add an alternative, faster, way to interpret visually this problem. First of all I will expand the meaning of factorial as the permutations of n different elements over n positions. If you have n elements (or objects) for the position one you can choose between n elements to put, for the second position you can choose between $n-1$ elements (because you have already one element on position 1). For position 3 you can choose between $n-2$ elements (because you have, already, some element on position 1 and 2), etc., etc., etc... So the permutations will be $n\cdot (n-1)\cdot (n-2)\cdot (n-3)\cdots 1=n!$ Now our case: we have 10 people, and you want to see the different ways that you can group them in 6 and 4. The ordered ways for a group of 6 will be: for position 1 you can choose between 10, for position 2 between 9, ..., for position 6 between 5, i.e. $10\cdot9\cdot8\cdot7\cdot6\cdot5=(10)_6=\frac{10!}{4!}$ (the expression $(n)_k$ is named falling factorial). But this is the expression of ordered positions. To have the unordered positions you must divide between the different ways to order 6 different elements on 6 positions, i.e. divide between $6!$. So the unordered ways to group 10 different elements in a group of 6 is $\frac{(10)_6}{6!}=\binom{10}{6}$. But, what happen with the other group of length 4? For every group of length 6 we will have a unordered group of 4 so the total amounts to divide a group of 10 people in two groups of 6 and 4 is $\binom{10}{6}\cdot1=\binom{10}{6}$. $$\binom{10}{6} = \frac{10!}{6!\,4!} = \frac{10\cdot9\cdot8\cdot7\cdot\overbrace{6\cdot5\cdot4\cdot3\cdot2\cdot1}}{4\cdot3\cdot2\cdot1\cdot\underbrace{6\cdot5\cdot4\cdot3\cdot2\cdot1}} = \frac{10\cdot9\cdot8\cdot7}{4\cdot3\cdot2\cdot1}$$ Since $8$ cancels $4\cdot2$ and $\dfrac 9 3=3$, this reduces to $10\cdot3\cdot7$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587265099557, "lm_q1q2_score": 0.8599400441715479, "lm_q2_score": 0.8705972633721708, "openwebmath_perplexity": 124.05673183891122, "openwebmath_score": 0.7179868221282959, "tags": null, "url": "https://math.stackexchange.com/questions/1002944/combinations-10-people-divided-in-to-two-groups-one-of-6-and-one-of-4" }
(If you wanted two groups of $5$ then you'd do a similar thing but you'd divide by $2$ when you're done, because one set of $5$ and its complementary set of the other $5$ would be the same way of dividing the set of $10$ into two sets of $5$. But that doesn't happen with $4$ and $6$ since $4\ne6$.) • Worth noting that it is equivalent to ${10 \choose 4}{6 \choose 6}$. – miniparser Nov 2 '14 at 20:01
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587265099557, "lm_q1q2_score": 0.8599400441715479, "lm_q2_score": 0.8705972633721708, "openwebmath_perplexity": 124.05673183891122, "openwebmath_score": 0.7179868221282959, "tags": null, "url": "https://math.stackexchange.com/questions/1002944/combinations-10-people-divided-in-to-two-groups-one-of-6-and-one-of-4" }
# Division by zero • B Hi. x2 = x3 / x but x2 is defined for all x and equals zero at x=0 but what happens for x3 / x at x=o ? Is it defined at x=o ? Does it equal zero ? If not what is causing this anomaly ? Thanks phinds Gold Member N/0 is undefined regardless of N. If you assume otherwise, you can prove n=m where n and m are any arbitrary and different numbers. fresh_42 Mentor Hi. x2 = x3 / x but x2 is defined for all x and equals zero at x=0 but what happens for x3 / x at x=o ? Is it defined at x=o ? Does it equal zero ? If not what is causing this anomaly ? Thanks ##x \longmapsto x ## is everywhere continuous, ##x\longmapsto \dfrac{x^3}{x^2}## is not; at ##x=0\,.## Although this is a removable singularity, it still is one, a gap. Algebraically division by zero isn't defined, simply because zero isn't part of any multiplicative group. The question never arises. It's like discussing the height of an apple tree on the moon. jim mcnamara FactChecker Gold Member When people write ## x = \frac {x^3}{x}## with no restriction that ## x \ne 0 ##, they are being (understandably) careless. The proper way is to keep track of all those divisions by zero and make sure that the results are still legitimate when the simplified equations are used. Otherwise, rule those points out. In physical applications, the continuity and nice behavior of the reduced formula, ##x##, at 0 makes it likely to also be valid at that point (##x = 0##). So x = x3 / x2 is not a correct statement on its own ? It needs the addition of the statement " x not equal to 0 " ? I have seen the following statement in textbooks " xn / xm = xn-m " with no mention of " x not equal to 0 ". Are they just being lazy and missing out the " x not equal to 0 " statement ?
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9658995762509216, "lm_q1q2_score": 0.8599348234816603, "lm_q2_score": 0.8902942341267435, "openwebmath_perplexity": 708.0306246976824, "openwebmath_score": 0.6975548267364502, "tags": null, "url": "https://www.physicsforums.com/threads/division-by-zero.953833/" }
fresh_42 Mentor So x = x3 / x2 is not a correct statement on its own ? It needs the addition of the statement " x not equal to 0 " ? Strictly, yes. But as it isn't defined for ##x=0## it is implicitly clear. As long as you don't want to write unnecessary additional lines, just leave it. Who writes ##x\geq 0## if he uses ##\sqrt{x}\,?## This is simply self-evident, resp. clear by context. But logically, the domain of ##x## needs to be mentioned in general, such that we know what the function really is. But in your post it was pretty clear what you meant even without it. I have seen the following statement in textbooks " xn / xm = xn-m " with no mention of " x not equal to 0 ". Are they just being lazy and missing out the " x not equal to 0 " statement ? See above. It is simply not necessary as long as you don't write a book on logic. It's like mocking about a Pizza guy not telling you it's hot. However, if you talk about specific functions, you better say where and how they are defined. E.g. you could define $$f(x) = \begin{cases}\dfrac{x^3}{x^2} \,&,\, x\neq 0 \\ 0\,&\,,x=0\end{cases}$$ or simply $$f(x)= \dfrac{x^3}{x^2}\; , \;x\neq 0$$ which will be two different functions. So as always with written things, it depends on what you want to express. In post #1 and the example you gave it isn't necessary. Mocking about it is nit-picking.
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9658995762509216, "lm_q1q2_score": 0.8599348234816603, "lm_q2_score": 0.8902942341267435, "openwebmath_perplexity": 708.0306246976824, "openwebmath_score": 0.6975548267364502, "tags": null, "url": "https://www.physicsforums.com/threads/division-by-zero.953833/" }
It is currently 18 Oct 2017, 04:52 ### GMAT Club Daily Prep #### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email. Customized for You we will pick new questions that match your level based on your Timer History Track every week, we’ll send you an estimated GMAT score based on your performance Practice Pays we will pick new questions that match your level based on your Timer History # Events & Promotions ###### Events & Promotions in June Open Detailed Calendar ### Show Tags 17 Sep 2017, 13:45 Top Contributor 5 This post was BOOKMARKED 00:00 Difficulty: 15% (low) Question Stats: 79% (01:58) correct 21% (01:31) wrong based on 48 sessions ### HideShow timer Statistics A purse contains 5-cent coins and 10-cent coins worth a total of $1.75. If the 5-cent coins were replaced with 10-cent coins and the 10-cent coins were replaced with 5-cent coins, the coins would be worth a total of$2.15. How many coins are in the purse? A. 26 B. 27 C. 28 D. 29 E. 30 [Reveal] Spoiler: OA _________________ Kudos [?]: 1449 [0], given: 270 Intern Joined: 26 Jul 2017 Posts: 18 Kudos [?]: 10 [1], given: 25 Location: India ### Show Tags 17 Sep 2017, 19:53 Let the total 5 cent coins be x, and the 10 cent coins be y From the question stem, $$5x + 10y = 175$$ Value of y(by the following equation) : $$y = \frac{175 - 5x}{10}$$ Substituting this value of y in the second equation $$10x + \frac{5(175 - 5x)}{10} = 215$$ $$100x + 875 - 25x = 2150$$ $$75x = 1275$$ $$x = 17$$ Substituting this value of x in equation$$5x+10y = 175$$ $$85 + 10y = 175$$ $$y = 9$$ Therefore the sum of coins in the p = 17 + 9 = 26(Option A) _________________ Stay hungry, Stay foolish Kudos [?]: 593 [0], given: 16 Director Joined: 22 May 2016 Posts: 806 Kudos [?]: 258 [0], given: 546
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9658995762509216, "lm_q1q2_score": 0.859934817155683, "lm_q2_score": 0.8902942275774318, "openwebmath_perplexity": 4795.028110111905, "openwebmath_score": 0.38608285784721375, "tags": null, "url": "https://gmatclub.com/forum/a-purse-contains-5-cent-coins-and-10-cent-coins-worth-a-total-of-249516.html" }
Director Joined: 22 May 2016 Posts: 806 Kudos [?]: 258 [0], given: 546 A purse contains 5-cent coins and 10-cent coins worth a total of $1.75 [#permalink] ### Show Tags 17 Sep 2017, 21:26 Gnpth wrote: A purse contains 5-cent coins and 10-cent coins worth a total of$1.75. If the 5-cent coins were replaced with 10-cent coins and the 10-cent coins were replaced with 5-cent coins, the coins would be worth a total of $2.15. How many coins are in the purse? A. 26 B. 27 C. 28 D. 29 E. 30 I solved with two variables, and it works, but I have a question about my own method that applies to vishalbalwani 's method, too. Let A = the number of 5-cent coins Let B = the number of 10- cent coins In one scenario, the coins, in their respective unknown quantities, total$1.75
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9658995762509216, "lm_q1q2_score": 0.859934817155683, "lm_q2_score": 0.8902942275774318, "openwebmath_perplexity": 4795.028110111905, "openwebmath_score": 0.38608285784721375, "tags": null, "url": "https://gmatclub.com/forum/a-purse-contains-5-cent-coins-and-10-cent-coins-worth-a-total-of-249516.html" }
In a second scenario, the 5-cent coins and 10-cent coins exchange quantities exactly, and they total $2.15 5A + 10B = 175 (P) 10A + 5B = 215 (Q) Multiply (Q) by two, and subtract (P) 20 A + 10B = 430 __5A + 10B = 175 15A = 255 A = 17 There are 17 coins worth 5 cents. Use (P) to find the number of 10-cent pieces 5(17) + 10B = 175 10B = 90 B = 9 There are 9 coins worth 19 0 cents. A = 17, B = 9, total = 26 coins Answer A I have run this problem three ways, including vishalbalwani 's, and working from answer choices. This combination (number of coins), is the only one that works. Question: Is the method sound? The variables work, but they seem inconsistent. I use A as a quantity for 5-cent coins. The coefficients of the variables -- 5 and 10 -- are the values of the coins in cents. But in the second equation, (Q) I do not think I have switched quantities, per the prompt. I think have switched values. In the second equation, (Q), the 5, a value, is in front of B -- which is supposed to be the quantity of 10-cent coins. vishalbalwani did the same. What am I missing? We are supposed to be switching quantities. But switching values works. I think pushpitkc avoids the whole problem by immediately defining y in terms of x from one equation. Is my method sound? Kudos [?]: 258 [0], given: 546 Target Test Prep Representative Status: Founder & CEO Affiliations: Target Test Prep Joined: 14 Oct 2015 Posts: 1634 Kudos [?]: 837 [0], given: 2 Location: United States (CA) Re: A purse contains 5-cent coins and 10-cent coins worth a total of$1.75 [#permalink] ### Show Tags 22 Sep 2017, 07:49 Gnpth wrote: A purse contains 5-cent coins and 10-cent coins worth a total of $1.75. If the 5-cent coins were replaced with 10-cent coins and the 10-cent coins were replaced with 5-cent coins, the coins would be worth a total of$2.15. How many coins are in the purse? A. 26 B. 27 C. 28 D. 29 E. 30
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9658995762509216, "lm_q1q2_score": 0.859934817155683, "lm_q2_score": 0.8902942275774318, "openwebmath_perplexity": 4795.028110111905, "openwebmath_score": 0.38608285784721375, "tags": null, "url": "https://gmatclub.com/forum/a-purse-contains-5-cent-coins-and-10-cent-coins-worth-a-total-of-249516.html" }
A. 26 B. 27 C. 28 D. 29 E. 30 We can create two equations in which a = the initial number of 5-cent coins and b = the initial number of 10-cent coins. We can create the “money” equation by recalling that a 5-cent coin is $0.05 and a 10-cent coin is$0.10; thus: 0.05a + 0.1b = 1.75 And, after we reverse the coinage, we have: 0.1a + 0.05b = 2.15 Multiplying the first equation by -2, we have: -0.1a - 0.2b = -3.50 Adding the two equations, we have: -0.15b = -1.35 b = 9 Thus: 0.05a + (0.1)(9) = 1.75 0.05a = 0.85 a = 17 So, there is a total of 17 + 9 = 26 coins. _________________ Scott Woodbury-Stewart Founder and CEO GMAT Quant Self-Study Course 500+ lessons 3000+ practice problems 800+ HD solutions Kudos [?]: 837 [0], given: 2 Director Joined: 22 May 2016 Posts: 806 Kudos [?]: 258 [0], given: 546
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9658995762509216, "lm_q1q2_score": 0.859934817155683, "lm_q2_score": 0.8902942275774318, "openwebmath_perplexity": 4795.028110111905, "openwebmath_score": 0.38608285784721375, "tags": null, "url": "https://gmatclub.com/forum/a-purse-contains-5-cent-coins-and-10-cent-coins-worth-a-total-of-249516.html" }
Director Joined: 22 May 2016 Posts: 806 Kudos [?]: 258 [0], given: 546 A purse contains 5-cent coins and 10-cent coins worth a total of $1.75 [#permalink] ### Show Tags 22 Sep 2017, 08:38 ScottTargetTestPrep wrote: Gnpth wrote: A purse contains 5-cent coins and 10-cent coins worth a total of$1.75. If the 5-cent coins were replaced with 10-cent coins and the 10-cent coins were replaced with 5-cent coins, the coins would be worth a total of $2.15. How many coins are in the purse? A. 26 B. 27 C. 28 D. 29 E. 30 We can create two equations in which a = the initial number of 5-cent coins and b = the initial number of 10-cent coins. We can create the “money” equation by recalling that a 5-cent coin is$0.05 and a 10-cent coin is $0.10; thus: 0.05a + 0.1b = 1.75 And, after we reverse the coinage, we have: 0.1a + 0.05b = 2.15 Multiplying the first equation by -2, we have: -0.1a - 0.2b = -3.50 Adding the two equations, we have: -0.15b = -1.35 b = 9 Thus: 0.05a + (0.1)(9) = 1.75 0.05a = 0.85 a = 17 So, there is a total of 17 + 9 = 26 coins. Answer: A ScottTargetTestPrep , where you reverse the coinage, what do variables $$a$$ and $$b$$ stand for? (I had the same question about my own method, above.) Perhaps the variables stand simply for the total number of coins, and absent any total number of coins, we cannot write one variable in terms of another. Conceptually, however, that reasoning does not make a lot of sense to me. We have two unknown quantities in two scenarios. In the first equation, the quantity b is defined as the number of$0.10 coins (and qty "a" initially is # of $.05 coins) If "b" then switches to the number of$0.05 coins (vice versa for "a"), how are those two a's and b's the same, such that we can use them as an identity in solving two equations? Sorry if this question is sophomoric; usually I can find my way out of a muddle. Not this time. Kudos [?]: 258 [0], given: 546 Math Forum Moderator Joined: 02 Aug 2009 Posts: 4969 Kudos [?]: 5458 [1], given: 112
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9658995762509216, "lm_q1q2_score": 0.859934817155683, "lm_q2_score": 0.8902942275774318, "openwebmath_perplexity": 4795.028110111905, "openwebmath_score": 0.38608285784721375, "tags": null, "url": "https://gmatclub.com/forum/a-purse-contains-5-cent-coins-and-10-cent-coins-worth-a-total-of-249516.html" }
Math Forum Moderator Joined: 02 Aug 2009 Posts: 4969 Kudos [?]: 5458 [1], given: 112 ### Show Tags 01 Oct 2017, 12:26 1 KUDOS Expert's post genxer123 wrote: ScottTargetTestPrep wrote: Gnpth wrote: A purse contains 5-cent coins and 10-cent coins worth a total of $1.75. If the 5-cent coins were replaced with 10-cent coins and the 10-cent coins were replaced with 5-cent coins, the coins would be worth a total of$2.15. How many coins are in the purse? A. 26 B. 27 C. 28 D. 29 E. 30 We can create two equations in which a = the initial number of 5-cent coins and b = the initial number of 10-cent coins. We can create the “money” equation by recalling that a 5-cent coin is $0.05 and a 10-cent coin is$0.10; thus: 0.05a + 0.1b = 1.75 And, after we reverse the coinage, we have: 0.1a + 0.05b = 2.15 Multiplying the first equation by -2, we have: -0.1a - 0.2b = -3.50 Adding the two equations, we have: -0.15b = -1.35 b = 9 Thus: 0.05a + (0.1)(9) = 1.75 0.05a = 0.85 a = 17 So, there is a total of 17 + 9 = 26 coins. ScottTargetTestPrep , where you reverse the coinage, what do variables $$a$$ and $$b$$ stand for? (I had the same question about my own method, above.) Perhaps the variables stand simply for the total number of coins, and absent any total number of coins, we cannot write one variable in terms of another. Conceptually, however, that reasoning does not make a lot of sense to me. We have two unknown quantities in two scenarios. In the first equation, the quantity b is defined as the number of $0.10 coins (and qty "a" initially is # of$.05 coins)
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9658995762509216, "lm_q1q2_score": 0.859934817155683, "lm_q2_score": 0.8902942275774318, "openwebmath_perplexity": 4795.028110111905, "openwebmath_score": 0.38608285784721375, "tags": null, "url": "https://gmatclub.com/forum/a-purse-contains-5-cent-coins-and-10-cent-coins-worth-a-total-of-249516.html" }
If "b" then switches to the number of $0.05 coins (vice versa for "a"), how are those two a's and b's the same, such that we can use them as an identity in solving two equations? Sorry if this question is sophomoric; usually I can find my way out of a muddle. Not this time. The variables a and b stand for the initial number of 5- and 10-cent coins, before and after reversing the coinage. The only thing that changes when the coinage is reversed is that the number of 5-cent coins is now b and the number of 10-cent coins is now a. _________________ Scott Woodbury-Stewart Founder and CEO GMAT Quant Self-Study Course 500+ lessons 3000+ practice problems 800+ HD solutions Kudos [?]: 837 [1], given: 2 Re: A purse contains 5-cent coins and 10-cent coins worth a total of$1.75   [#permalink] 01 Oct 2017, 12:26 Display posts from previous: Sort by # A purse contains 5-cent coins and 10-cent coins worth a total of \$1.75 Powered by phpBB © phpBB Group | Emoji artwork provided by EmojiOne Kindly note that the GMAT® test is a registered trademark of the Graduate Management Admission Council®, and this site has neither been reviewed nor endorsed by GMAC®.
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9658995762509216, "lm_q1q2_score": 0.859934817155683, "lm_q2_score": 0.8902942275774318, "openwebmath_perplexity": 4795.028110111905, "openwebmath_score": 0.38608285784721375, "tags": null, "url": "https://gmatclub.com/forum/a-purse-contains-5-cent-coins-and-10-cent-coins-worth-a-total-of-249516.html" }
Relation between real roots of a polynomial and real roots of its derivative I have this question which popped in my mind while solving questions of maxima and minima. First Case:Let $f(x)$ be an $n$ degree polynomial which has $r$ real roots. Using this can we say anything about the number of real roots of $f'(x)$? Second Case:Suppose, $f(x)$ has all $n$ real roots. Then will all of its derivatives also have all real roots? Also, if any of its derivatives do not have all real roots, then will $f(x)$ also have not all real roots? If the above is true then what about its converse? Comment Case:For the third case:Suppose f'(x) is a 5 degree polynomial with 3 real roots.Then f(x) will be a 6 degree polynomial.(correct me if I am wrong).What are the possible no. of roots that f(x) can have(3,4,5 etc.?).Basically I am asking for an example.Also it would be great if you follow all cases with an example like in the 4th case. • I don't understand the beginning. If $f(x)$ is an n-degree polynomial with $r$ real roots, then it is not the case that $f'(x)$ will have $(r-1)$ real roots. Consider $f(x) = x^2 +1$. Here $r = 0$, but $f'(x) = 2x$ which has 1 root at 0. Jul 23 '15 at 19:35 • Sorry I never realized that.I just said what I was taught.Now I know it was incorrect.I have edited it. But I dont understand why the question has been downvoted? Jul 23 '15 at 19:49 • You're probably being downvoted for not providing any work/ideas for your question. Jul 23 '15 at 20:22 • This is of interest: en.wikipedia.org/wiki/Gauss%E2%80%93Lucas_theorem Jul 23 '15 at 21:48 First case: If the number of real roots $r$ of $f(x)$ is greater than one, then $f'(x)$ has at least $r-1$ real roots. (The limitation "greater than one" is not necessary but the statement is trivial if $r\le 1$.) Given any two roots $a<b$ of $f(x)$, $f$ is continuous and differentiable on $[a,b]$, so by Rolle's theorem $f'(c)=0$ for some $a<c<b$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105300791785, "lm_q1q2_score": 0.8599314636202414, "lm_q2_score": 0.8807970795424088, "openwebmath_perplexity": 108.06990944492968, "openwebmath_score": 0.8377802968025208, "tags": null, "url": "https://math.stackexchange.com/questions/1371717/relation-between-real-roots-of-a-polynomial-and-real-roots-of-its-derivative" }
There may be more roots of $f'(x)$ than those between roots of $f(x)$, so the only upper bound is the obvious one of $n-1$. Ask if you need examples. It seems to me that if multiplicity is taken into account that the number of real roots of $f'(x)$ has the same parity (even/odd) as the number of real roots of $f(x)$, but I haven't proven it yet. If multiplicity is not taken into account, the parity can be anything. Second case: If $f(x)$ has degree $n$ and has $n$ real roots, then each consecutive pair of roots of $f(x)$ defines a root of $f'(x)$, which makes $n-1$ roots of $f'(x)$. Since $f'(x)$ is a polynomial of degree $n-1$, this is all possible roots. This continues for all later derivatives, so you are correct: all its derivatives will have all real roots. Third case: The contrapositive of the second case tells us that if any of its derivatives have any non-real roots, then $f(x)$ also has some non-real roots. Fourth case: The converse of the third case is not true. For example, $f(x)=x^2+1$ has two non-real roots, but its derivative $f'(x)=2x$ has one real root. Comment case: You asked, "Suppose $f'(x)$ is a $5$ degree polynomial with $3$ real roots. What are the possible no. of roots that $f(x)$ can have($3,4,5$ etc.?)." The formulas for $f(x)$ and $f'(x)$ are given in the diagram, where $C$ is a real constant, zero in the graph. You can see that $f'(x)$ is a degree $5$ polynomial with $3$ real roots. The dashed horizontal lines show the possible number of real roots of $f(x)$ for varying values of $C$. There are $0$ real roots for $C=3$, $1$ real root for $C\approx. 2.638$, $2$ real roots for $C=1$, $3$ real roots for $C\approx -1.757$, and $4$ real roots for $C=-1.9$. My discussion for the first case shows that there cannot be more than $4$ real roots since $f'(x)$ has $3$ real roots.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105300791785, "lm_q1q2_score": 0.8599314636202414, "lm_q2_score": 0.8807970795424088, "openwebmath_perplexity": 108.06990944492968, "openwebmath_score": 0.8377802968025208, "tags": null, "url": "https://math.stackexchange.com/questions/1371717/relation-between-real-roots-of-a-polynomial-and-real-roots-of-its-derivative" }
• For the third case:Suppose f'(x) is a 5 degree polynomial with 3 real roots.Then f(x) will be a 6 degree polynomial.(correct me if I am wrong).What are the possible no. of roots that f(x) can have(3,4,5 etc.?).Basically I am asking for an example.Also it would be great if you follow all cases with an example like in the 4th case. Jul 23 '15 at 20:40 First, notice that if any differentiable function $f(x)$ has $r$ real (distinct) roots, then $f'(x)$ must have at least $r-1$ distinct roots. This follows from the following: Suppose that $a_1<...<a_r$ are (distinct) roots from $f(x)$ and $i \in \{1,...,r-1\}$. Then consider every interval of the form $[a_i,a_{i+1}]$. Since this interval is compact, any function on this interval achieves a maximum/minimum. Each minimum/maximum (depending on whether the function $f$ is dipping below or above the real line) corresponds to a root of $f'(x)$. Since we have $r -1$ such intervals, we have at least $r-1$ roots. Since all polynomials are differentiable, we notice that if $f(x)$ has $r$ (distinct) roots, then $f'(x)$ has at least $r - 1$ distinct roots. Your question isn't the clearest, but maybe someone else can come up with a better question to answer 1. If a polynomial $f(x)$ is degree $n$ and has $n$ (distinct) real roots, then using the argument above (as well as the fundamental theorem of algebra (that might be over-kill, but oh well)), you can conclude that $f'(x)$ has exactly $n-1$ real roots. Given this work, you can figure out 3 with the case for (distinct) roots.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105300791785, "lm_q1q2_score": 0.8599314636202414, "lm_q2_score": 0.8807970795424088, "openwebmath_perplexity": 108.06990944492968, "openwebmath_score": 0.8377802968025208, "tags": null, "url": "https://math.stackexchange.com/questions/1371717/relation-between-real-roots-of-a-polynomial-and-real-roots-of-its-derivative" }
# How many significant digits are in 1040. and 1040.0? #### Indranil ##### Junior Member How many significant digits are in 1040. and 1040.0? I am confused #### Dr.Peterson ##### Elite Member How many significant digits are in 1040. and 1040.0? I am confused It will help if you state your specific confusion. What possibilities do you see for the answers? What about it are you unsure of? #### Indranil ##### Junior Member It will help if you state your specific confusion. What possibilities do you see for the answers? What about it are you unsure of? Do 1040. has four significant digits and 1040.0 has five significant digits? #### Dr.Peterson ##### Elite Member Do 1040. has four significant digits and 1040.0 has five significant digits? That's right. You aren't really confused, just perhaps uncertain. When there is a decimal point present, all digits from the first non-zero digit on the left to the last written digit on the right are significant. #### Subhotosh Khan ##### Super Moderator Staff member Do 1040. has four significant digits and 1040.0 has five significant digits? And 1040 (without decimal point) has three significant digits. #### Indranil ##### Junior Member And 1040 (without decimal point) has three significant digits. Could you explain why without decimal point, 1040 has three significant digits? and what is the difference between 1040 and 1040.? because I knew 1040 and 1040. are the same. #### Subhotosh Khan ##### Super Moderator Staff member Could you explain why without decimal point, 1040 has three significant digits? and what is the difference between 1040 and 1040.? because I knew 1040 and 1040. are the same. When you write 1040 - it can be 1036 (min) to 1044 (max) When you write 1040. - it can be 1039.6 to 1040.4 #### Dr.Peterson
{ "domain": "freemathhelp.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105293899019, "lm_q1q2_score": 0.8599314630131287, "lm_q2_score": 0.8807970795424088, "openwebmath_perplexity": 922.9623029438295, "openwebmath_score": 0.671176016330719, "tags": null, "url": "https://www.freemathhelp.com/forum/threads/how-many-significant-digits-are-in-1040-and-1040-0.111578/" }
When you write 1040. - it can be 1039.6 to 1040.4 #### Dr.Peterson ##### Elite Member Could you explain why without decimal point, 1040 has three significant digits? and what is the difference between 1040 and 1040.? because I knew 1040 and 1040. are the same. Of course you are right that 1040 and 1040. represent the same number; it is only the convention about implied accuracy that is at issue. I would say that 1040 is somewhat ambiguous, because you can't be sure whether the final zero is there because that digit is actually zero, or only because the digit is needed in order to have the right place values. It might really have either 3 or 4 significant digits - that is, it might have been rounded to the nearest ten or to the nearest unit, and be written the same. Many people assume the least possible accuracy. Ideally, significant digits should be read on in scientific notation, where this never happens (because there is only one digit before the decimal point). On the other hand, with the decimal point, it is clear that the writer intends to stop after the decimal point, and the zero is significant. #### JeffM ##### Elite Member When you write 1040 - it can be 1036 (min) to 1044 (max) When you write 1040. - it can be 1039.6 to 1040.4 According to the conventions of significant figures, 1040 and 1040. mean different things. That is because the whole idea of significant figures involves applied mathematics. In pure mathematics $$\displaystyle 1040. \equiv 1040$$ as you recognize, but the concept of significant figures is not relevant to pure mathematics. See https://en.m.wikipedia.org/wiki/Significant_figures Last edited: #### Indranil ##### Junior Member When you write 1040 - it can be 1036 (min) to 1044 (max) When you write 1040. - it can be 1039.6 to 1040.4 #### Dr.Peterson ##### Elite Member I think what others of us said make the point more clearly, showing the reason.
{ "domain": "freemathhelp.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105293899019, "lm_q1q2_score": 0.8599314630131287, "lm_q2_score": 0.8807970795424088, "openwebmath_perplexity": 922.9623029438295, "openwebmath_score": 0.671176016330719, "tags": null, "url": "https://www.freemathhelp.com/forum/threads/how-many-significant-digits-are-in-1040-and-1040-0.111578/" }
##### Elite Member I think what others of us said make the point more clearly, showing the reason. Take a more interesting example: 104000. I might write that as an estimate, or rounded number, whether the real number was exactly 104000, or 104001 and rounded to the nearest ten, or 104010 and rounded to the nearest hundred, or 104100 and rounded to the nearest thousand. There is no way to distinguish those situations by the way we write it, unless we use one of the (relatively rare) conventions Wikipedia suggests. As they say, "The significance of trailing zeros in a number not containing a decimal point can be ambiguous. For example, it may not always be clear if a number like 1300 is precise to the nearest unit (and just happens coincidentally to be an exact multiple of a hundred) or if it is only shown to the nearest hundred due to rounding or uncertainty." One way to reduce the ambiguity when the number is accurate to the nearest unit is to include a decimal point and write it as "104000.". Since this can be done, some people tend to assume that if there is no decimal point, the number of significant digits should be assumed to be as few as possible, in this case three, with all the trailing zeros insignificant. Back to the original, if a number was rounded to the nearest unit and the result was 1040, then the number could be anything from 1039.5 to just under 1040.5. (What Khan wrote was not quite right.) Any of those numbers, such as 1039.51 or 1040.49, would round to 1040. If the number had been rounded to the nearest ten, then the original could have been anything from 1035 to just under 1045. (I should add that whether you would round 1035 to 1040 depends on the precise convention you are following for rounding.) #### HallsofIvy
{ "domain": "freemathhelp.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105293899019, "lm_q1q2_score": 0.8599314630131287, "lm_q2_score": 0.8807970795424088, "openwebmath_perplexity": 922.9623029438295, "openwebmath_score": 0.671176016330719, "tags": null, "url": "https://www.freemathhelp.com/forum/threads/how-many-significant-digits-are-in-1040-and-1040-0.111578/" }
#### HallsofIvy ##### Elite Member As has been said, the distinction between 1040 and 1040. is a convention. It has been agreed that if there is a decimal point after an integer then all digits in the number are "significant" and that if there is no decimal point then the significant digits are end with the rightmost non-zero digit. #### Denis ##### Senior Member ...and if 1040. was at end of sentence, then you'd have 1040.. :cool:
{ "domain": "freemathhelp.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105293899019, "lm_q1q2_score": 0.8599314630131287, "lm_q2_score": 0.8807970795424088, "openwebmath_perplexity": 922.9623029438295, "openwebmath_score": 0.671176016330719, "tags": null, "url": "https://www.freemathhelp.com/forum/threads/how-many-significant-digits-are-in-1040-and-1040-0.111578/" }
need help with a Markov chain for weather conditions This is my second time posting the question as I failed to do so the first time, because I did not know the proper way. My apologies. Question: Suppose that whether or not it rains today depends on weather conditions through the previous teo days. If it has rained for the past two days, then it will rain today with probability 0.7. If it did not rain for any of the past two days, then it will rain today with probability 0.4. In any other case the weather today will, with probability 0.5, be the same as the weather yesterday. Describe the weather condition over time with a Markov chain. Suppose that it rained today and yesterday. Calculate the expected number of days until it rains three consecutive days for the first time in the future. I have found 4 different states that I named RR(0), RN(2), NR(1), and NN(3). R stands for when it rains and N is for when it does not. As the question asks, I have tried finding the possible ways of three consecutive days being rainy. At time n, we are given it was rainy today and yesterday, meaning we are in State 0. 1-) First possibility is when it rains tomorrow, which gives us RRR (we got the three consecutive days) 2-) Second possibility is when we go from 0 to 2, from 2 to 1, from 1 to 0, and stay in 0 one day. That follows as : RRNRRR (In 4 days we can get rain for 3 consecutive days) 3-) Third is when we go from 0 to 2, from 2 to 3, from 3 to 1, from 1 to 0, and stay in 0 one day. That follows as: RRNNRRR. To conclude what I have in mind about the question, wherever we go, when we get to State 0, we need to stay there one more day to get three consecutive rainy days. That means the minimum # of days to get rain for three consecutive days is one day. However, after this point, I am not able to proceed with the question. Any help would be appreciated, thank you!!
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105300791785, "lm_q1q2_score": 0.8599314529279963, "lm_q2_score": 0.880797068590724, "openwebmath_perplexity": 205.81854152687754, "openwebmath_score": 0.559999406337738, "tags": null, "url": "https://math.stackexchange.com/questions/4186288/need-help-with-a-markov-chain-for-weather-conditions" }
Any help would be appreciated, thank you!! Edit: I think the maximum # of days is just a random number, which leads me to the expectation of the sum of a random number of geometric random variable, but still I can't go any further beyond that. Thank you! • For $i=0,1,2,3$, let $E_i$ be the expected number of days until $3$ consecutive rainy days, if the chain is currently in state $i$. We are asked to compute $E_0$. Notice that $E_0=1+.3E_2$. Develop similar equations for the other $E_i$ and solve. Jun 29, 2021 at 17:39 • Developing the equations is where I am stuck at and I am also confused as to whether there is a boundary condition. Could you please explain to me, for instance, how to develop E0? Jun 29, 2021 at 18:44 Let me get you started. I claim that $$E_0=1+.3E_2$$ as I stated in a comment. Suppose we are in state $$0$$. We must wait at least $$1$$ more day to see if we'll have three consecutive days of rain. $$70\%$$ of the time, it rains, and we are done, but $$30\%$$ of the time we transition to state $$2$$, and then we must wait, on average, $$E_2$$ days to get $$3$$ consecutive rainy days. If we are in state $$2$$, similar reasoning gives $$E_2=1+.5E_1+ .5E_3$$ You can read the equations right off your diagram. You should get $$4$$ equations with $$4$$ unknowns and a unique solution. I'm sure you won't have any problem finishing from here. • I have found E3=1 + 0.6(E3) + 0.4(E1) (state 1 is the only different state we can transition to from state 3 and we might also stay in state 3 with p=0.6?) and E1= 1 + 0.5(E0) + 0.5(E2). Do you think I made a mistake or those are correct? Jun 30, 2021 at 8:20 • @SydneyAstbury I think you are correct. Jun 30, 2021 at 11:36 Ordinarily, Markov Chains are conditional on the previous step, but not on the previous two steps. A way to get around this in the current problem is to re-define the states to account for two days, with suitable overlaps.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105300791785, "lm_q1q2_score": 0.8599314529279963, "lm_q2_score": 0.880797068590724, "openwebmath_perplexity": 205.81854152687754, "openwebmath_score": 0.559999406337738, "tags": null, "url": "https://math.stackexchange.com/questions/4186288/need-help-with-a-markov-chain-for-weather-conditions" }
The new states are 00 (for consecutive dry days) 01 (dry followed by wet), and so on to 11 (for two wet days in a row). States 'overlap' so that 00 can be followed by 01, but not by 01, etc. In the matrix below we call the new states A,B, C, D. The transition matrix can be written in R as P = matrix(c(.6, .4, 0, 0, 0, 0, .5, .5, .5, .5, 0, 0, 0, 0, .3, .7), byrow=T, nrow=4) We seek $$\sigma$$ such that $$\sigma P = P,$$ so that $$\sigma$$ is a left eigenvector of $$P.$$ Because R finds right eigenvectors, we use the transpose t(P). The stationary distribution is proportional to the right eigenvector of smallest modulus, which R prints first. [In R, the symbol %*% denotes matrix multiplication.] g = eigen(t(P))\$vec[,1] sg = g/sum(g); sg [1] 0.2542373 0.2033898 0.2033898 0.3389831 sg %*% P # check [,1] [,2] [,3] [,4] [1,] 0.2542373 0.2033898 0.2033898 0.3389831 So the long-run probability of rain is $$0.5424.$$ Note: In this relatively simple problem it is not difficult to solve a few simultaneous equations, but the eigen-method shown above is very convenient for ergodic chains with more than four states.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105300791785, "lm_q1q2_score": 0.8599314529279963, "lm_q2_score": 0.880797068590724, "openwebmath_perplexity": 205.81854152687754, "openwebmath_score": 0.559999406337738, "tags": null, "url": "https://math.stackexchange.com/questions/4186288/need-help-with-a-markov-chain-for-weather-conditions" }
Is the following application of the CLT correct? I am new to probability theory and still have a problem understanding some things. I came across the following problem that I am unsure on how to solve. Here it is: Suppose that in a city with $$100,000$$ cars a shop sells tires for cars. It has been observed that in an interval of $$3$$ months the percentage of cars that come to the shop for the replacement of all their tires is $$0.5$$%. What is the least number of tires that the shop has to order so that it can satisfy all its customers in a $$3$$ month interval with probability $$\geq 95$$%? And here is my attempt: Let $$X$$ be the random variable of cars coming at the shop in a $$3$$ month interval. Then $$X$$ is a discrete random variable following binomial distribution $$B(100,000; 0.005)$$. We would like to find the least $$x\in\mathbb{N}$$ satisfying $$P(X\leq x)\geq95$$%. Since (I assume) every car has $$4$$ tires, our answer is going to be $$4x$$. Now since we have a large number of cars, by the Central limit theorem, we have that $$X\sim N(\mu,\sigma^2)$$, where $$\mu, \sigma^2$$ are the expected value and the variance of $$B(100,000; 0.005)$$ and therefore, by calculating, it is $$\mu=500, \sigma^2=475$$. Now we have $$P(X\leq x)=P\big{(}\displaystyle{\frac{X-500}{\sqrt{475}}\leq\frac{x-500}{\sqrt{475}}\big{)}=P\big{(}Z\leq\frac{x-500}{\sqrt{475}}\big{)}}$$, where $$Z\sim N(0,1)$$. Now our $$x$$ will satisfy $$\displaystyle{P\big{(}Z\leq\frac{x-500}{\sqrt{475}}\big{)}}=0.95$$, therefore $$\displaystyle{P\big{(}0 hence (by the tables) it is $$\displaystyle{\frac{x-500}{\sqrt{475}}=1.645}$$, which yields $$x=535.85..$$ and since $$x$$ is supposed to be an integer we have that $$x=536$$. therefore the least number of tires is $$2144$$. Is my solution correct? if not, what should I have used? Comment: I know that the $$x=$$fractional is not correct since i specified that $$x\in\mathbb{N}$$, but you get the point.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.976310529389902, "lm_q1q2_score": 0.8599314523208836, "lm_q2_score": 0.880797068590724, "openwebmath_perplexity": 175.4303192496582, "openwebmath_score": 0.5571967363357544, "tags": null, "url": "https://math.stackexchange.com/questions/3081850/is-the-following-application-of-the-clt-correct" }
• "the percentage of cars that come to the shop for the replacement of all their tires is 0.5%" That is quite poorly worded, it says that X is a constant ( 500). I guess it meant what you understood, though. – leonbloy Jan 21 at 14:49 • @leonbloy I know, I was confused by this as well, but this is an accurate translation of the problem... – JustDroppedIn Jan 21 at 15:03 Assuming that the shop's only tire business is to replace all four tires, your method makes sense. [Otherwise, I can't see how to work the problem.] The CLT implies that a binomial distribution with sufficiently large $$n$$ is well-approximated by a normal distribution, which is what you're doing. Binomial. I used the binomial quantile function (inverse CDF) qbinom in R to compute an answer directly from the binomial distribution. It is very nearly the same as your answer. 4*ceiling(qbinom(.95, 10^5, .005)) [1] 2148 I expect that the small discrepancy may result from rounding in finding the mean and standard deviation of the approximating normal distribution or from using printed normal tables. [Perhaps try $$\sigma^2 = 497.5.]$$ Normal approximation to binomial. Without rounding, I get the following result from the normal approximation. (The normal approximation with $$n=10^5$$ and $$p = 0.005$$ should be quite good, but not necessarily exactly perfect.) n = 10^5; p = .005; mu = n*p; sg = sqrt(n*p*(1-p)) 4*ceiling(qnorm(.95, mu, sg)) [1] 2148 Poisson approximation. Another reasonable approximation is to use the distribution $$\mathsf{Pois}(\lambda = \mu = np).$$ This approximation is quite good for large $$n$$ and small $$p:$$ 4*ceiling(qpois(.95, mu)) [1] 2148 Normal approximation to Poisson. For $$\lambda$$ as large as $$500$$ the Poisson distribution is well approximated by $$\mathsf{Norm}(\lambda, \sqrt{\lambda}):$$ 4*ceiling(qnorm(.95, mu, sqrt(mu))) [1] 2148
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.976310529389902, "lm_q1q2_score": 0.8599314523208836, "lm_q2_score": 0.880797068590724, "openwebmath_perplexity": 175.4303192496582, "openwebmath_score": 0.5571967363357544, "tags": null, "url": "https://math.stackexchange.com/questions/3081850/is-the-following-application-of-the-clt-correct" }
4*ceiling(qnorm(.95, mu, sqrt(mu))) [1] 2148 The following figure shows the binomial distribution (black bars) along with its normal approximation (blue curve) and its Poisson approximation (centers of red circles). The probability to the right of the vertical dotted line is about 0.05.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.976310529389902, "lm_q1q2_score": 0.8599314523208836, "lm_q2_score": 0.880797068590724, "openwebmath_perplexity": 175.4303192496582, "openwebmath_score": 0.5571967363357544, "tags": null, "url": "https://math.stackexchange.com/questions/3081850/is-the-following-application-of-the-clt-correct" }
How to enumerate 2D integer coordinates ordered by Euclidean distance? The square of Euclidean distance between $(x, y)\in\mathbb{Z}^2$ and origin is $d = x^2+y^2$. How to enumerate the coordinates $(x, y)$ in ascending order of $d$? For example, the first 14 sets of coordinates are: d=0: { (0,0) } d=1: { (1,0), (0,1), (0,-1), (-1,0) } d=2: { (1,-1), (-1,-1), (-1,1), (1,1) } d=4: { (2,0), (0,2), (-2,0), (0,-2) } d=5: { (1,2), (-1,2), (1,-2), (-2,1), (-2,-1), (2,-1), (2,1), (-1,-2) } d=8: { (2,2), (-2,2), (-2,-2), (2,-2) } d=9: (0,3), (-3,0), (0,-3), (3,0) d=10: (1,3), (-1,3), (3,1), (-3,1), (-3,-1), (1,-3), (-1,-3), (3,-1) d=13: (2,-3), (-3,-2), (3,-2), (-2,-3), (-3,2), (3,2), (-2,3), (2,3) d=16: (0,-4), (-4,0), (4,0), (0,4) d=17: (-4,1), (-4,-1), (4,1), (1,-4), (4,-1), (-1,-4), (-1,4), (1,4) d=18: (3,-3), (-3,-3), (-3,3), (3,3) d=20: (4,2), (4,-2), (-4,-2), (2,-4), (-4,2), (-2,-4), (-2,4), (2,4) d=25: (-3,-4), (-5,0), (5,0), (4,3), (-3,4), (-4,3), (0,-5), (4,-3), (-4,-3), (3,-4), (3,4), (0,5) The first 14 iterations are depicted as: 13 131210 9101213 1311 8 7 6 7 81113 12 8 5 4 3 4 5 812 10 7 4 2 1 2 4 710 13 9 6 3 1 0 1 3 6 913 10 7 4 2 1 2 4 710 12 8 5 4 3 4 5 812 1311 8 7 6 7 81113 131210 9101213 13 For a finite range of $(x, y)$, a trivial algorithm is to store all coordinates within the range into a list, and then sort the coordinates with $d$. However, this will need $O(n\log n)$ time and $O(n)$ space. Another possible approach is to solve the diophantine equation $x^2 + y^2 = m$ for $m = 0, 1, \ldots, ... d_\mathrm{max}$. But it seems also a hard problem. Is there any simpler way with lower time/space complexity? Here is a C++ code of the trivial solution for reference.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765587105448, "lm_q1q2_score": 0.8599066841148028, "lm_q2_score": 0.8774767890838836, "openwebmath_perplexity": 268.1049576982941, "openwebmath_score": 0.6815122365951538, "tags": null, "url": "https://math.stackexchange.com/questions/1740130/how-to-enumerate-2d-integer-coordinates-ordered-by-euclidean-distance" }
Here is a C++ code of the trivial solution for reference. • As far as storing goes, you can certainly take advantage of symmetries and perhaps more generally use the Sum of Squares function $r_2(n)$ (or $r'_2(n)$ if you're not interested in order/signs). I will also link this mathoverflow question as it seems to answer precisely what you desire. – Fimpellizieri Jun 28 '16 at 22:54 • Why the complexity of the trivial algorithm is not $O(n^2)$? – user84976 Jun 29 '16 at 10:35 • Your $n$ seems to be the number of points in your grid, not the edge length of the grid, right? So in terms of the edge length $a$, you get $O(a^2\log a)$ time complexity and $O(a^2)$ space complexity. But you can't go asymptotically lower than $O(a^2)$ time complexity since you have to enumerate this many points. Are you interested in tweaking constants here, or only in getting rid of the $\log a$ term or reducing the space complexity? – MvG Jul 5 '16 at 12:29 You can employ symmetry to only generating one eighth of a circle, e.g. $0\le x\le y$. It should be obvious how to do this. You can reduce the space complexity to $O(r)=O(\sqrt n)$, i.e. linear in the radius of your disk, not in the number of grid points it covers. The way to do this is by considering parallel lines of grid points. Then on each line you know that the points will be enumerated starting closest to the center and moving outwards, so it is enough to keep track of the next candidate on each line. The most appropriate data structure for this keeping track is most likely a priority queue, which will give you quick access to the element with minimal $d$. But even then, elementary operations in a priority queue have $O(\log n)$ time complexity. Which in this case means you are still at $O(r^2\log r)=O(n\log n)$ overall time complexity since you enumerate $O(r^2)$ elements and maintain a data structure where you have to perform two $O(\log r)$ operations for each of them.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765587105448, "lm_q1q2_score": 0.8599066841148028, "lm_q2_score": 0.8774767890838836, "openwebmath_perplexity": 268.1049576982941, "openwebmath_score": 0.6815122365951538, "tags": null, "url": "https://math.stackexchange.com/questions/1740130/how-to-enumerate-2d-integer-coordinates-ordered-by-euclidean-distance" }
Here is an implementation of these ideas. The core portions are these: struct Pt { // essentially your struct Point, just shorter names int x, y, d; Pt(int x, int y) : x(x), y(y), d(x*x + y*y) {} bool operator<(const Pt& p) const { return d > p.d; } // flipped! }; void enumerateGridPoints(int r) { priority_queue<Pt> q; q.push(Pt(0, 0)); int d, level = -1; while ((d = q.top().d) <= r*r) { reportLevel(++level, d); do { Pt p = q.top(); q.pop(); reportPoint(p); if (p.y < p.x) q.push(Pt(p.x, p.y + 1)); if (p.y == 0) q.push(Pt(p.x + 1, 0)); } while (q.top().d == d); } } Since the C++ std::priority_queue is a max queue by default, and since I'm lazy, I just flipped the sign in the comparison operation so that the element with smallest d is the maximal element and thus extracted next. One benefit of the above algorithm compared to yours is that it's easy to modify it so that enumerates points without any preset limit. That might be useful if you'd like to e.g. inspect sites until you find something you are looking for, but you don't know up front how long you will have to search until you find it. Both time and space complexity scale with the generated output, so small initial portions can be obtained quickly while still allowing you to proceed to larger results. Edsger Dijkstra gives an elegant recursive solution to the problem of finding solutions to $x^2 + y^2 = m$ in his 1976 book The Discipline of Programming. The solution is outlined here, and involves sweeping potential $x$ values down from $\sqrt m$ and $y$ values up from 0. Consider the function $B(x, y)$ that returns solutions between $x$ and $y$, defined recursively as follows: $$B(x, y) = \begin{cases} \varnothing, & \text{if x < y (base case)} \\ (x, y) \cup B(x-1, y+1), & \text{if x^2 + y^2 = m (satisfying case)} \\ B(x, y+1), & \text{if x^2 + y^2 < m} \\ B(x-1, y), & \text{if x^2 + y^2 > m} \\ \end{cases}$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765587105448, "lm_q1q2_score": 0.8599066841148028, "lm_q2_score": 0.8774767890838836, "openwebmath_perplexity": 268.1049576982941, "openwebmath_score": 0.6815122365951538, "tags": null, "url": "https://math.stackexchange.com/questions/1740130/how-to-enumerate-2d-integer-coordinates-ordered-by-euclidean-distance" }
Using this definition, you can calculate $B(\sqrt m, 0)$ for each $m=0,1,…,d_{max}$. Written as a generator or iterator, this algorithm will have constant space complexity. • Would you agree that the time complexeity is $O(r^3)$ here (with $r=\sqrt{d_{\text{max}}}$), since for each of the $O(r^2)$ possible values for $m$ you'd have $O(r)$ steps of evaluating $B$ till you reach the base case? – MvG Jul 6 '16 at 11:25
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765587105448, "lm_q1q2_score": 0.8599066841148028, "lm_q2_score": 0.8774767890838836, "openwebmath_perplexity": 268.1049576982941, "openwebmath_score": 0.6815122365951538, "tags": null, "url": "https://math.stackexchange.com/questions/1740130/how-to-enumerate-2d-integer-coordinates-ordered-by-euclidean-distance" }
Solve for $y''+2y'+y = \frac{e^{-t}}{t^{2}}$ I need some help in finding the solution to this second-order non-homogeneous DE. I know how to find the solution of the reduced equation $$y''+2y'+y=0.$$ The characteristic equation $r^{2}+2r+1=0$ yields real and repeated roots $r=-1$. So the complementary solution, $$y_{c}= c_{1}e^{-t} + c_{2}te^{-t}$$. Now what I am struggling with is making educated guesses about coming up with a particular solution. So any suggestions on that would be helpful. EDIT1: I haven't learned about the method of variation of parameters yet and wanted to do this with the method of undetermined coefficients. Please feel free to post the solution by using any of the techniques so I can learn from it. EDIT2: Our fundamental pair of solutions for the corresponding homogeneous is $y_{1}=e^{-t}$, and $y_{2}=t e^{-t}$. We know that our particular solution will be of the form, $y_{p} = u_{1} y_{1} + u_{2} y_{2}$. The determinant of the Wronskian, $W = e^{-2t}$, with $W_{1} = -t^{-1} e^{-2t}$, and $W_{2} = t^{-1} e^{-2t}$. So $u'_{1} = \frac{W_{1}}{W} = -\frac{1}{t}$, and $u'_{2} = \frac{W_{2}}{W} = \frac{1}{t}$. So $u_{1} = -\int \frac{1}{t} dt = -ln|t|$, and $u_{2} = \int \frac{1}{t} dt = ln|t|$. Hence, $y_{p} = -ln|t| e^{-t} + ln|t|te^{-t}$. So our general solution, $$y = y_{c} + y_{p} = e^{-t}(c_{1}+c_{2}t-ln|t|+ln|t|t).$$ Does it look okay?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765575409524, "lm_q1q2_score": 0.8599066705287968, "lm_q2_score": 0.8774767762675405, "openwebmath_perplexity": 618.5832328469735, "openwebmath_score": 0.9999784231185913, "tags": null, "url": "https://math.stackexchange.com/questions/1134255/solve-for-y2yy-frace-tt2/1134495" }
Does it look okay? • Generally you only do particular solutions if it's a polynomial times a sine/cosine times an exponential, not a rational function. I'd use variation of paramaters – Alan Feb 5 '15 at 1:55 • @Alan I haven't learned that technique yet. Is it the method of undetermined coeffecients? – OGC Feb 5 '15 at 1:57 • What techniques have you learnt? – mattos Feb 5 '15 at 2:22 • @Mattos Separation of variables technique and learned method of undetermined coefficients today. Seeing youtube videos on change of var technique. Is it possible to solve this problem by the method of undetermined coefficients technique? – OGC Feb 5 '15 at 2:26 • @user36829 If you want, I'll post a solution using variation of parameters. – mattos Feb 5 '15 at 3:50 $$y_h = c_1e^{-t} + c_2te^{-t}$$ with $$y_1 = e^{-t} \ \ \ \ \ y_2 = te^{-t}$$ Taking the Wronskian, you also found $$W = e^{-2t}$$ The particular solution is given by the formula $$y_p = -y_1 \int \frac{y_2 g(t)}{W} dt + y_2 \int \frac{y_1 g(t)}{W} dt$$ where $$g(t) = \frac{e^{-t}}{t^{2}} = t^{-2}e^{-t}$$ Hence \begin{align} y_p &= -e^{-t} \int \frac{te^{-t} \cdot t^{-2}e^{-t}}{e^{-2t}} dt + te^{-t} \int \frac{e^{-t} \cdot t^{-2}{e^{-t}}}{e^{-2t}} dt \\ &= -e^{-t} \int \frac{1}{t} dt + te^{-t} \int \frac{1}{t^{2}} dt \\ &= -e^{-t} \ln(t) - \frac{te^{-t}}{t} \\ &= -e^{-t}(\ln(t) + 1) \\ \end{align} Therefore, \begin{align} y &= y_h + y_p \\ &= e^{-t}(c_1 + c_2 t - \ln(t) - 1) \\ \end{align} You can check by differentiation that this satisfies the ODE. • $-1\cdot e^{-t}$ is an unnecessary part of the solution since it solves the homogeneous equation. I.e. the $-$ can be 'absorbed' into the $c_1$ coefficient. – jdods Mar 5 '15 at 1:58 • @jdods Yeah and? – mattos Mar 5 '15 at 8:38
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765575409524, "lm_q1q2_score": 0.8599066705287968, "lm_q2_score": 0.8774767762675405, "openwebmath_perplexity": 618.5832328469735, "openwebmath_score": 0.9999784231185913, "tags": null, "url": "https://math.stackexchange.com/questions/1134255/solve-for-y2yy-frace-tt2/1134495" }
In this case of only one characteristic value, also a change of function can help. Substitute, according to the homogeneous solution, $y(t)=e^{-t}u(t)$ to get for $u$ $$u''(t)=t^{-2}\implies u'(t)=-t^{-1}+C\implies u(t)=-\ln|t|+Ct+D$$ and thus $$y(t)=e^{-t}(-\ln|t|+Ct+D)$$ I'll use the formula I developed here $$Y_p=y_h\int \left\{y_h^{-2} W_0 \left(\int y_h W_0^{-1} g \ dt\right)\right\} \ dt$$ where the Wronskian (up to a constant multiple) is $$W_{0}=\exp\left(-{\int p \ dt}\right)$$ and a solution to the homogeneous equation is $y_h=e^{-t}$ (we can use either). So we first integrate $$W_{0}=\exp\left(-{\int 2 \ dt}\right)=e^{-2t}$$ and then we'll find the particular solution by \begin{aligned} Y_p&=e^{-t}\int \left\{e^{2t} e^{-2t} \left(\int e^{-t} e^{2t} \frac{e^{-t}}{t^2} \ dt\right)\right\} \ dt \\ &=e^{-t}\int \left(\int \frac{1}{t^2} \ dt\right) \ dt \\ &=e^{-t}\int \left(-\frac{1}{t}\right) \ dt \\ &=-e^{-t}\ln t. \end{aligned} This is a nice formula because you only need one solution to the homogeneous equation.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765575409524, "lm_q1q2_score": 0.8599066705287968, "lm_q2_score": 0.8774767762675405, "openwebmath_perplexity": 618.5832328469735, "openwebmath_score": 0.9999784231185913, "tags": null, "url": "https://math.stackexchange.com/questions/1134255/solve-for-y2yy-frace-tt2/1134495" }
# Does the interval $[x, x + 10 x^{1/4})$ contain a sum of two squares? Is it true that there exist an integer $N \in \mathbb N$ , such that $\forall x > N$ , the interval $[x, x+10x^{1/4} )$ always contains a sum of two squares ? I know that $n \in \mathbb N$ is a sum of two squares iff it is of the form $n=q_1^{2a_1}...q_m^{2a_m}p_1^{k_1} ... p_r^{k_r}$ where $q_1,...,q_m,p_1,...,p_r$ are primes such that $q_i \equiv 3( \mod 4)$ and $a_1,...,a_m, k_1,...,k_r$ are non-negative integers ; where $m , r\ge 0$ . So it is enough to prove that for large enough $x$ , the interval $[x , x+10x^{1/4})$ always contains such a positive integer . But I don't know how to prove this. • Reading about the Gauss circle problem would be a good starting point. – Daniel Fischer Jul 30 '17 at 19:01 • For me to start: where did you get the problem/conjecture? Is it stated as something definitely true or as an open problem? It is reasonable, by the way, as the count of numbers up to large $z$ that are sums of two squares is about $$\frac{Cz}{\sqrt {\log z}}$$ with (known) positive constant $C.$ – Will Jagy Jul 30 '17 at 19:19 • @WillJagy : For the source of the problem ; it was asked as an open ended question in the class by our professor . Where do you get the asymptotic formula about the count ? Could you please give any reference ? Thanks – user Jul 31 '17 at 15:54 • store.doverpublications.com/0486425398.html – Will Jagy Jul 31 '17 at 18:20 You might try to proceed greedily. Suppose we want to find a number that is "near" (but less than) $x$ that is a sum of two squares. Maybe one of these squares will be the largest square less or equal to $x$, which I'll denote by $a$. (So $a = \lfloor \sqrt x \rfloor^2$), where $\lfloor \cdot \rfloor$ is the "floor" function, or the "greatest integer below function"). In this case, the second square, which I'll call $b$, should be chosen to be the greatest square less than or equal to $x - a$. (So $b = \lfloor \sqrt{x - a} \rfloor^2$).
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.985718068592224, "lm_q1q2_score": 0.8598885742162704, "lm_q2_score": 0.8723473796562744, "openwebmath_perplexity": 110.03396638452213, "openwebmath_score": 0.91339111328125, "tags": null, "url": "https://math.stackexchange.com/questions/2376879/does-the-interval-x-x-10-x1-4-contain-a-sum-of-two-squares" }
This gives us a candidate sum of squares $a + b$, which is relatively close to $x$. Now we ask, how close does this get us? How large is $x - a - b$? This really asks, how close is $x$ to the largest square up to $x$? That is, how close is $x$ to $a = \lfloor \sqrt x \rfloor^2$? Note that $$x - \lfloor \sqrt x \rfloor^2 = (\sqrt x - \lfloor \sqrt x \rfloor)(\sqrt x + \lfloor \sqrt x \rfloor) \leq (1) \cdot (2 \sqrt x) \leq 2 \sqrt x.$$ So the largest square up to $x$ is no more than $2 \sqrt x$ away from $x$. Thus $x - a \leq 2 \sqrt x$. Iterating, we have that $$(x - a) - b \leq 2 \sqrt{x - a} \leq 2 (\sqrt {2 \sqrt x}) = 2^{3/2} x^{1/4}.$$ We have shown that given an $x$, the nearest "greedy" sum of squares is at most $2^{3/2} x^{1/4}$ away. So we've shown that there is a sum of squares in intervals of the shape $(x - 2^{3/2} x^{1/4}, x]$, which clearly implies the original question. In comments, Will Jagy noted that the density of numbers which are sums of two squares is of the shape $Cx/\sqrt{\log x}$, where $C$ is the Landau-Ramanujan constant. It is conjectured that the gaps between numbers which are sums of squares shouldn't deviate too far from what is expected from the density, and in particular is bounded by $x^\epsilon$ for any $\epsilon > 0$. In particular it is conjectured that there is a number which is a sum of two squares in the interval $[x, x + x^{\epsilon})$ for any $\epsilon > 0$, for $x$ sufficiently large. This answer shows that the gap between numbers which are sums of squares is at most $2^{3/2}x^{1/4}$, which is a far cry from $x^{\epsilon}$. In general, there are not good uniform improvements over what's presented above. But there are remarkable on-average bounds due to Hooley, showing for instance that almost all (in the density sense) gaps between sums of squares is no more than $(\log x) (\log \log x)$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.985718068592224, "lm_q1q2_score": 0.8598885742162704, "lm_q2_score": 0.8723473796562744, "openwebmath_perplexity": 110.03396638452213, "openwebmath_score": 0.91339111328125, "tags": null, "url": "https://math.stackexchange.com/questions/2376879/does-the-interval-x-x-10-x1-4-contain-a-sum-of-two-squares" }
# Find the inverse of a lower triangular matrix of ones Find the inverse of the matrix $A=(a_{ij})\in M_n$ where $$\begin{cases} a_{ij}=1, &i\geq j,\\ a_{ij}=0, &i<j. \end{cases}$$ The only method for finding inverses that I was taught was by finding the adjugate matrix. So $A^{-1}=\frac{1}{\det A}\operatorname{adj(A)}$ $$A=\begin{pmatrix} 1 & 0 &0 &\ldots &0\\ 1 & 1 & 0 &\ldots &0\\ 1 & 1 & 1 &\ldots &0\\ \vdots &\vdots & \vdots &\ddots & \vdots\\ 1 & 1 &1 & \ldots &1 \end{pmatrix}$$ This is a triangular matrix so $\det A=1.$ To find the adjugate I first need to find the cofactor matirx$(C)$ of $A$. $$C=\begin{pmatrix} 1&-1&0&0&\ldots &0\\ 0 & 1& -1 &0&\ldots & 0\\ 0 & 0 & 1 & -1&\ldots &0\\ 0 & 0 & 0 &1 &\ldots &0\\ \vdots &\vdots &\vdots &\vdots&\ddots & \vdots\\ 0 & 0 &0 &0 &\ldots &1\end{pmatrix}$$ $$C^T=\operatorname{adj}(A)=\begin{pmatrix} 1 & 0 & 0 & 0&\ldots &0\\ -1 & 1& 0 & 0 &\ldots &0\\ 0&-1&1&0&\ldots &0\\ 0& 0 &-1 &1 &\ldots&0\\ \vdots &\vdots &\vdots &\vdots &\ddots&\vdots\\ 0&0&0&0&\ldots &1\end{pmatrix}=A^{-1}$$ Is this correct? Also, can I leave it like that or should I somehow write it more formally? • try using elementary row operations. – vidyarthi Jan 24 '17 at 10:11 • Looks all right. – StubbornAtom Jan 24 '17 at 10:25 • Try multiplying your proposed $A^{-1}$ by $A$ to see whether you get the identity matrix. – Gerry Myerson Jan 24 '17 at 11:38 Yes, your inverse is correct. Let me show you an alternative approach of finding this inverse without the use of the adjugate matrix.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9857180627184411, "lm_q1q2_score": 0.8598885641853226, "lm_q2_score": 0.8723473746782093, "openwebmath_perplexity": 117.00378915905104, "openwebmath_score": 0.953346312046051, "tags": null, "url": "https://math.stackexchange.com/questions/2111562/find-the-inverse-of-a-lower-triangular-matrix-of-ones" }
Denote $A_n$ as the $n \times n$ matrix that has elements $a_{ij} = 1$ if $i \geq j$, and $0$ otherwise. Then, $A_n$ can be constructed by applying the elementary row operations $$R_2 + R_1, R_3 + R_2, \ldots, R_n - R_{n-1}$$ to the identity matrix $I_n$. So, $$A_n = \prod_{i=1}^{n-1} E_i,$$ where $E_i$ is the elementary matrix representing the row operation $R_{i+1} - R_i$. Since det$(A)$ is nonzero, it is invertible, hence $$B_n = \left( A_n \right)^{-1} = \prod_{i = n-1}^{1} {E_i}^{-1},$$ where ${E_i}^{-1}$ is the row operation $R_{i+1} - R_i$. That is, $B_n$ can be constructed by applying the row operations $$R_n - R_{n-1}, R_{n-1} - R_{n-2},\ldots,R_2 - R_1$$ to the idenity matrix $I_n$. The inverse of $A_n$ is therefore given by the matrix $$B_n = \begin{pmatrix} \phantom{-}1 & \phantom{-}0 &\phantom{-}0 &\ldots &0\\ -1 & \phantom{-}1 & \phantom{-}0 &\ldots &0\\ \phantom{-}0 & -1 & \phantom{-}1 &\ldots &0\\ \phantom{-}\vdots &\phantom{-}\vdots & \phantom{-}\vdots &\ddots & \vdots\\ \phantom{-}0 & \phantom{-}0 & \phantom{-}0 & \cdots &1 \end{pmatrix}.$$ In order to check that this is the correct inverse, you can use the identity $$A_nB_n = I_n.$$ • How can we write this inverse like this $B_n=(b_{ij})= \begin{cases} 1, &i= j,\\ -1, &i-j=1\\ 0, & ? \end{cases}$ When is $(b_{ij})=0$? – lmc Jan 24 '17 at 13:31 • $b_{ij}$ is $1$ if $i =j$, $-1$ if $i = j + 1$ and $0$ otherwise. – user394255 Jan 24 '17 at 13:33 I would like to present a very simple solution by interpretation of these matrices as operators on $\mathbb{R^n}$ (which will surprise nobody...). Triangular matrix $A$ acts as a discrete integration operator: For any $x_1,x_2,x_3,\cdots x_n$: $$\tag{1}A (x_1,x_2,x_3,\cdots x_n)^T=(s_1,s_2,s_3,\cdots s_n)^T \ \ \text{with} \ \ \begin{cases}s_1&=&x_1&&&&\\s_2&=&x_1+x_2&&\\s_3&=&x_1+x_2+x_3\\...\end{cases}$$ (1) is equivalent to:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9857180627184411, "lm_q1q2_score": 0.8598885641853226, "lm_q2_score": 0.8723473746782093, "openwebmath_perplexity": 117.00378915905104, "openwebmath_score": 0.953346312046051, "tags": null, "url": "https://math.stackexchange.com/questions/2111562/find-the-inverse-of-a-lower-triangular-matrix-of-ones" }