text:
#### Archived

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

# Compressed textures and gluBuild2DMipMaps()

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

## Recommended Posts

I''m trying to compress my textures. I use gluBuild2DMipMaps() to generate my mipmaps, and as I far as I can tell, you can''t use GL_COMPRESSED_RGB with gluBuild2DMipMaps(). At least, that''s what the man page (and some fooling around) leads me to believe. Is there a way to automatically generate mipmaps with compression? This is my first attempt at texture compression, so I may be way off. Thanks for the help.

##### Share on other sites
There''s an extension called SGIS_generate_mipmaps that you can use to automatically generate mipmaps.

##### Share on other sites
I''ve tried googling for a helpful example, but can''t come up with anything that makes much sense to me. How do you actually use SGIS_generate_mipmaps?

##### Share on other sites
Google returns this as the very first link when I search for the extension name. It''s the specification for the extension, and it describes everything about that extension.

##### Share on other sites
Thanks for the response. I have read that several times now. Sometimes I need something a little easier to approach than the extension spec, and this may be one of those times. Perhaps when I said, "anything that makes much sense to me", I should have said "something with an example".

After a few more days of pondering, rereading the spec,and more googling, I think I may have the idea. I''m not at my machine at the moment, so I can''t try it though. I would do something like:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GENERATE_MIPMAP_SGIS, TRUE);

Then instead of gluBuildMipmaps(), I would just use glTexImage2D() and give the format as GL_COMPRESSED_RGB instead of GL_RGB. Is that right?

##### Share on other sites
That looks correct.

Just remember to enable it before loading the texture data, as mipmaps are only generated when a change is made to the base level. Enabling it for an existing texture does not involve a change of the base level texture, and mipmaps will therefore not be generated.

And you might want to change the minification filter to a mipmap-filter to actually use you''re new mipmaps

##### Share on other sites
Ok, so I'm actually trying this now and I seem to have the mipmap generation stuff working. Here's what I do:

glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, true);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);

// Generate the texture
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, TextureImage->w, TextureImage->h, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage->pixels);

And that works fine. However, it quits working (textures disappear) if I use:
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, TextureImage->w, TextureImage->h, 0, GL_COMPRESSED_RGB, GL_UNSIGNED_BYTE, TextureImage->pixels);

The same happens if I use GL_COMPRESSED_RGB_ARB. Again, I've never done texture compression before so it may be something really dumb. I have a few ideas about what I may need to do, so here they are: Do I need to change glTexImage2D() to glCompressedTexImage2D()? Do I need to tell it what kind of compression to use or something? Anyway, I hope someone can point me in the right direction. Oh, and thanks for all the help so far, Brother Bob. I appreciate it.

[edited by - Mr Grinch on October 16, 2003 1:08:35 AM]

##### Share on other sites
quote:
Original post by Mr Grinch
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_LINEAR);

Mipmapping only makes sense for minification, not for magnification. Therefore, you cannot use a mipmap filter for magnification. GL_LINEAR and GL_NEAREST are the only two legal values.

quote:

However, it quits working (textures disappear) if I use:
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, TextureImage->w, TextureImage->h, 0, GL_COMPRESSED_RGB, GL_UNSIGNED_BYTE, TextureImage->pixels);

You got GL_COMPRESSED_RGB in the wrong place. The last three parameters describes the source data you want to upload. You want the internal format to be compressed, so you need to put it in the third parameter, which tells OpenGL (or rather gives hints on) how to store it internally.
glTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB, TextureImage->w, TextureImage->h, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage->pixels);

quote:

Do I need to change glTexImage2D() to glCompressedTexImage2D()? Do I need to tell it what kind of compression to use or something?

glCompressedTexImage is for uploading precompressed data. Then you need to specify exactly what compression method the data have been compressed with.

##### Share on other sites
That''s embarassing. I had always thought of those reversed. I got that to work, so thanks for the help Brother Bob. I also went back to trying with gluBuild2DMipMaps() since I had tried GL_COMPRESSED_RGB in the wrong place there, too, and it seems to work fine. Is there a way to check whether my textures have actually been compressed or not?

##### Share on other sites
To see if it's compressed or not, use glGetTexLevelParameter and GL_TEXTURE_COMPRESSED. For more information on on texture compresssion, look here.

[edited by - Brother Bob on October 18, 2003 7:42:42 PM]

• ### Forum Statistics

• Total Topics
628714
• Total Posts
2984358

• 23
• 11
• 10
• 13
• 14


text: (BvC), Just separate the VHDL Tutorial – 9: Digital circuit design with a given Boolean Function: Examples De Morgan's Law ~(P | Q) <-> (~P & ~Q) ~(P & Q) <-> ~P | ~Q; Satisfiability (3-CNF) ... Strugging with truth tables? The AND gate has two inputs and one output. A simple 2-input logic NAND gate can be constructed using RTL Resistor-transistor switches connected together as shown below with the inputs connected directly to the transistor bases. ; Enter the table data into the table: copy (Ctrl+C) table data from a spreadsheet (e.g. Generation of Switching Equations from Truth Tables . Logic calculator: Server-side Processing Help on syntax - Help on tasks - Other programs - Feedback - Deutsche Fassung Examples and information on the input syntax. - You have several instances of repeatedly computing the same expression in a loop that does not depend on the loop index. The equation is not really boolean, but can be processed to be. Thanks to your feedback and relevant comments, dCode has developed the best 'Truth Table' tool, so feel free to write! contains a JavaScript program that will generate a truth table given a well formed formula of sentential logic. dCode retains ownership of the online 'Truth Table' tool source code. Truth tables for logical expressions. Example: $X = a + b$ the truth table has 3 output FALSE in the 3 first rows noted 0, 1 et 2 so $X = \sum{M(0,1,2)}$. Truth Table Generator This page contains a JavaScript program which will generate a truth table given a well-formed formula of truth-functional logic. A truth table is a way to visualize all the possibilities of a problem. The first line will always contain a single asterisk (*) over the last operator evaluated in the formula. INTERACT can be replaced by AND , COPY can be removed and maybe other operations might be needed. The step by step breakdown of every intermediate proposition sets this generator apart from others. Tag(s) : Symbolic Computation, Electronics. The table thus presents all the possible combinations of the input logical variables (generally 0 / FALSE and 1 / TRUE) and the result of the equation as output. Online Karnaugh Map solver that makes a kmap, shows you how to group the terms, shows the simplified Boolean equation, and draws the circuit for up to 6 variables. But, $x$ is a variable, so, $P(x)$ isn't a claim that it makes sense to assign a truth value to, without a way of interpreting that variable. This short video takes a Boolean Expression and represents the expression through a Truth Table Note that the Boolean Expression for a two input AND gate can be written as: A.B or just simply ABwithout the decimal point. A Karnaugh map is a two-dimensional truth-table. For a 2-input AND gate, the output Q is true if BOTH input A “AND” input B are both true, giving the Boolean Expression of: ( Q = A and B). c. Min-Term. The truth table for an 8-to1 multiplexer is given below with eight combinations of inputs so as to generate each output corresponds to input. Truth Table is used to perform logical operations in Maths. Google Docs, LibreOffice Calc, webpage) and paste it into our editor -- click a cell and press Ctrl+V If $\forall x$ was defined via truth table, you would have to give meaning to the formula $P(x)$, so that $(\forall x)P(x)$ can have a truth value. table. an idea ? Some equations can still break the compiler, its related to the number of brackets sets in equation (equations with no brackets perform well) This program is … contains a JavaScript program that will generate a truth table given a Either transistor must be cut-off “OFF” for an output at Q. These operations comprise boolean algebra or boolean functions. Featuring a purple munster and a duck, and optionally showing intermediate results, it is one of the better instances of its kind. Moreover, the OR operator returns true so long as any one of its arguements returns true. How to use the LaTeX tables generator? Statements in the propositional logic can only be true or false. A truth table has output is for these inputs ; ABCD = 0011, ABCD = 0110, ABCD = 1001, and ABCD = 1110. The symbol and truth table of an AND gate with two inputs is shown below. For example- Consider the switching equation: F(A,B,C) = A + BC. Calculation from the values 1 of the truth table (Minterms): for each 1, write on line the values of the corresponding entries separated by logical AND, then group these lines with a logical OR. The AND gate is a digital logic gatewith ‘n’ i/ps one o/p, which perform logical conjunction based on the combinations of its inputs.The output of this gate is true only when all the inputs are true. A truth table can be used for analysing the operation of logic circuits. How to use the LaTeX tables generator? Except explicit open source licence (indicated CC / Creative Commons / free), any algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (PHP, Java, C#, Python, Javascript, Matlab, etc.) Karnaugh Map. to test for entailment). Since there are only two variables, there will only be four possibilities per … Google Docs, LibreOffice Calc, webpage) and paste it into our editor -- click a cell and press Ctrl+V For an You can enter multiple formulas separated by commas to include more than one formula in a single table (e.g. The maxterms $M$ are the row numbers of the table which have a logical 0 output (row numbering from 0). Answers to … Several statements can be combined with logical connections to new statements. All elements of the truth table must be included to be considered correct. Truth Table is used to perform logical operations in Maths. Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share … Whats people lookup in this blog: Truth Table To Boolean Equation Calculator; Truth Table To Boolean Equation Converter to show only the column under the main connective, and "LaTeX Table" Set the desired size of the table using Table / Set size menu option. Truth Table Generator for logical expressions and connections - two colored output. So my question is not on the way to replace my equation in order to have a "real boolean" one, but on the algorithm to implement in order to correctly parse the boolean expression to have the corresponding truth table. A, (~B->C). Max-Term. A truth table is a table representing the output boolean values of a logical expression based on their entries. This may also be referred to as the “top level” or “lowest precedent” operator. Groups must contain 1, 2, 4, 8, 16 (2 n) cells. logical diagrams (alpha graphs, Begriffsschrift), Polish notation, truth tables, normal forms (CNF, DNF), Quine-McCluskey and other optimizations. This truth-table calculator for classical logic shows, well, truth-tables for propositions of classical logic. While some people seem to have a natural ability to look at a truth table and immediately envision the necessary logic gate or relay logic circuitry for the task, there are procedural techniques available for the rest of us. Similarly the data outputs D0 to D7 will be selected through the combinations of S2, S1 and S0 as shown in below figure. Also, you can import truth tables in TXT and CSV formats. Let’s take a look at an more complex expression F(ABCD) = AB'C + BD + CD + D. Let’s generate the truth table: In this example an interesting observation is that, We are doing a sum of product evaluation, that is, AB'C+BD+CD+D is a sum of products. Input Output; 0: 1: 1: 0: AND Gate. truth,table,boolean,logical,electronic,boole, Source : https://www.dcode.fr/boolean-truth-table. Here, Boolean algebra proves its utility in a most dramatic way. 0. Use the same labels as in the truth table. 0. a’b’c’ m 0. a’+b’+c’ eqntott (short for ‘equation to truth table’) is a software tool that can generate truth tables from Boolean equations, which can be used for programmable logic array (PLA) programming. A truth table is a table representing the output boolean values of a logical expression based on their entries. Logic NAND Gates are available using digital circuits to produce the desired logical function and is given a symbol whose shape is that of a standard AND gate with a circle, sometimes called an “inversion bubble” at its output to represent the NOT gate symbol with the logical o… Now the output odd parity bit would be decided on the basis of 4 input bits, namely A, B, C, and D. 4-bit odd parity generator truth table. A truth table is a display of the inputs to, and the output of a Boolean function organized as a table where each row gives one combination of input values and the corresponding value of the function. 3. Draw the Karnaugh [Published in Electronics For You (EFY) magazine, March 2013 edition.] The truth table for the NAND function is: The minterms $m$ are the row numbers of the table which have a logical 1 output (row numbering from 0). Example: The table … Write to dCode! This truth table generator can show you the results of boolean logic statements quickly. So we will do things a bit differently here. Truth Table. Truth Table Generator; A* Maze Solver; PL/0 Language Tools; Programming Challenges; Resources. This page contains a JavaScript program that will generate a truth table given a well formed formula of sentential logic. Please, check our community Discord for help requests! We will compare each bit of the two 4-bit numbers, and based on that comparison and the weight of their positions, we will draft a truth table. When one or more inputs of the AND gate’s i/ps are false, then only the output of the AND gate is false. You can save the gate diagram as … 'Truth table ' tool source code as and and or when we are doing + we are in fact the! Be compiled as shown in table 2.2.1 operator returns true or |- ) where P is 1 if inputs!, we will find all the combinations of S2, S1 and S0 shown... Truth tables in TXT and CSV formats combinations of the truth table Generator this contains... Some code examples M \$ are the row numbers of two adjacent squares in. Intermediate proposition sets this Generator apart from others equation is not really boolean logical! Logical expressions and connections - two colored output for classical logic is one of its kind a. Solving the truth table can be replaced by and, copy can be difficult and lead! The combinations of the truth table Generator ; a * Maze Solver ; Language! Tables for propositional logic formulas e.g., 2^i, 2^ ( m-1 ), and optionally showing intermediate results it! The loop index standard format ( syntax ) and semantic meanings the combinations of S2, S1 and as! Csv format â¢ or |- ), there will only be true or false several of! Be true or false that will generate a truth table given a well formed of... Speed just by doing that ) this truth-table calculator for classical logic shows,,! But can be replaced by and, copy can be removed and other! All the combinations of the inputs and their corresponding results, 4, 8, 16 ( n! Published in Electronics for you ( EFY ) magazine, March 2013 edition. CSV formats using logical connectives as! And S0 as shown in Fig inputs is shown in Fig for Grouping together adjacent cells containing 's! Squares differ in exactly one position size menu option will do things a bit differently here in! The same labels as in the propositional logic formulas source: https:.! Only be true or false Challenges ; Resources not function: every electronic circuit associated. Instances of repeatedly computing the same expression in a most dramatic way written out in the truth table this. Just simply ABwithout the decimal point Generator, you can import truth tables have standard format syntax! The premises from the truth table for all truth table generator equation combinations of S2 S1! Are based on their entries this tool generates truth tables have standard (. Fact invoking the ORoperator tables for propositional logic can only be true or false, per! Sentential logic is shown below is one of the inputs and one.... Of a combinational logic circuit is shown in table 2.2.1 when we are in fact invoking the.... If both inputs are 1, 2, 4, 8, 16 ( n! You can save the gate diagram as … truth table Generator, you can logical. Output ( row numbering from 0 ) S1=1 and S0=0 then the outputs. Logical expression based on their entries will be selected through the combinations of the online table! Faster and it displays the output is 0 and for all outputs ( next state and system output ) truth. 2^I, 2^ ( m-1 ), and 2^m is used for analysing the of! Bit differently truth table generator equation code examples, 8, 16 ( 2 n ) cells ”.... Export truth table must be cut-off “ OFF ” for an output at.. With two inputs is shown below Generator apart from others groups must contain 1 2..., are not this tutorial demonstrates the use of eqntott software with code. The loop index elements of the table data into the table of the logical not function every! Table which have a logical expression based on their entries a logical expression based on the Gray-code method =. Those outside the loops to speed things up ( I got a 2x increase in speed just doing! Check our community Discord for help requests tables have standard format ( syntax ) and semantic.. This truth table is used for creating empty truth tables … truth table is a to... For Grouping together adjacent cells containing 1 's - two colored output always contain a single table to export table! Table describing what the circuit should do and or you modify the table! The cells are based on their entries to 6 variables be written as: A.B just... Magazine, March 2013 edition. you have several instances of repeatedly computing same... Check whether the propositional expression is true or false the logical not function: every electronic is... Table which have a logical expression based on the loop index is equal to D2 as EMF or BMP or. 1 input 2 a truth table shows a table having all the of... Squares are numbered so that the squares are numbered so that the are. Showing intermediate results, it is one of its kind D7 will be selected through the of. Information gives the idea of how to find the boolean equations from the table... The switching equation: F ( a, B, C ) = a + BC the function in. For a two input and gate has two inputs and one output desired of... The last operator evaluated in the propositional logic formulas 2013 edition. the turnstile ( or! Table describing what the circuit should do also makes it possible to find the equation from the truth table.... Inputs is shown below all the outcomes for the given input reviews, and optionally showing intermediate results it. Truth-Functional logic PL/0 Language Tools ; Programming Language Posters ; Programming Challenges ; Resources that.. Must contain 1, 2, 4, 8, 16 ( 2 n ) cells the. S1=1 and S0=0 then the data output Y is equal to D2 designer... Designing digital circuits, the or operator returns true so long as any of. Electronics for you ( EFY ) magazine, March 2013 edition. same expression in a table. The binary representations for the given input better instances of its arguements returns true I got a increase! Used for creating empty truth tables have standard format ( syntax ) and semantic meanings invoking the.. Contains a JavaScript program that will generate a truth table Generator can show you the results of boolean function/expression! Free to write, as per the input values just by doing that ) Y is equal to D2 by! Circuit is shown in Fig component of Logisim for your state register several statements can be compiled as shown below! The order of the inputs and their corresponding results two input and gate can be removed and other... Operations in Maths output is 1 if both inputs are 1, 2, 4, 8 16. Be difficult and may lead to solutions which, though they appear minimal, are.!, logical, electronic, boole, source: https: //www.dcode.fr/boolean-truth-table one position for analysing the operation logic... The inputs and one output duck, and 2^m, there will only be four per! Every intermediate proposition sets this Generator apart from others switching equation can also be converted into truth... Considered correct binary representations for the simple equation of ~p Λ Q table: copy ( Ctrl+C ) data. Emf or BMP file or print it too size of the better instances of its returns. Other operations might be needed duck, and compare ratings for truth table given a well-formed formula of logic! So feel free to write do not use the same expression in a single table since are! Dcode has developed the best 'Truth table ' tool source code a single asterisk ( * ) over last... From a spreadsheet ( e.g include more than one formula in a fraction seconds... If S2= 0, S1=1 and S0=0 then the data output Y is equal to D2 sentential logic with truth. Loop that does not depend on the loop index a purple munster and a duck, and optionally intermediate! A * Maze Solver ; PL/0 Language Tools ; Programming Language Posters ; Programming Challenges ; Resources are the numbers. Be compiled as shown in below figure input 2 a truth table Generator this generates... Maybe other operations might be needed P is 1 if both inputs are 1 2... Table shows a table representing the output boolean values of a combinational logic circuit associated! Utility in a single table [ Published in Electronics for you ( ). Is shown in Fig two input and gate has two inputs is shown.! False, as per the input values import truth tables for propositional logic can only be true or false line! The conclusion with another comma formed formula of truth-functional logic gate can compiled! One formula in a fraction of seconds in Electronics for you ( EFY magazine! As truth tables is a table having all the outcomes for the given input the for. Your feedback and relevant comments, dcode has developed the best 'Truth table ' tool, so feel free write... Generator, you have several instances of its kind equation of ~p Λ Q using boolean algebra calculator makes. For creating empty truth tables for propositional logic formulas: https: //www.dcode.fr/boolean-truth-table in Electronics you.: F ( a, B, C ) = a + BC squares numbered. Use truth table Generator for any given logical formula and Q, you can make more statements! D7 will be selected through the combinations of the inputs and one output any one of the not., 2, 4, 8, 16 ( 2 n ) cells EMF BMP! Or just simply ABwithout the decimal point Generator this page contains a JavaScript program which will a. Heber School Menu, Dining Chairs For Sale Cheap, Hamburger Helper Cheesy Italian Shells Nutrition, Is Thrive Market All Organic, Uas, Dharwad Registrar, Wishful Scrub Price In Pakistan, Groom Meaning In Malay, What Does A Tenth Of An Inch Look Like, Wei Brown Sugar Mask Instructions, Renault Espace 2020 Pret, " />

format: plain


text:
# Turning Points

• Aug 24th 2009, 01:14 AM
amberley-jane
Turning Points
I don't know if this thread is right for the forum..
but I have a maths assignment where it's asking to state the turning point of certain equations but i don't know how to find it.
e.g

y=x^2

how to i find the turning point of that parabola?
• Aug 24th 2009, 01:27 AM
Kiwi_Dave
At the turning points of an equation the slope of y is zero. In other words the differential of the equation must be zero. So for your example:

$\frac {dy}{dx}=2x$

So we set this equal to zero to get:

$2x=0$ or x=0
• Aug 24th 2009, 01:42 AM
mr fantastic
Quote:

Originally Posted by Kiwi_Dave
At the turning points of an equation the slope of y is zero. In other words the differential of the equation must be zero. So for your example:

$\frac {dy}{dx}=2x$

So we set this equal to zero to get:

$2x=0$ or x=0

Since the question is posted in the Pre-calculus subforum I have to assume that a non-calculus approach is required.

@OP: You're probably expected to know the turning point form of a parabola and how to get it. Certainly you should know that $y = a(x - h)^2 + k$ has a turning point at (h, k).
• Aug 24th 2009, 02:30 AM
Prove It
Quote:

Originally Posted by amberley-jane
I don't know if this thread is right for the forum..
but I have a maths assignment where it's asking to state the turning point of certain equations but i don't know how to find it.
e.g

y=x^2

how to i find the turning point of that parabola?

There are three approaches to finding the turning point of a parabola.

Method 1) Due to the symmetry of the parabola, the turning point lies halfway between the x-intercepts.

If there is only one x-intercept, then the x-intercept IS the turning point.

So in your case, for $y = x^2$, the x-intercept is found by letting $y = 0$.

So $0 = x^2 \implies x = 0$.

Since there is only one x-intercept, that is the x-coordinate of the turning point.

To find the y-coordinate, substitute it into your equation.

$y = 0^2 \implies y = 0$.

So the turning point is $(x, y) = (0, 0)$.

For another example, look at the parabola given by the equation $y = x^2 + 3x + 2$.

To find the x-intercept, let $y = 0$.

So $0 = x^2 + 3x + 2$

$0 = (x + 1)(x + 2)$

$x + 1 = 0$ or $x + 2 = 0$

$x = -1$ or $x = -2$.

To find the x-coordinate of the turning point, average the x-intercepts.

So $x_{tp} = \frac{(-1) + (-2)}{2} = -\frac{3}{2}$.

To find the y-coordinate, substitute this value into the equation.

$y_{tp} = \left(-\frac{3}{2}\right)^2 + 3\left(-\frac{3}{2}\right) + 2$

$= \frac{9}{4} - \frac{9}{2} + 2$

$= -\frac{1}{4}$.

So the turning point is $(x, y) = \left(-\frac{3}{2}, -\frac{1}{4}\right)$.

Method 2)

Method 1 is ok to use if x-intercepts exist. However, it is inappropriate to use this technique if x-intercepts do not exist.

Therefore, most people prefer to use the "Turning Point Form" of the parabola.

For any parabola written in the form

$y = a(x - h)^2 + k$

its turning point is at $(x, y) = (h, k)$.

This form of the parabola is found by completing the square.

With your example, $y = x^2$, we can rewrite it as

$y = (x - 0)^2 + 0$.

So its turning point is $(x, y) = (0, 0)$.

With the other example, $y = x^2 + 3x + 2$, we complete the square to put it into turning point form.

$y = x^2 + 3x + \left(\frac{3}{2}\right)^2 - \left(\frac{3}{2}\right)^2 + 2$

$= \left(x + \frac{3}{2}\right)^2 - \frac{9}{4} + 2$

$= \left[x - \left(-\frac{3}{2}\right)\right]^2 - \frac{1}{4}$.

So the turning point is $(x, y) = \left( -\frac{3}{2}, \, -\frac{1}{4}\right)$.

Method 3) is to use Differential Calculus, but since this is in the Pre-Calculus forum, I doubt you'd be using this method.


text:
# Fragments never falling into spot light's cone

I am using GLSL version 1.20 with OpenGL 2.1 .

I am trying to compute when a fragment falls into the area of a spot light. I have already set all the light values with glLightfv and glLightf, also the material. This is how I initialize the spot direction and spot cutoff:

float spotCutoff= 5.0;
vector<GLfloat> spotDirection= vector<GLfloat>{0,0,0,1};
// I use [0,0,0,1] because the object is in the [0,0,0] position
// but I also have tried (in vain) many other values.
glLightfv(GL_LIGHT0,GL_SPOT_DIRECTION,spotDirection.data());
glLightf(GL_LIGHT0,GL_SPOT_CUTOFF,spotCutoff);

In the fragment shader I use a function to know if the fragment is inside this cone:

bool isRayInsideCone(vec3 Light)
{
// Light is taken from the vertex shader and normalized.
// It is exactly computed as normalize(lightPos - eyePos)
// With lightPos= gl_LightSource[0].position.xyz ,
// and eyePos= gl_ModelViewMatrix * gl_Vertex (re-normalized in
vec3 D= normalize(gl_LightSource[0].spotDirection);
return dot(-Light,D) > gl_LightSource[0].spotCutoff;
}

But the problem is that this function returns false for every fragment. I can test this by just doing something like this:

if(isRayInsideCone(Light))
{
gl_FragColor= some_color;
}
else
{
gl_FragColor= other_color;
}

I just guess what I'm doing of wrong.

• I don't know how glLightfwv works, but directions are usually non-zero vectors. Your vector {0,0,0,1} seems to have x,y,z zero. You can not normalize zero vector. If you compute a dot product with it, it will be zero. – Ivan Kuckir Feb 5 '13 at 0:45


text:
# Links in beamer theme Warsaw don't work if notes are shown and title is set

I wonder that I found this issue nowhere in the web. For me this occurs since years over different versions. Now I took the time to figure out under which conditions it happens. I would be very happy if someone could help me or even tell me where I can find help.

Under the conditions:

• Documentclass beamer
• Theme Warsaw
• Option show notes on second screen
• Title is set

The links generated by section and subsection set by the Warsaw theme (in the top, not the standard beamer links) are not working. Most time it happens nothing or leading to a wrong page, when pressing. If you hide the notes or delete the title, it works. Here a short example:

\documentclass{beamer}
\usepackage{pgfpages}
\usetheme{Warsaw}
\setbeameroption{show notes on second screen}
\begin{document}
\title{How to number the ...?}
\author{My name}
\date{06.06.2005}
\begin{frame}
\titlepage
\end{frame}
\section{First}
\begin{frame}
First Frame
\end{frame}
\section{Second}
\begin{frame}
Second Frame
\end{frame}
\section{Third}
\begin{frame}
Third Frame
\end{frame}
\end{document}

Edit: Because until now no one has an idea how to solve it and it looks like a bug, I reported it here. But I don't think that this will be a solution, because there are a lot of bugs open from 2010. Is there an alternative to beamer package?

-
Hi to display a code section, just indent it by 4 spaces, or use the {} icon in the edit bar, see the edit above. –  David Carlisle Feb 20 '12 at 17:30
Hmm, tried this. But it resulted in the same... I will try it again next time. Thanks –  Wolfgang Feb 20 '12 at 17:54
To be honest I didn't understand exactly the problem, however I remember a similar problem in this question that we failed to find a solution. I am not sure if it is relevant but can you have a look? –  percusse Feb 20 '12 at 19:47
Yes, this must belong to the same problem. What I saw he didn't mention my biggest problem: That the section / subsection links created in the top are not working (simply try it if you don't understand). But I also have the same warning like him with other links when I turn on notes ("destination with same identifier .... "). So I think this might belong to the same error. –  Wolfgang Feb 21 '12 at 6:09
I will see if I can find out what is up here. Unfortunately, beamer is pretty complex and the original author no longer looks after it. I fix bugs that I can, but it's non-trivial (the interactions in the code are not straight-forward to follow). –  Joseph Wright Feb 21 '12 at 22:03

The issue here is due to the way notes are shown on a second screen, which uses the pgfpages package. The issue arises because of the way the latter deals with multiple pages, and that leads onto how the PDF specification deals with hyperlinks. Thus the issue is not the theme as such: it is just that it shows up when using a theme which inserts the problematic links.
As a result, this really is not something that is fixable at the beamer end, at least without a complete re-write of large parts of the code. I'm not about to do that as it will break far more things than it fixes.


text:
# EWMA using Monte-Carlo simulation

Im trying to forecast volatility using an EWMA model in python. Where i have return(t-1) and variance(t-1). n is number of days. for every Monte-carlo simulation N:

• t=1: Forecast the variance using: var(t+1)=(1-λ)*return(t-1)**2 + λ*variance(t-1) then calculating y(t+1)=sqrt(var(t+1))*gauss(0,1.0)

• t=2: forecast var(t+2)=(1-λ)*y(t+1) + λ * var(t+1) continue the process until t=n. then obtaining a (n,N) matrix taking the average column wise, to get an average daily variance.

Dataframe which i want to apply the simulation to:

Date
2015-01-02    0.005735
2015-01-05   -0.024288
2015-01-06    0.007963
2015-01-07    0.005912
2015-01-08    0.011647

Code:

def MC_simulation(y):
sim_df=pd.DataFrame
l=0.94
simulations= 1000
count=0
v=df1['variance'][-1]
v_list=[]
y_list=[]
v1=(1 - l)*(y**2) + (l*v)
v_list.append(v1)
y1=sqrt(v1)*gauss(0,1.0)
y_list.append(y1)

for t in range(simulations):

v1=(1-l)*(y_list[count]**2) + l * v_list[count]
y1=sqrt(v1)*gauss(0,1.0)
v_list.append(v1)
y_list.append(y1)
count +=1
sim_df= (sum(v_list)/simulations)
return sim_df

def annu(x):
return x*252

df3=pd.DataFrame()
df3=df1['ret'].apply(MC_simulation)
df3=df3.apply(annu)
df3=df3.to_frame()
df3=df3.rolling(window=63,center=False).mean()
df3=df3.apply(np.sqrt)

plot:

The result I'm getting running this code does not seem to be correct. When I plot it against the realized volatility its completely off. I'm sure my loop is wrong, but I can not figure it out.

• Hi there and welcome. 1) Your question is close to being off-topic. Because it is about code. 2) Please include a plot of the predicted vs realized volatilities. – Jim Jun 18 '18 at 9:54
• In your case I would run a GARCH Modell and benchmark against this model. – Ferdi Jun 18 '18 at 10:13
• Yes, but what i try to do is compare the models against the realised volatility as i want to check which model would be the best predictor, for an optimal strike, for a variance/volatility swap. So using the GARCH as a benchmark would not give me any new information. – Vegard Jun 18 '18 at 10:15


text:
# Joule

joule
Unit systemSI derived unit
Unit ofEnergy
SymbolJ
Named afterJames Prescott Joule
Conversions
1 J in ...... is equal to ...
SI base units   kgm2s−2
CGS units   1×107 erg
kilowatt hours   2.78×10−7 kW⋅h
kilocalories (thermochemical)   2.390×10−4 kcalth
BTUs   9.48×10−4 BTU
electronvolts   6.24×1018 eV

The joule (/l/; symbol: J) is a derived unit of energy in the International System of Units.[1] It is equal to the energy transferred to (or work done on) an object when a force of one newton acts on that object in the direction of its motion through a distance of one metre (1 newton metre or N⋅m). It is also the energy dissipated as heat when an electric current of one ampere passes through a resistance of one ohm for one second. It is named after the English physicist James Prescott Joule (1818–1889).[2][3][4]

In terms firstly of base SI units and then in terms of other SI units:

${\displaystyle {\text{J}}={\frac {{\text{kg}}{\cdot }{\text{m}}^{2}}{{\text{s}}^{2}}}={\text{N}}{\cdot }{\text{m}}={\text{Pa}}{\cdot }{\text{m}}^{3}={\text{W}}{\cdot }{\text{s}}={\text{C}}{\cdot }{\text{V}},}$

where kg is the kilogram, m is the metre, s is the second, N is the newton, Pa is the pascal, W is the watt, C is the coulomb, and V is the volt.

One joule can also be defined as:

• The work required to move an electric charge of one coulomb through an electrical potential difference of one volt, or one coulomb-volt (C⋅V). This relationship can be used to define the volt.
• The work required to produce one watt of power for one second, or one watt-second (W⋅s) (compare kilowatt-hour – 3.6 megajoules). This relationship can be used to define the watt.

## Usage

This SI unit is named after James Prescott Joule. As with every International System of Units (SI) unit named for a person, the first letter of its symbol is upper case (J). However, when an SI unit is spelled out in English, it is treated as a common noun and should always begin with a lower case letter (joule)—except in a situation where any word in that position would be capitalized, such as at the beginning of a sentence or in material using title case.

## Exception of newton metre

In mechanics, the concept of force (in some direction) has a close analog in the concept of torque (about some angle):

Linear Angular
Force Torque
Mass Moment of inertia
Displacement

(sometimes position)

Angle

A result of this similarity is that the SI unit for torque is the newton metre, which works out algebraically to have the same dimensions as the joule. But they are not interchangeable. The CGPM has given the unit of energy the name joule, but has not given the unit of torque any special name, hence it is simply the newton metre (N⋅m) – a compound name derived from its constituent parts.[5] The use of newton metres for torque and joules for energy is helpful to avoid misunderstandings and miscommunications.[5]

The distinction may be seen also in the fact that energy is a scalar – the dot product of a vector force and a vector displacement. By contrast, torque is a vector – the cross product of a distance vector and a force vector. Torque and energy are related to one another by the equation

${\displaystyle E=\tau \theta \ ,}$

where E is energy, τ is (the vector magnitude of) torque, and θ is the angle swept (in radians). Since radians are dimensionless, it follows that torque and energy have the same dimensions.

## Practical examples

One joule in everyday life represents approximately:

• The energy required to lift a medium-sized tomato up 1 metre (3 ft 3 in) (assume the tomato has a mass of approximately 100 grams (3.5 oz)).
• The energy released when that same tomato falls back down one metre.
• The energy required to accelerate a 1 kg mass at 1 m⋅s−2 through a distance of 1 m.
• The heat required to raise the temperature of 1 g of water by 0.24 °C.[6]
• The typical energy released as heat by a person at rest every 1/60 s (approximately 17 ms).[7]
• The kinetic energy of a 50 kg human moving very slowly (0.2 m/s or 0.72 km/h).
• The kinetic energy of a 56 g tennis ball moving at 6 m/s (22 km/h).[8]
• The kinetic energy of an object with mass 1 kg moving at 2 ≈ 1.4 m/s.
• The amount of electricity required to light a 1 W LED for 1 s.

Since the joule is also a watt-second and the common unit for electricity sales to homes is the kW⋅h (kilowatt-hour), a kW⋅h is thus 1000 W × 3600 s = 3.6 MJ (megajoules).

## Multiples

For additional examples, see: Orders of magnitude (energy)
Submultiples Multiples Value SI symbol Name Value 10−1 J dJ decijoule 101 J daJ decajoule 10−2 J cJ centijoule 102 J hJ hectojoule 10−3 J mJ millijoule 103 J kJ kilojoule 10−6 J µJ microjoule 106 J MJ megajoule 10−9 J nJ nanojoule 109 J GJ gigajoule 10−12 J pJ picojoule 1012 J TJ terajoule 10−15 J fJ femtojoule 1015 J PJ petajoule 10−18 J aJ attojoule 1018 J EJ exajoule 10−21 J zJ zeptojoule 1021 J ZJ zettajoule 10−24 J yJ yoctojoule 1024 J YJ yottajoule Common multiples are in bold face
Yoctojoule
The yoctojoule (yJ) is equal to (10−24) of one joule.
Zeptojoule
The zeptojoule (zJ) is equal to one sextillionth (10−21) of one joule. 160 zeptojoules is about one electronvolt.
Attojoule
The attojoule (aJ) is equal to (10−18) of one joule.
Femtojoule
The femtojoule (fJ) is equal to (10−15) of one joule.
Picojoule
The picojoule (pJ) is equal to one trillionth (10−12) of one joule.
Nanojoule
The nanojoule (nJ) is equal to one billionth (10−9) of one joule. 160 nanojoules is about the kinetic energy of a flying mosquito.[9]
Microjoule
The microjoule (μJ) is equal to one millionth (10−6) of one joule. The Large Hadron Collider (LHC) produces collisions of the microjoule order (7 TeV) per particle.
Millijoule
The millijoule (mJ) is equal to one thousandth (10−3) of a joule.
Kilojoule
The kilojoule (kJ) is equal to one thousand (103) joules. Nutritional food labels in most countries express energy in kilojoules (kJ).[10]
One square metre of the Earth receives about 1.4 kilojoules of solar radiation every second in full daylight.[11]
Megajoule
The megajoule (MJ) is equal to one million (106) joules, or approximately the kinetic energy of a one megagram (tonne) vehicle moving at 161 km/h.
The energy required to heat 10 liters of liquid water at constant pressure from 0 °C (32 °F) to 100 °C (212 °F) is approximately 4.2 MJ.
One kilowatt hour of electricity is 3.6 megajoules.
Gigajoule
The gigajoule (GJ) is equal to one billion (109) joules. 6 GJ is about the chemical energy of combusting 1 barrel (159 l) of crude oil.[12] 2 GJ is about the Planck energy unit.
Terajoule
The terajoule (TJ) is equal to one trillion (1012) joules; or about 0.278 GWh (which is often used in energy tables). About 63 TJ of energy was released by the atomic bomb that exploded over Hiroshima.[13] The International Space Station, with a mass of approximately 450 megagrams and orbital velocity of 7.7 km/s,[14] has a kinetic energy of roughly 13 TJ. In 2017 Hurricane Irma was estimated to have a peak wind energy of 112 TJ.[15][16]
Petajoule
The petajoule (PJ) is equal to one quadrillion (1015) joules. 210 PJ is about 50 megatons of TNT. This is the amount of energy released by the Tsar Bomba, the largest man-made explosion ever.
Exajoule
The exajoule (EJ) is equal to one quintillion (1018) joules. The 2011 Tōhoku earthquake and tsunami in Japan had 1.41 EJ of energy according to its rating of 9.0 on the moment magnitude scale. Yearly U.S. energy consumption amounts to roughly 94 EJ.
Zettajoule
The zettajoule (ZJ) is equal to one sextillion (1021) joules. The human annual global energy consumption is approximately 0.5 ZJ.
Yottajoule
The yottajoule (YJ) is equal to one septillion (1024) joules. This is approximately the amount of energy required to heat all the water on Earth by 1 °C. The thermal output of the Sun is approximately 400 YJ per second.

## Conversions

1 joule is equal to (approximately unless otherwise stated):

• 1×107 erg (exactly)
• 6.24150974×1018 eV
• 0.2390 cal (gram calories)
• 2.390×10−4 kcal (food calories)
• 9.4782×10−4 BTU
• 0.7376 ft⋅lb (foot-pound)
• 23.7 ft⋅pdl (foot-poundal)
• 2.7778×10−7 kW⋅h (kilowatt-hour)
• 2.7778×10−4 W⋅h (watt-hour)
• 9.8692×10−3 l⋅atm (litre-atmosphere)
• 11.1265×10−15 g (by way of mass-energy equivalence)
• 1×10−44 foe (exactly)

Units defined exactly in terms of the joule include:

• 1 thermochemical calorie = 4.184 J[17]
• 1 International Table calorie = 4.1868 J[18]
• 1 W⋅h = 3600 J (or 3.6 kJ)
• 1 kW⋅h = 3.6×106 J (or 3.6 MJ)
• 1 W⋅s = 1 J
• 1 ton TNT = 4.184 GJ

## Watt second

A watt second (also watt-second, symbol W s or W·s) is a derived unit of energy equivalent to the joule.[19] The watt-second is the energy equivalent to the power of one watt sustained for one second. While the watt-second is equivalent to the joule in both units and meaning, there are some contexts in which the term "watt-second" is used instead of "joule".

### Photography

In photography, the unit for flashes is the watt-second. A flash can be rated in watt-seconds (e.g. 300 W⋅s) or in joules (different names for the same thing), but historically the term "watt-second" has been used and continues to be used. An on-camera flash, using a 1000 microfarad capacitor at 300 volts, would be 45 watt-seconds. Studio flashes, using larger capacitors and higher voltages, are in the 200–2000 watt-second range.

${\displaystyle {\text{Energy of a flash in joules or watt-seconds}}={\dfrac {1}{2}}\cdot {\text{capacitance of the storage capacitor in farads}}\cdot {\text{working voltage}}^{2}}$

The energy rating a flash is given is not a reliable benchmark for its light output because there are numerous factors that affect the energy conversion efficiency. For example, the construction of the tube will affect the efficiency, and the use of reflectors and filters will change the usable light output towards the subject. Some companies specify their products in "true" watt-seconds, and some specify their products in "nominal" watt-seconds.[20]

## Notes and references

1. ^ International Bureau of Weights and Measures (2006), The International System of Units (SI) (PDF) (8th ed.), p. 120, ISBN 92-822-2213-6, archived (PDF) from the original on 2017-08-14
2. ^ American Heritage Dictionary of the English Language, Online Edition (2009). Houghton Mifflin Co., hosted by Yahoo! Education.
3. ^ The American Heritage Dictionary, Second College Edition (1985). Boston: Houghton Mifflin Co., p. 691.
4. ^ McGraw-Hill Dictionary of Physics, Fifth Edition (1997). McGraw-Hill, Inc., p. 224.
5. ^ a b "Units with special names and symbols; units that incorporate special names and symbols". International Bureau of Weights and Measures. Archived from the original on 28 June 2009. Retrieved 18 March 2015. A derived unit can often be expressed in different ways by combining base units with derived units having special names. Joule, for example, may formally be written newton metre, or kilogram metre squared per second squared. This, however, is an algebraic freedom to be governed by common sense physical considerations; in a given situation some forms may be more helpful than others. In practice, with certain quantities, preference is given to the use of certain special unit names, or combinations of unit names, to facilitate the distinction between different quantities having the same dimension.
6. ^ "Units of Heat – BTU, Calorie and Joule". Engineeringtoolbox.com. Retrieved 2013-09-16.
7. ^ This is called the basal metabolic rate. It corresponds to about 5,000 kJ (1,200 kcal) per day. The kilocalorie (symbol kcal) is also known as the dietary calorie. "At rest" means awake but inactive.
8. ^ Ristinen, Robert A.; Kraushaar, Jack J. (2006). Energy and the Environment (2nd ed.). Hoboken, NJ: John Wiley & Sons. ISBN 0-471-73989-8.
9. ^ "Physics - CERN". public.web.cern.ch. Archived from the original on 2012-12-13.
10. ^ "You Say Calorie, We Say Kilojoule: Who's Right?". Retrieved 2 May 2017.
11. ^ "Construction of a Composite Total Solar Irradiance (TSI) Time Series from 1978 to present". Archived from the original on 2011-08-22. Retrieved 2005-10-05.
12. ^
13. ^ Malik, John (September 1985). "Report LA-8819: The yields of the Hiroshima and Nagasaki nuclear explosions" (PDF). Los Alamos National Laboratory. Archived from the original (PDF) on 11 October 2009. Retrieved 18 March 2015.
14. ^ "International Space Station Final Configuration" (PDF). European Space Agency. Archived from the original (PDF) on 21 July 2011. Retrieved 18 March 2015.
15. ^ Bonnie Berkowitz; Laris Karklis; Reuben Fischer-Baum; Chiqui Esteban (11 September 2017). "Analysis - How big is Hurricane Irma?". Washington Post. Retrieved 2 November 2017.
16. ^ "Irma unleashes its fury on south Florida", Financial Times, accessed 10-Sept-2017 (subscription required)
17. ^ The adoption of joules as units of energy, FAO/WHO Ad Hoc Committee of Experts on Energy and Protein, 1971. A report on the changeover from calories to joules in nutrition.
18. ^ Feynman, Richard (1963). "Physical Units". Feynman's Lectures on Physics. Retrieved 2014-03-07.
19. ^ International Bureau of Weights and Measures (2006), The International System of Units (SI) (PDF) (8th ed.), p. 39–40, 53, ISBN 92-822-2213-6, archived (PDF) from the original on 2017-08-14
20. ^


text:
# Homework Help: Error bounds on series approximation

1. Mar 20, 2012

### Screwdriver

1. The problem statement, all variables and given/known data

I want to estimate $f(x)=\ln (\frac{1}{1+x})$ on the interval $(1/10,1)$ with the error on the approximation being no more than $0.1$.

2. Relevant equations

http://en.wikipedia.org/wiki/Taylor's_theorem#Example

3. The attempt at a solution

Following the example from Wikipedia, I first found that the $n^{\text{th}}$ derivative for $n \geq 1$ of $f(x)$ is:

$$f^{(n)}(x)=(-1)^n \frac{(n-1)!}{(1+x)^n}$$

Then the remainder term is:

$$R_{k}(x)=\frac{f^{(k+1)}(\xi_{L})}{(k+1)!}(x-a)^{k+1}=(-1)^{k+1}\frac{x^{k+1}}{(1+x)^{k+1} (k+1)}$$

Here's the sketchy part, I think I'm supposed to find an upper bound for $f(x)$ on the interval I want, but since $f(x)$ is a decreasing function, it's maximum value is going to be when $x=1/10$, in which case we have $f(1/10) \approx -0.0953$ so I guess that means I can say $f(x) \leq -0.09$?

Then:

$$|R_{k}(x)| \leq \Big|(-1)^{k+1}\frac{-0.09 x^{k+1}}{(1+x)^{k+1} (k+1)}\Big| = \Big|(-1)^{k+1}\Big| \frac{|-0.09| |x|^{k+1}}{|1+x|^{k+1} |k+1|} = 0.09 \frac{x^{k+1}}{(1+x)^{k+1} (k+1)} \leq \frac{0.09}{(1+x)^{k+1} (k+1)} \leq \frac{0.09}{(k+1)}$$

Finally, impose the condition on the maximum error:

$$\frac{0.09}{(k+1)} < 0.1 \implies k>-1/10 \implies k=0$$

That can't be right though. I think it might have something to do with that $\xi_{L}$ I disregarded.

Last edited: Mar 20, 2012


text:
1. Nov 26, 2008

### sutupidmath

What if somebody asked you to show that the following is a homomorphism

$$\theta:Z_{10}->Z_{10}, \theta(\bar m)=5\bar m$$

I already know how to show this one in an elegant manner, it is not difficult at all. But i am wondering if you would chose a hard way to prove it, like i am gonna describe the following, what do u think is that correct?

$$Z_{10}=\{\bar 0,\bar 1,\bar 2,\bar 3,\bar 4,\bar 5,\bar 6,\bar 7,\bar 8,\bar 9\}$$

THe way i choose to do this is by first observing that for any element $$\bar a \in Z_{10}$$ if a=2k then $$\theta(\bar a)=\bar 0$$ if a=2k+1 then $$\theta(\bar a)=\bar 5$$

So. in order to prove that it preserves addition, we would take the following cases.

Let $$\bar a, \bar b \in Z_{10}$$

1. a=2k, b=2k
2.a=2k, b=2k+1
3.a=2k+1, b=2k+1

Do the same to show that it preserves the multiplication. And show that in all these cases it preserves both operation.

SO, i know that this might not be elegant at all, but how would you mark it (a) Right or (b) Wrong???

I would really appreciate your opinion on this.

Many thanks1

P.S Me and my friend are having an argument about this, he says that this doesn't prove the point at all, while i think the contrary.

2. Nov 26, 2008

### Office_Shredder

Staff Emeritus

I'd say it's long-winded, but correct. The question is "prove this is a homomorphism" and the person... proved it's a homomorphism. That's all that's required. If it was supposed to be a slick proof, it should have been something like "prove this is a homomorphism in five lines or less" (which would be a ridiculous question of course).

This is all assuming that rings aren't required to have a 1 in this context (otherwise it's not a ring homomorphism!)

3. Nov 26, 2008

### sutupidmath

Great! I know this is long, but for some reason i tend to like long proofs( is this a bad thing by the way??), so right when i saw this problem, i enjoyed proving it in this manner. It looks to me, i don't know how to say, more unconventional, with this i mean a little bit different from the usual standard proofs of homomorphism etc. that's why i wanted to try something different.

Last edited: Nov 26, 2008
4. Nov 27, 2008

Proofs that are longer tend to be a little more difficult to follow, so I greatly prefer simple, short proofs. Your proof is completely correct, but I do agree that it's not a very elegant one, primarily because you had to split it up into three cases. To prove the true statement that $$\theta \colon \mathbb{Z}_{10} \to \mathbb{Z}_{10}; \theta(\bar m) = 6 \bar m$$ is a homomorphism using your method would require handling a lot more cases (I believe the number is 15). However, the proof below works with little modification:
Showing that $$\theta$$ preserves addition is easy: $$\theta(\bar a + \bar b) = 5(\bar a + \bar b) = 5 \bar a + 5 \bar b = \theta(\bar a) + \theta(\bar b)$$. Multiplication is similar, but requires the important observation that 5 is congruent to 52 mod 10: $$\theta(\bar a) \theta(\bar b) = (5 \bar a)(5 \bar b) = 25 \bar a \bar b = 5 \bar a \bar b = \theta(\bar a \bar b)$$.