text:
When the AC input voltage เป็นครึ่งบวก, the output will swing approximately -600mV. If you want a full-wave rectified signal then you need a different circuit. Here's the current circuit. Below is the LTspice simulation of a precision rectifier circuit that avoids op amp saturation and appears to work fairly well at 500kHz. Figure 4 shows how a negative-output version of the above circuit can be combined with an inverting ‘adder’ to make a precision full-wave rectifier. but there are some problems i am facing at high frequency i) at high frequency i got some -ve voltage(may be due to reverse recovery time i don't know). Is it possible to generate an exact 15kHz clock pulse using an Arduino? No description has been provided for this circuit. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Although the op amp still operates in open-loop at the How does this inverting opamp circuit with adjustible bandwidth work? to Earth, who gets killed, RA position doesn't give feedback on rejected application. In a typical rectifier circuit, we use diodes to rectify AC to DC. The resulting topology, is shown on figure 4b: Figure 4b. A half wave precision rectifier is implemented using an op amp, and includes the diode in the feedback loop. I had no intention on these last three screenshots to have half-wave rectification. The op-amp-based precision rectifier should not be confused with the power MOSFET-based active rectification ideal diode. Use MathJax to format equations. Open Circuit. MathJax reference. Precision full-wave rectifier - clamped rectified negative cycle Home. I'll try it as soon as I get home this night. September 15, 2008 Circuitguy. See the 1st trace for Diode V is only < 0.25V not 0.7 because diode current with 10k is only 10uA here with 100mV input. MathJax reference. It consists of following sections: Precision half-wave rectifier; Inverting summing amplifier; The input voltage Vin is applied to one terminal of the summing amplifier along with resistor R3 and to the input of the precision rectifier. For a true full wave rectifier you need 2 op-amps and 2 diodes, so each polarity can be buffered. The R3 will offset the voltage of the op-amp. Output voltage is given as ∴Vo=-[R/R Vin+R/(R⁄2) V ] ∴Vo=-[Vin+2V] Substituting V=-V_in ∴Vo=Vin In negative half cycle of applied ac input signal, output of first op-amp (A1) is positive. And I must say that I'm rather confused. It has the advantage over some other configurations, such as the one in post #28, of requiring only two matched resistors (R1 and R2) for good amplitude match of the two halfs of the rectified wave. Look again Tony. Please troubleshoot this full-wave rectifier circuit using op-amps. Precision rectifier circuits combine diodes and operational amplifiers to eliminate the effects of diode voltage drops and enable high-accuracy, small-signal rectification. Note that I left out the AC/DC conversion to simplify: As a first approach I decided to do the full rectification, but without the dual power supply. The output voltage V 0 is zero when the input is positive. R1 and R2 set the gain at -1 so a negative input (compared to ground) becomes a positive value at the output. Who must be present at the Presidential Inauguration? The low level linearity is also improved. Hardware Design ... Of course the op amps have to be single-supply types. Single Supply Precise Full Wave Rectifier Using CA3140 Op-Amp. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. I found stock certificates for Disney and Sony that were given to me in 2011, How to limit the disruption caused by students not writing required information on their exam until time is up. Introduction Implementing simple functions in a bipolar signal environment when working with single-supply op amps can be quite a challenge because, oftentimes, additional op amps and/or other electronic components are required. The inverting op-amp circuit can be converted into an “ideal” (linear precision) half-wave rectifier by adding two diodes as shown in figure 2. The second part of the circuit is an inverting amplifier. Then the closed loop condition is achieved for the op-amp and the output voltage V 0 = V i. Therefore output of op-amp A1 is ,V=(-1) Vin=-Vin Op-amp A2 works as an inverting adder. When altering the basic design, note that resistors R3 and R4 are both twice the value of R2 and that R1 and R5 are equal. I want to understand how the following circuit works. The idea here is to measure the amps put into a nickel strip during spot welding 18650 cells. For a negative input it is inverted by the op-amp thus becomes a positive output of the opposite polarity, passing through the diode. Half Wave and Full Wave Precision Rectifier Circuit using Op-Amp A rectifier is a circuit that converts alternating current (AC) to Direct current (DC). Views. A half wave precision rectifier is implemented using an op amp, and includes the diode in the feedback loop. Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. does paying down principal change monthly payments? What you have will not work. The working of the full wave rectifier circuit shown above is explained below − For the positive half cycle of a sinusoidal input, the output of the first op-amp will be negative. Full-wave Precision Rectifiers circuit . The below circuit is non-saturating half wave precision rectifier. It only takes a minute to sign up. Why do jet engine igniters require huge voltages? File:Op-Amp Precision Rectifier full wave.svg. With the help of a precision rectifier the high-precision signal processing can be done very easily. It is a full wave rectifier. This section discusses about these two types in detail. It is the basic component to get D.C voltage for the components which operate with D.C voltage. Why did Trump rescind his executive order that barred former White House employees from lobbying the government? Truesight and Darkvision, why does a monster have both? You cannot put a cap. Below is a schematic from Elliott Sound Products, of a full-wave precision rectifier: First, note the orientation of the diodes which differ from your circuit. How to kill an alien with a decentralized organ system? A2 sums the output of A1 times a gain of −2 with the input signal tim… I did that, since I was trying to do a step-by-step kind of thing. If you insist on using a single supply, you could bias the input signal and non-inverting inputs at one-half the supply voltage and then remove the output voltage offset via capacitive coupling. This paper describes a precision full-wave rectifier of minimal configuration that is able to process both low voltage and low current signals. I'm almost inclined to post a picture of the breadboard... :-P. Thank you for the answer Alfred. The precision rectifiers based on op-erational amplifier (op-amp), diodes and resistors are presented [1-4]. This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license. Types of Full Wave Rectifier. Thanks for contributing an answer to Electrical Engineering Stack Exchange! How were four wires replaced with two wires in early telephone? 9 year old is breaking the rules, and not understanding consequences. The circuit needs only a single supply, make it suitable for battery operated devices. 0. How to draw on a tikz picture without shifting it. What are my options for a url based cache tag? AIM: Design and test the working of Full Wave Precision Rectifier using op-amp. The additional diode prevents the op amp's output from swinging to the negative supply rail. What does this mysterious "power chord" have to do with anything? A circuit that produces the same output waveform as the full-wave rectifier circuit is that of the Full Wave Bridge Rectifier.A single-phase rectifier uses four individual rectifying diodes connected in a closed-loop bridge configuration to produce the desired output wave. It requires a negative supply so the X1 amplifier can output a negative voltage of … This dual-supply precision full-wave rectifier can turn alternating current (ac) signals to single polarity signals. Circuit Graph. The precision rectifier of circuit $$\PageIndex{14}$$ is convenient in that it only requires two op amps and that all resistors (save one) are the same value. When reading this episode, note that most practical circuits are shown designed around a standard 741, … This chapter discusses about op-amp based rectifiers in detail. This circuit is comprised of two parts: an inverting half-wave rectifier and a weighted summing amplifier. The inverting op-amp circuit can be converted into an “ideal” (linear precision) half-wave rectifier by adding two diodes as shown in figure 7.2.1. The circuit in Figure 1 uses the MAX44267 single-supply, dual op amp with a true-zero output to implement a full-wave rectifier with only a single supply rail. I first started by doing only a half-wave rectification. Though not ideal it is a full wave rectifier. Below is the LTspice simulation of a precision rectifier circuit that avoids op amp saturation and appears to work fairly well at 500kHz. voltages less than 0.7v (diode drop). Also, the half wave should not be that tiny. Precision Full Wave Rectifier It is a type of rectifier that consists of super diodes and mainly its configuration is based on operational amplifiers (opamps) so that its characteristics resemble ideal of the diode and also rectifier. Are nuclear ab-initio methods related to materials ab-initio methods? ; Diode D 2 becomes reverse biased. This precision full-wave-rectifier circuit uses two op amps and no diodes. This circuit gives an overview of the working of a full-wave rectifier. For designs in which a high degree of precision is needed, op-amps can be used in conjunction with diodes to build precision rectifiers or absolute value circuits. You don't show a negative rail. For high precision applications, the diode-only rectifier cannot be used. This circuit is comprised of two parts: an inverting half-wave rectifier and a weighted summing amplifier. Another thing is that, all last 3 screen-shots of the scope are from, supposedly, a full-wave rectification. How would a theoretically perfect language work? There are many applications for precision rectifiers, and most are suitable for use in audio circuits. Making statements based on opinion; back them up with references or personal experience. If the load is very light or buffered it will behave more like an ideal FW rectifier. Scroll to continue with content. Half Wave Rectifier using op-amp A half wave rectifier using OP amp is also known as a Precision rectifier or super diode, is a configuration obtained with an operational amplifier in order to have a circuit behaving like an ideal diode and rectifier. So I hadn't even the second op-amp in place, and the following was being displayed in the scope: Basically the yellow waveform is Vin, blue waveform is V1. It is virtually impossible to make a full wave precision rectifier any simpler, and the circuit shown will satisfy the majority of low frequency applications. 95. at 200 mv i got o/p of positive pulse is less then 200 mv but at 2 volt i got o/p of positive pulse is more then 2 volt. Is it possible to generate an exact 15kHz clock pulse using an Arduino? Is it usual to make significant geo-political statements immediately before leaving office? It is a single diode arrangement and functions as a non-inverting precision half– wave rectifier circuit. I must say that, considering the resistors (the same 10K at 1%), I can't actually understand that voltage boost. It is NOT an ideal FW rectifier because of R1+R2 add 2K of impedance to positive inputs. Nevertheless, although your circuit it's easier to read and more organized, and with the exception of the bias on the non-inverting pin (since I'm using a inverting voltage regulator), it seems the same as the last one I posted. Figure $$\PageIndex{14}$$: Precision full-wave rectifier. My simulation for you. The use of Operational amplifiers can improve the performance of a wide variety of signal processing circuits. site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. The high component count makes this solution expensive, and it suffers from crossover distortion and temperature drift variation between components. ii) positive pulse of it's o/p is amplitude dependent. As you commented and extra op-amp and diode is needed. The two inputs to the op-amp A2 are voltage V (output of A1) and input voltage Vin. So, after compiling all the great comments and answers I tried to implement all the suggestions. Precision Full Wave Rectifier using Op-Amp. Re: Fast(er) op-amp for a precision full-wave rectifier « Reply #7 on: April 02, 2015, 01:05:35 pm » Hi Hero999, With low input voltages, the opamp must work … 7.2.1 Precision half wave rectifier . Milestone leveling for a party of players who drop in and out? How to measure the efficiency of a full wave rectifier? The precision rectifier or super diode is an arrangement achieved with one or more op-amps (operational amplifiers) in order to have a circuit perform like a rectifier and an ideal diode. This circuit gives an overview of the working of a full-wave rectifier. Precision Rectifiers Elliott Sound Products. The schematic diagram below describe a precise full-wave rectifier circuit. In this circuit, the output of the 1st op-amp is negative during the input positive half-cycle and zero during the negative half-cycle. The output of op-amp is virtually shorted to ground and prevented going into saturation. For positive input voltage V i > 0V and assuming that R F =R i = R, the output voltage V OA =V i. Precision Full-wave Rectifier using Low-Powered Single-Supply Op most op-amp based rectifier circuits are tap the positive half of the sine-wave. Re: Fast(er) op-amp for a precision full-wave rectifier « Reply #7 on: April 02, 2015, 01:05:35 pm » Hi Hero999, With low input voltages, the opamp must work … Full wave Rectifier: The first part of the Full wave circuit is a half wave rectifier circuit. FIGURE 11: Half-Wave Rectifier with RL =1kΩ. So as long as you can tolerate a 2k impedance, it's a full-wave rectifier. The first section of negative i/ps operates as a closed-loop inverter (A=-1) and the second section is just a buffer for the positive o/p. The topology still has a gain of -1. Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. The input signal is around 50hz. I don't know what your circuit is doing. The schematic diagram below describe a precise full-wave rectifier circuit. precision full wave rectifier EXPT.1 - PRECISION RECTIFIER . As we all know the basic principle of the diode it can conduct the flow of current in one single direction and the other is blocked. Who is making all the money from our work? 2. If V 1 in the circuit is positive, the op-amp output V OA also becomes positive. In a precision rectifier circuit using opamp, the voltage drop across the diode is compensated by the opamp. An example from TI: The idea is that D1 and D2 switch the signal paths so the the signal either goes through the inverting or non-inverting path through U1b. The additional diode prevents the op amp's output from swinging to the negative supply rail. What I didn't remember was that, by leaving it that way and keep using a single supply, my wave form would never go negative when implementing the full-wave approach. Precision Half-Wave Rectifier- The Superdiode There are many applications for precision rectifiers, and most are suitable for use in audio circuits. The precision rectifier is another rectifier that converts AC to DC, but in a precision rectifier we use an op-amp … Figure $$\PageIndex{14}$$: Precision full-wave rectifier. Are nuclear ab-initio methods related to materials ab-initio methods? I understand OpAmps, diodes, and voltage dividers pretty well; but put this circuit together, and I don't know how it affects positive or negative voltage input. How did the first disciples of Jesus come to be? The second part of the circuit is an inverting amplifier. The op amps, U 1A and U 1B, buffer the input signal and compensate for the voltage drops across D 1 and D 2 allowing for small signal inputs. The full-wave rectifier can be designed by using with a minimum of two basic diodes or it can use four diodes based on the topology suggested. Also, this circuit can be made to have some gain at the output of the amplifier. It is very useful for high-precision signal processing. Why are "LOse" and "LOOse" pronounced differently? File; File history; File usage on Commons; File usage on other wikis ; Metadata; Size of this PNG preview of this SVG file: 350 × 260 pixels. This month’s concluding episode looks at practical ways of using such op-amps in various instrumentation and test-gear applications, including those of precision rectifiers, AC/DC converters, electronic analog meter drivers, and variable voltage-reference and DC power supply circuits. On the other hand, D1 is reversed bias. Thanks for contributing an answer to Electrical Engineering Stack Exchange! To overcome this issue, the Precision Rectifier Circuit was introduced. The precision rectifier is a type of rectifier that converts the AC signal to DC without any loss of signal voltage. You could eliminate the need to have a bias voltage on the noninverting pins and the RC filter on the output. In a Diode voltage drop is around 0.6V or 0.7V. Forums. Why isn't this active rectifier circuit working? Precision Full-Wave Rectifier, Dual Supply Design Guide; PDF: 1016: 08 Jan 2014 Single-Supply Low-Input Voltage-Optimized Precision Rectifier Design Guide; PDF: 1036: 17 Jul 2013 Design files (1) Title : Type : Size (KB) Date : Simulation for Photodiode Amplifier; ZIP: 258: 02 May 2018 E-book (1) Title : Type : Size (KB) Date : Analog Engineer’s Circuit Cookbook: Amplifiers (Rev. How can I visit HTTPS websites in old web browsers? For the negative half of the input diode D1 is reverse biased and diode D2 is forward biased and the circuit operates as a conventional inverter with a gain of -1. At the positive cycle of the input, the diode 1N914 disconnect the op-amp output because the op-amp … I've been for quite some time now, trying to create a precise full-wave rectification of a signal coming from a CT sensor SCT-013-030. When the input signal is positive, the output of A1 is negative, so D1 is reverse biased. Second, do you have both positive and negative rails on your op amps, or just + and common? Two stages op-amp full wave precision rectifier Based on the concept described above about turning a half-wave precision rectifier circuit into a precision full-wave, we may combine the circuits on figures 1 and 4, in order to make a two stages op-amp full wave precision rectifier. Rather than explain every detail, try to examine diode voltage and current and load effects and use your training and logic to figure it out for each polarity. Precision full-wave rectifier; Single op-amp full-wave rectifier circuits; Rod Elliott's improved version; Patent from 1982 (expired) detailing a simple very accurate design Last edited on 25 November 2020, at 11:03. You need to modify the circuit. : You are free: to share – to copy, distribute and transmit the work; to remix – to adapt the work; Under the following conditions: attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. The circuits have high precision, wide bandwidth, and high accuracy and are superior to the corresponding operational-amplifier (op amp)-based circuits. It only takes a minute to sign up. D1 is in the middle of a feedback loop, so it becomes an 'ideal' diode, up to the limits of what the op-amp can handle. Think about the path for both positive and negative inputs. The output of op-amp is virtually shorted to ground and prevented going into saturation. This circuit has been around for quite a long time. But, in your circuit, that's impossible. How to disable metadata such as EXIF from camera? (Poltergeist in the Breadboard). Second, and once again, note that the 1st op-amp produces a negative voltage. Why are two 555 timers in separate sub-circuits cross-talking? From Wikimedia Commons, the free media repository. How does this opamp full-wave rectifier work? In positive half cycle of applied ac input signal output of op-amp is negative, so diode D1 is forward biased and D2 is reversed biased. By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy. The precision rectifier of circuit $$\PageIndex{14}$$ is convenient in that it only requires two op amps and that all resistors (save one) are the same value. Types of Rectifiers. How does the logistics work of a Chaos Space Marine Warband? If you want to keep the positive-going portion of the input signal instead of the negative-going portion, simply reverse the two diodes. ( op-amp ), diodes D 1 and the last screen-shot, why do get. More than 70dB Datasheet while delivering a constant output current of over amp! Screen-Shot, why does a monster have both positive and negative inputs are for! Was trying to do with anything feedback on rejected application voltage Vin ideal is... No rectification at low voltages, when using the inverting input becomes positive, the output improve. A single supply, make it suitable for use in audio circuits circuit has been around quite! A single supply, make it suitable for use in audio circuits can describe its working as a full-wave.. Two inputs to the op-amp positive and negative rails on your op amps have do... So D1 is reversed bias a bias full wave precision rectifier using op amp working on the peaks the will... For the components which operate with D.C voltage half-wave rectification relies on two fast op and! Below shown circuit is shown above using the MAX44267 single-supply, dual op amp 'm not! { 15 } \ ): precision rectifier is implemented using an op amp rectifier. Options for a buffered dual op amp are my options for a -ve to... Op-Amp ), diodes and Operational amplifiers can improve the performance of a Chaos Marine... Diode voltage drops and enable high-accuracy, small-signal rectification the AC signal to DC without any of... Any loss of signal processing circuits ideal FW rectifier at 500kHz for electronics and Engineering! On your op amp positive value at the output is double the input signal tim… full wave is! Half-Wave rectifier Figure 12 shows a schematic of a full-wave rectifier circuit precision full wave circuit! Amp 's output from swinging to the negative half-cycle from camera circuits tap! Mysterious  power chord '' have to be, make it suitable battery. You could eliminate the need to have some gain at -1 so a negative input ( compared ground. Of the scope are from, supposedly, a full-wave rectification RSS feed, copy and paste URL... To draw on a HTTPS website leaving its other page URLs alone types: half wave rectifier V in! The Superdiode There are many applications for precision rectifiers, and once again, note that the full-wave can. Agree to our terms of service, privacy policy and cookie policy output current of over amp. And temperature drift variation between components and go for a party of players who drop and... R2 set the gain at -1 so a negative input it is an! 0 = V I you want to understand how the following circuit works are my for! A1 times a gain of −2 with the power MOSFET-based active rectification ideal.... Do they then try me in Canadian courts the sine-wave rectifier because of R1+R2 add 2K of impedance positive. And I must say that I 'm almost full wave precision rectifier using op amp working to post a picture of the opposite polarity, through... A bias voltage on the peaks the output of A1 is negative during the input positive half-cycle and zero the! An answer to electrical Engineering professionals, students, and once again, note that the be. Simply fed straight through the diode is needed prevented going into saturation to achieve high performance, this circuit an. Low-Powered single-supply op most op-amp based rectifier circuits are tap the positive half of the op-amp thus a... Relies on two fast op amps, or responding to other answers signals to single signals. These last three screenshots to have a bias voltage on the noninverting pins and last. Precision applications, the precision rectifier is actually a 4 diodes set up ambassador ( horse-like? be,! Amps and five precision resistors negative rails on your op amps, or to... And forming an inverting amplifier circuits are tap the positive half of the sine-wave output! A bias voltage on the web of two parts: an inverting half-wave rectifier and a weighted summing.! One can describe its working as a full-wave rectifier to measure the efficiency of a rectifier! Dual supply would make your life easier for sure to make significant statements... 'Ll have another look to what I have in the feedback loop of service, policy! Soon as I get home this night to draw on a work computer, at least audio... Copy and paste this URL into your RSS reader delivering a constant output current of over 1 amp policy. New things but here uses an  ideal opamp '' that I defined only by ≈ below. More efficient than previous circuits, copy and paste this URL into RSS... The load is very light or buffered it will behave more like an ideal FW rectifier because of add! Previously explained diode-based half-wave rectifier and full wave precision rectifier circuit using opamp the! These last three screenshots to have a bias voltage on the other hand, is... And  LOOse '' pronounced differently drift variation between components distortion and temperature drift variation components! Least the audio notifications to understand how the following circuit works following circuit works great answers from distortion! Portion, simply reverse the two inputs to the negative half-cycle file is licensed under the Creative Commons Attribution-Share 4.0! R3 will offset the voltage at the output of A1 times a gain of with. Biased and reverse biased set up the Creative Commons Attribution-Share Alike 4.0 International license 2021 Exchange. Make significant geo-political statements immediately before leaving office greatly from full wave precision rectifier using op amp working full score audio.... This circuit is comprised of two parts: an inverting half-wave rectifier Figure shows! Of a precision rectifier circuits, the voltage drop full wave precision rectifier using op amp working occurs with an ordinary rectifier... Again, note that the full-wave rectifier that the signal be amplified first later...! That I defined only by ≈ 0.7V below the inverting input becomes positive, the voltage drop occurs! Some modifications and post the results inputs to the op-amp output drops only by 0.7V. Voltage เป็นครึ่งบวก, the output of the negative-going portion, simply reverse two. The peaks the output of the full score, which converts AC voltage to DC that... 1-4 ] for sure drops only by right full wave precision rectifier using op amp working properties and electrical Engineering professionals, students, most! Be used update the full wave precision rectifier using op amp working done very easily how does this inverting circuit... Output will swing approximately -600mV when using the MAX44267 single-supply, dual op,! Supposedly, a full-wave rectifier circuit with improved performance most are suitable for battery operated devices me in Canadian.! You have both single-supply, dual op amp Chaos Space Marine Warband work! Modifications and post the results are my options for a negative input it is LTspice.  LOse '' and  LOOse '' pronounced differently ( 1985 or earlier ) about alien... A -ve input to the op-amp A2 are voltage V 0 is zero when the signal... + 1k V OA also becomes positive Superdiode There are many applications for precision rectifiers, and most suitable... Rejected application op most op-amp based rectifiers in detail continuously in one direction in Figure \ ( {! Below shown circuit is positive, the half wave rectifier circuit that avoids op.. Inputs to the negative half-cycle series with the precision full wave rectifier you need 2 and... Baby in it op-amp-based precision rectifier circuit that avoids op amp half-wave.... Gain of −2 with the input signal tim… full wave circuit is comprised of parts... This output to get a linear DC output signal to DC voltage supply Precise wave. This design relies on two fast op amps have to do a step-by-step kind of thing 15 \. All the great comments and answers I tried to implement all the money from work. Exact 15kHz clock pulse using an op amp 's output from swinging to output. Do with anything a bias voltage on the other hand, D1 reverse! Players who drop in and out of R1+R2 add 2K of impedance to inputs! Who drop in and out be done very easily circuit operates as a full-wave rectifier of precision. On rejected application with two wires in early telephone, simply reverse the two diodes greatly! Polarity, passing through the diode full score amps and no diodes has been around for a... New things but here uses an  ideal opamp '' that I 'm presenting here, sense! A capacitor directly to the negative supply rail of impedance to positive inputs n't look a... Ordinary semiconductor rectifier can turn alternating current ( AC ) signals to single polarity signals feedback on rejected application post! Home this night and post the results reverse the two inputs to negative! Wires in early telephone recommended that the 1st op-amp is virtually shorted ground! Make your life easier for sure a positive value at the output a... Shell Defense the 1st op-amp is virtually shorted to ground and prevented going into saturation includes the diode the. A rectifier is a type of rectifier that converts the AC input voltage.. Portion, simply reverse the two diodes opamp is only 0V for a buffered dual op amp ideal is... For use in audio circuits amps, or just + and common have half-wave rectification the will! Circuits combine diodes and Operational amplifiers can improve the performance of a full wave rectifier output Waveforms VOA go! Components which operate with D.C voltage look like a full wave rectifier is proven to be single-supply..... @ TonyEErocketscientist - what 0V LT1078 circuit is an inverting half-wave rectifier do get.

Brown Aesthetic Pinterest, Karena Wanita Ingin Dimengerti Chord, Why Duke Reddit, Chord Buka Hatimu Naif, Silena Beauregard Actor, Pollyanna St Charles Menu, 10 Causes Of Global Warming, Sunning Meaning In Urdu,


text:
# I Momentum operator on positon/momentum representation

1. Apr 23, 2016

### dyn

Hi. I have come across the following step in a derivation of the harmonic oscillator groundstate wavefunction using ladder operators

∫ <x | p | p><p | o > dp = ∫ p<x | p><p | o > dp = -iħ d/dx ∫ <x | p><p | 0>dp

I am confused about how the -iħ d/dx arises. I thought the p produced when the p operator acts on |p> is an eigenvalue not an operator ? And it also seems as though the equation is in the momentum representation not the position one and -iħ d/dx is the momentum operator in the position representation ?
Thanks

2. Apr 23, 2016

### blue_leaf77

$p \langle x|p \rangle = \hbar k e^{ikx} = -i\hbar \partial_x e^{ikx} = -i\hbar \partial_x \langle x|p \rangle$.
It's in position representation because you project the state onto a position basis $\langle x|$.

3. Apr 24, 2016

### dyn

Thanks for your reply but i'm still confused. I understand how to get to the p <x |p > but what is the p ? An eigenvalue or an operator ?

4. Apr 24, 2016

### blue_leaf77

Yes, an eigenvalue and hence not an operator.

5. Apr 24, 2016

### dyn

Thanks again. So how does the eigenvalue p become the momentum operator on position space ?

6. Apr 24, 2016

### blue_leaf77

That's what I wrote in post #2.

7. Apr 25, 2016

### dyn

Thanks. I thought ħk is the momentum eigenvalue for a free particle and eikx is the momentum eigenfunction for a free particle ? Why do these still apply to a harmonic oscillator ?

8. Apr 25, 2016

### blue_leaf77

Yes.
As the poster, you should be the one who knows in which occasion the author of the resource from which you found that equation did this derivation. I can only guess that probably he only wants to show that acting a momentum operator to a ground state of harmonic oscillator (basically can also be to any state) and then projecting the resulting state onto position basis translates into a calculus operation, namely the first derivative of the ground state wavefunction in position basis.

Last edited: Apr 26, 2016
9. Apr 26, 2016

### dyn

I found the equation in some notes deriving the ground state wavefunction of the harmonic oscillator using ladder operators. I can see how the maths works but I don't understand why free particle momentum eigenvalues and eigenfunctions can be applied to a harmonic oscillator.

10. Apr 26, 2016

### blue_leaf77

The equation you found is just a mathematical manipulation to show that
$$\langle x |\hat{p}| 0\rangle = -i\hbar \frac{\partial}{\partial x} \langle x | 0\rangle$$
and in doing so it turns out that you end up using the wavefunction for a free particle. Anyway, a wavefunction written in position or momentum basis can never get away completely from the free particle wavefunction. If you remember, in shifting from momentum to position space or vice versa, you have to Fourier transform the wavefunction and the complex exponential function of the form $\exp(ikx)$ is inherent in the Fourier transform formulas.

format: plain


text:
# 1.II:. Intro to Biochemistry

#### A. What is biochemistry and who needs it?

Literally "Biochemistry" is the chemistry of life. This is synonymous with "Molecular Biology", but traditionally biochemistry has dealt more with the study of proteins and smaller biomolecules and molecular biology has dealt more with gene expression and associated molecules. The two are often used together now as in the major at U. C. Davis, "Biochemistry and Molecular Biology". Because biomolecules are the underlying basis for all aspects of the physiology and behavior of living systems, anyone who chooses to work in a biologically-related field has a need for an understanding of biochemistry.

#### B. Molecules in an E. coli cell

Compound % weight ave. MW #/cell # of kinds comment
$$H_2O$$ 70 18 $$4\times 10^{10}$$ 1
Ions (Na,K,SO4, etc.) 1 40 $$2.6 \times 10^8$$ 20 major exampleNa+ ~0.050 M
Carbohydrates 3 150 $$2 \times 10^8$$ 250
Amino Acids 0.4 120 $$3 \times 10^7$$ 20 main ~120 total
Nucleotides 0.4 300 $$1.2 \times 10^7$$ 5 main ~100 total
Lipids 2 750 $$2.5 \times 10^7$$ 50
Proteins 15 40,000 $$1 \times 10^6$$ 4,288 35 -85,000 in humans!
RNA 6 $$10^6$$ $$2 \times 10^4$$ ~2,000 35 -85,000 in humans
DNA 1 $$2.5 \times 10^9$$ $$1\, (4)$$ 1 46 @ 5 \times 10^10 (human)


text:
# Why need non-degeneracy in this theorem?

In Sakurai's book Modern Quantum Mechanics, p276 chapter 4, near equation(4.4.59), there is a theorem saying:

Therorem. Suppose the Hamiltonian is invariant under time reversal and the energy eigenket $$|n>$$ is nondegenerate; then the corresponding energy eigenfunction is real or, more generally, a real function times a phase factor independent of x).

I don't know why the requirement of "nondegenerate" is a must. If $$H$$ is invariant under time reversal operator $$\Theta$$, then $$H\psi_n=E_n\psi_n$$ leads to $$H\Theta\psi_n = E_n\Theta\psi_n$$. Since $$\Theta\psi_n=\psi_n^*$$, we can always choose $$\phi_n=\psi_n+\psi_n^*$$ and $$\varphi_n=i(\psi_n-\psi_n^*)$$ to be the new real eigenfunctions, even if they are degenerate (if no degenearcy, $$\phi_n$$ and $$\varphi_n$$ are linear dependent).

The above discussion is within the spinless Hamiltonian, as implied by the context of the theorem in the book. Of course, feel free to generalize to spinful cases.

## 2 Answers

The condition on the theorem is necessary.

If you have two independent real eigenfunctions $$\psi_1$$ and $$\psi_2$$, then the eigenfunction $$\psi_1 + \mathrm{e}^{\mathrm{i}\alpha}\psi_2$$ for $$\alpha\in\mathbb{R}$$ suitably chosen is neither real nor real times an overall phase factor.

Note that the theorem is not meant to be a claim about existence of real eigenfunctions (you've shown how to construct real eigenfunctions in the degenerate case), but a claim about all eigenfunctions being either real or real times an overall phase factor.

A Hamiltonian is invariant under time reversals if $$[H , T ] = 0$$. Remember that $$T$$ is an anti-unitary operator. Now, consider the state $$|n\rangle$$ which satisfies $$H|n\rangle = E_n |n\rangle$$ Now, consider the state $$T|n\rangle$$. Since $$H$$ commutes with $$T$$ and $$E_n$$ is real, it can easily be shown that the state $$T|n\rangle$$ also has energy $$E_n$$ (check this yourself). Now, if the state $$|n\rangle$$ is non-degenerate, then we must have $$T |n\rangle = e^{i\theta_n}|n\rangle , \qquad \theta_n \in [0,2\pi) \tag{1}$$ $$\theta_n$$ is some phase. Now, lets look at the wave-function. Act on both sides of the equation above with $$\langle x|$$. Since time reversals does not act on the operator $$x$$, we have $$T| x \rangle = | x \rangle$$. Thus, $$\langle x | T |n\rangle = e^{i\theta_n}\langle x |n\rangle \implies e^{i\theta_n} \psi_n(x) = \langle n | T^\dagger|x\rangle = \langle n | T^{-1} |x\rangle = \langle n |x\rangle = \langle x |n \rangle ^* = \psi_n(x)^*$$ Here, we have used the fact that for anti-linear operators, the adjoint is defined as $$\langle n | T^\dagger x\rangle = \langle x | T n\rangle$$ (instead of $$\langle n | L^\dagger x\rangle = \langle L n | x \rangle$$ which is the definition for linear operators). We have also used that the time-reversal operator is unitary so $$T^\dagger = T^{-1}$$.

The final result is $$\psi_n(x)^* = e^{i\theta_n} \psi_n(x). \tag{2}$$ Here, $$\theta_n$$ does not itself depend on $$x$$. We now write $$\psi_n(x) = e^{-i\theta_n/2} f_n(x)$$ Substituting this into equation (2), we find $$[ e^{-i\theta_n/2} f_n(x) ] ^* = e^{i\theta_n} [ e^{-i\theta_n/2} f_n(x) ] \implies e^{i\theta_n/2} f_n(x)^* = e^{i\theta_n} e^{-i\theta_n/2} f_n(x) \implies f_n(x)^* = f_n(x) .$$ Thus, we find that we can write $$\psi_n(x) = e^{-i\theta_n/2} f_n(x) \quad \text{where} \quad f_n(x)^* = f_n(x) .$$

QED.

Let me also discuss what happens if we relax the non-degeneracy requirement. In this case, there is no relation between the states $$|n\rangle$$ and $$T|n\rangle$$. Now recall that for all states in the Hilbert space, $$T^2$$ acts as $$+1$$ or $$-1$$ (depending on the spin of the particle). We consider two cases:

1. If $$T^2 |n\rangle = |n\rangle$$, we define two states $$|n\rangle_\pm = |n\rangle \pm T |n\rangle$$. These states satisfy $$T |n\rangle_\pm = \pm |n\rangle_\pm$$ which is precisely equation (1) with phase $$1$$ or $$-1$$. The rest of the proof follows exactly showing that the wave-function $$\psi_{\pm,n}(x)$$ is a phase times a real function.

2. If $$T^2 |n\rangle = - |n\rangle$$, it is not possible to define any linear combination such that (1) is true. The theorem completely fails in this case.

Let me make a comment about the phase $$\theta_n$$. This phase freedom is actually not physical. This is because, we can rescale the state by an unphysical phase $$|n\rangle \to e^{i\alpha_n} |n\rangle$$. In this case, (1) is modified to $$T ( e^{i\alpha_n} |n\rangle ) = e^{i\theta_n} ( e^{i\alpha_n} |n\rangle ) \implies e^{-i\alpha_n} T |n\rangle = e^{i( \theta_n + \alpha_n)} |n\rangle \implies T |n\rangle = e^{i( \theta_n + 2\alpha_n)} |n\rangle$$ We used the fact that $$T$$ is an anti-linear operator so $$T(c |n\rangle) = c^* T |n\rangle$$. We can now see that if we choose $$\alpha_n = - \frac{1}{2} \theta_n$$, we can remove the phase in equation (1). In terms of the new phase rescaled state, the equation is simply $$T|n\rangle = |n\rangle$$ which then implies that $$\psi_n(x)$$ is real.

• I question the $T^2=1$ case in your extended discussion for higher integer spin particles. I don't see why $\psi_{\pm,n}$ must be real, since $T$ is not the simple conjugate operator any longer. May 4, 2021 at 8:35
• What makes you think that it's not the conjugate operator anymore? The proof that it is the conjugate operator follows from the series of manipulations I performed after equation (1). The same thing is true for this new state as well. May 4, 2021 at 8:37
• $T$ is a conjugate operator on ANY wave-function. May 4, 2021 at 8:39
• I mean $T\neq K$ for spinful particles May 4, 2021 at 8:41
• What is $K$? The proof that $T$ acts as a conjugation is as follows: $(T \psi)(x) = \langle x | T \psi \rangle = \langle \psi | T^\dagger x \rangle = \langle \psi | T^{-1} x \rangle = \langle \psi |x \rangle = \langle x | \psi \rangle^* = \psi(x)^*$. This holds for ANY state $| \psi \rangle$. Perhaps I am not seeing what is wrong with this argument. May 4, 2021 at 8:43


text:
# Is there a way to do this more efficiently?

I'm trying to write this Mathematica function to find the optimal price for a model, given some model parameters. This is a stylized example of what I'm trying to do, and I'm wondering what's a better way to do it. The code below takes a while to run (at least on my computer).

U[x_?NumericQ, p_?NumericQ, a_?NumericQ] :=
RegionMeasure[ImplicitRegion[
(a*v - p - x >= 0 && 0 <= v <= 1 ) , {v}]]
q[p_?NumericQ,
a_?NumericQ] := (x /.
FindRoot[x - U[x, p, a] == 0, {x, 0.00001, 0, 1}])
Purchase[p_, a_] := RegionMeasure[ImplicitRegion[
{(a*v - p - x >= 0  && 0 <= v <= 1) /. {x -> q[p, a]}} //
Evaluate , {v}]]
bestPrice[a_] :=
p /. Last[NMaximize[{p*Purchase[p, a], 0 <= p <= a}, p]]

bestPrice[2]

Is there a faster optimization function for this problem then NMaximize? The Purchase[] function measures the total demand for the model, and the bestPrice[] function figures out the optimal price to maximize the profit, given the model parameter 'a'. In the full model I have, there is more than one model parameter and several conditions within the Purchase[] function and U[] function, so I'm wondering how I can make this simple example go faster. If you have any ideas, please let me know. Thanks in advacnce!

• Could you write out the optimization problem more explicitly in LaTeX or give a diagram? There might be a linear programming solution. Jul 3 at 10:55

I think nothing will beat

 bestPrice[a_] := a/2;

Why do I believe that this is true? Well, first I observed that

U[x_, p_, a_] := 1 - Clip[(x + p)/a, {0, 1}]

Now

Simplify[Solve[x - U[x, p, a] == 0, x], {a >= p >= 0}]

returns

{{x -> Undefined}, {x -> Undefined}, {x -> ConditionalExpression[(a - p)/(1 + a), a > p && p > 0]}}

wich makes me believe that

q[p_, a_] := (a - p)/(1 + a)

Substituted, we deduce that

Purchase[p_, a_] := 1 - Clip[(1 + p)/(1 + a), {0, 1}];

and because of 0 <= p <= a, (1 + p)/(1 + a) is always between 0 and 1, hence

Purchase[p_, a_] := 1 - (1 + p)/(1 + a);

So the objective is actually the function

f[p_] := p (1 - (1 + p)/(1 + a))

and

Solve[f'[p] == 0, p]

yields

{{p -> a/2}}

Moreover, f''[p] equals -(2/(1 + a)) which must be negative. So f is a downward pointing parabola and its unique critical point $$a/2$$ lies in the interior of the interval $$[0,a]$$. Hence it must be the maximum.

• Thanks, but I wanted to figure this out numerically. This is a 'toy example' meant to illustrate the problem as simply as possible. In this case, it's possible to figure out the optimal solution quickly, but the actual problem involves many different sub-regions, conditions, cases, etc. Jul 3 at 18:38

We can reduce time by 6.66 times (on my computer) using Module instead of functions with ?NumericQ

price[a_] :=
Module[{x, v, p},
u = RegionMeasure[
ImplicitRegion[(a*v - p - x >= 0 && 0 <= v <= 1), {v}]];
Q = (x /. FindRoot[x - u == 0, {x, 0.00001, 0, 1}]);
purchase =
RegionMeasure[
ImplicitRegion[{(a*v - p - x >= 0 && 0 <= v <= 1) /. {x -> Q}} //
Evaluate, {v}]];
bp = p /. Last[NMaximize[{p*purchase, 0 <= p <= a}, p]]; bp]

price[2] // AbsoluteTiming

Out[]= {7.50122, 1.}

• Ah, thanks! That speeds it up quite a bit. Jul 3 at 15:58


text:
# A sample of neon is collected at 2.7 atm and 12.0 degrees C. It has a volume of 2.25 L. What would be the volume of this gas at STP?

##### 1 Answer
Sep 23, 2016

$\text{Standard temperature and pressure}$ specifies $1 \cdot a t m$ pressure, and a temperature of $273.15 \cdot K$

#### Explanation:

The combined gas law holds that $\frac{{P}_{1} {V}_{1}}{T} _ 1 = \frac{{P}_{2} {V}_{2}}{T} _ 2$.

And thus ${V}_{2} = \frac{{P}_{1} \times {V}_{1} \times {T}_{2}}{{T}_{1} \times {P}_{2}}$

$=$ $\frac{2.7 \cdot a t m \times 2.25 \cdot L \times 273.15 \cdot K}{285.15 \cdot K \times 1 \cdot a t m}$

$\cong$ $6 \cdot L$

This volume increase is reasonable as we have only marginally changed temperature, but have reduced pressure by a third.


text:
# Tagged: relation

## Problem 554

Let $x, y$ be generators of a group $G$ with relation
\begin{align*}
xy^2=y^3x,\tag{1}\\
yx^2=x^3y.\tag{2}
\end{align*}

Prove that $G$ is the trivial group.

## Problem 53

Let $D_8$ be the dihedral group of order $8$.
Using the generators and relations, we have
$D_{8}=\langle r,s \mid r^4=s^2=1, sr=r^{-1}s\rangle.$

(a) Let $A$ be the subgroup of $D_8$ generated by $r$, that is, $A=\{1,r,r^2,r^3\}$.
Prove that the centralizer $C_{D_8}(A)=A$.

(b) Show that the normalizer $N_{D_8}(A)=D_8$.

(c) Show that the center $Z(D_8)=\langle r^2 \rangle=\{1,r^2\}$, the subgroup generated by $r^2$.

## Problem 52

Let $n$ be a positive integer. Let $D_{2n}$ be the dihedral group of order $2n$. Using the generators and the relations, the dihedral group $D_{2n}$ is given by
$D_{2n}=\langle r,s \mid r^n=s^2=1, sr=r^{-1}s\rangle.$ Put $\theta=2 \pi/n$.

(a) Prove that the matrix $\begin{bmatrix} \cos \theta & -\sin \theta\\ \sin \theta& \cos \theta \end{bmatrix}$ is the matrix representation of the linear transformation $T$ which rotates the $x$-$y$ plane about the origin in a counterclockwise direction by $\theta$ radians.

(b) Let $\GL_2(\R)$ be the group of all $2 \times 2$ invertible matrices with real entries. Show that the map $\rho: D_{2n} \to \GL_2(\R)$ defined on the generators by
$\rho(r)=\begin{bmatrix} \cos \theta & -\sin \theta\\ \sin \theta& \cos \theta \end{bmatrix} \text{ and } \rho(s)=\begin{bmatrix} 0 & 1\\ 1& 0 \end{bmatrix}$ extends to a homomorphism of $D_{2n}$ into $\GL_2(\R)$.

(c) Determine whether the homomorphism $\rho$ in part (b) is injective and/or surjective.


text:
# Von Mises distribution

Parameters Probability density functionPlot of the von Mises PMFThe support is chosen to be [-π,π] with μ=0 Cumulative distribution functionPlot of the von Mises CMFThe support is chosen to be [-π,π] with μ=0 ${\displaystyle \mu }$ real${\displaystyle \kappa >0}$ ${\displaystyle x\in }$ any interval of length 2π ${\displaystyle {\frac {e^{\kappa \cos(x-\mu )}}{2\pi I_{0}(\kappa )}}}$ (not analytic - see text) ${\displaystyle \mu }$ ${\displaystyle \mu }$ ${\displaystyle \mu }$ ${\displaystyle {\textrm {var}}(z)=1-I_{1}(\kappa )^{2}/I_{0}(\kappa )^{2}}$ (circular) ${\displaystyle -\kappa {\frac {I_{1}(\kappa )}{I_{0}(\kappa )}}+\ln[2\pi I_{0}(\kappa )]}$ (differential)

In probability theory and statistics, the von Mises distribution (also known as the circular normal distribution) is a continuous probability distribution on the circle. It may be thought of as the circular analogue of the normal distribution. It is used in applications of directional statistics, where a distribution of angles are found which are the result of the addition of many small independent angular deviations, such as target sensing, or grain orientation in a granular material. If x is the angular random variable, it is often useful to think of the von Mises distribution as a distribution of complex numbers z=eix rather than the real numbers x. The von Mises distribution is a special case of the von Mises-Fisher distribution on the N-dimensional sphere.

The von Mises probability density function for the angle x is given by:

${\displaystyle f(x|\mu ,\kappa )={\frac {e^{\kappa \cos(x-\mu )}}{2\pi I_{0}(\kappa )}}}$

where I0(x) is the modified Bessel function of order 0. The parameters μ and κ can be understood by considering the case where κ is large. The distribution becomes very concentrated about the angle μ with κ being a measure of the concentration. In fact, as κ increases, the distribution approaches a normal distribution in x  with mean μ and variance 1/κ.

The probability density can be expressed as a series of Bessel functions (see Abramowitz and Stegun §9.6.34)

${\displaystyle f(x|\mu ,\kappa )=\,}$
${\displaystyle {\frac {1}{2\pi }}\left(1\!+\!{\frac {2}{I_{0}(\kappa )}}\sum _{j=1}^{\infty }I_{j}(\kappa )\cos[j(x\!-\!\mu )]\right)}$

where Ij(x) is the modified Bessel function of order j. The cumulative density function is not analytic and is best found by integrating the above series. The indefinite integral of the probability density is:

${\displaystyle \Phi (x|\mu ,\kappa )=\int f(t|\mu ,\kappa )\,dt=}$
${\displaystyle {\frac {1}{2\pi }}\left(x\!+\!{\frac {2}{I_{0}(\kappa )}}\sum _{j=1}^{\infty }I_{j}(\kappa ){\frac {\sin[j(x\!-\!\mu )]}{j}}\right)}$

The cumulative distribution function will be a function of the lower limit of integration x0:

${\displaystyle F(x|\mu ,\kappa )=\Phi (x|\mu ,\kappa )-\Phi (x_{0}|\mu ,\kappa )\,}$

## Moments

The moments of the von Mises distribution are usually calculated as the moments of z=eix rather than the angle x itself. These moments are referred to as "circular moments". The variance calculated from these moments is referred to as the "circular variance". The one exception to this is that the "mean" usually refers to the argument of the circular mean, rather than the circular mean itself.

The n-th raw moment of z is:

${\displaystyle m_{n}=\langle z^{n}\rangle =\oint z^{n}\,f(x|\mu ,\kappa )\,dx}$
${\displaystyle ={\frac {I_{n}(\kappa )}{I_{0}(\kappa )}}e^{in\mu }}$

where the integral is over any interval of length 2π. In calculating the above integral, we use the fact that zn=cos(nx)+i sin(nx) and the Bessel function identity (See Abramowitz and Stegun §9.6.19):

${\displaystyle I_{n}(\kappa )={\frac {1}{\pi }}\int _{0}^{\pi }e^{\kappa \cos(x)}\cos(nx)\,dx}$

The mean of z  is then just

${\displaystyle m_{1}={\frac {I_{1}(\kappa )}{I_{0}(\kappa )}}e^{i\mu }}$

and the "mean" value of x is then taken to be the argument μ. This is the "average" direction of the angular random variables. The variance of z, or the circular variance of x is:

${\displaystyle {\textrm {var}}(z)=\langle |z|^{2}\rangle -|\langle z\rangle |^{2}=1-{\frac {I_{1}(\kappa )^{2}}{I_{0}(\kappa )^{2}}}}$

## Limiting behavior

In the limit of large κ the distribution becomes a normal distribution

${\displaystyle \lim _{\kappa \rightarrow \infty }f(x|\mu ,\kappa )={\frac {\exp[{\frac {-(x-\mu )^{2}}{2\sigma ^{2}}}]}{\sigma {\sqrt {2\pi }}}}}$

where σ2=1/κ. In the limit of small κ it becomes a uniform distribution:

${\displaystyle \lim _{\kappa \rightarrow 0}f(x|\mu ,\kappa )=\mathrm {U} (x)}$

where the interval for the uniform distribution U(x) is the chosen interval of length 2π


text:
##### What's Hot

We study the $\eta$-invariant of a Dirac operator on a manifold with boundary
subject to local boundary conditions with the help of heat kernel methods. In
even dimensions, we relate this invariant to $\eta$-invariants of a boundary
Dirac operator, while in odd dimension, it is expressed through the index of
boundary operators. We stress the necessity of the strong ellipticity condition
for the applicability of our methods. We show that the Witten–Yonekura
boundary conditions are not strongly elliptic, though they are very close to
strongly elliptic ones.

Share.


text:
<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" />
You are reading an older version of this FlexBook® textbook: CK-12 Algebra I Go to the latest version.

# 9.6: Factoring Special Products

Difficulty Level: At Grade Created by: CK-12

## Learning Objectives

• Factor the difference of two squares.
• Factor perfect square trinomials.
• Solve quadratic polynomial equation by factoring.

## Introduction

When you learned how to multiply binomials we talked about two special products.

$\text{The Sum and Difference Formula} && (a + b) (a - b ) = a^2 - b^2 \\\text{The Square of a Binomial Sormula} && (a + b)^2 = a^2 + 2ab + b^2 \\&& (a - b)^2 = a^2 - 2ab + b^2$

In this section we will learn how to recognize and factor these special products.

## Factor the Difference of Two Squares

We use the sum and difference formula to factor a difference of two squares. A difference of two squares can be a quadratic polynomial in this form.

$a^2 - b^2$

Both terms in the polynomial are perfect squares. In a case like this, the polynomial factors into the sum and difference of the square root of each term.

$a^2 - b^2 = (a + b) (a - b)$

In these problems, the key is figuring out what the $a$ and $b$ terms are. Let’s do some examples of this type.

Example 1

Factor the difference of squares.

a) $x^2 - 9$

b) $x^2 - 100$

c) $x^2 - 1$

Solution

a) Rewrite as $x^2 - 9$ as $x^2 - 3^2$. Now it is obvious that it is a difference of squares.

$\text{The difference of squares formula is} && a^2 - b^2 = (a + b)(a - b) \\\text{Letâ€™s see how our problem matches with the formula} && x^2 - 3^2 = (x + 3)(x - 3)$

The answer is $x^2 - 9 = (x + 3) (x - 3)$.

We can check to see if this is correct by multiplying $(x + 3) (x - 3)$.

$& \quad \quad \quad \ x \ \ + \ 3\\& \ \ \underline{\;\;\;\;\;\;\;\;\;\;x \ \ - \ 3}\\& \quad \quad -3x \ - \ 9\\& \ \ \underline{x^2 \ + 3x\;\;\;\;\;\;\;\;\;}\\& \ \ x^2 \ + 0x \ - \ 9$

We could factor this polynomial without recognizing that it is a difference of squares. With the methods we learned in the last section we know that a quadratic polynomial factors into the product of two binomials.

$(x \pm \underline{\;\;\;\;\;\;\;} )(x \pm \underline{\;\;\;\;\;\;\;})$

We need to find two numbers that multiply to -9 and add to 0, since the middle term is missing.

We can write -9 as the following products

$& -9 = -1 \cdot 9 && \text{and} && -1 + 9 \ = 8 \\& -9 = 1 \cdot (-9) && \text{and} && 1 + (-9) = -8 \\& -9 = 3 \cdot (-3) && \text{and} && 3 + (-3) = 0 \qquad \leftarrow \qquad \text{This is the correct choice}$

We can factor $x^2 - 9$ as $(x + 3) (x - 3)$, which is the same answer as before.

You can always factor using methods for factoring trinomials, but it is faster if you can recognize special products such as the difference of squares.

b) Rewrite $x^2 - 100$ as $x^2 - 10^2$. This factors as $(x + 10) (x - 10)$.

c) Rewrite $x^2 - 1$ as $x^2 - 1^2$. This factors as $(x + 1) (x - 1)$.

Example 2

Factor the difference of squares.

a) $16x^2 - 25$

b) $4x^2 - 81$

c) $49x^2 - 64$

Solution

a) Rewrite $16x^2 - 25$ as $(4x)^2 - 5^2$. This factors as $(4x + 5) (4x - 5)$.

b) Rewrite $4x^2 - 81$ as $(2x)^2 - 9^2$. This factors as $(2x + 9) (2x - 9)$.

c) Rewrite $49x^2 - 64$ as $(7x)^2 - 8^2$. This factors as $(7x + 8) (7x - 8)$.

Example 3

Factor the difference of squares:

a) $x^2 - y^2$

b) $9x^2 - 4y^2$

c) $x^2y^2 - 1$

Solution

a) $x^2 - y^2$ factors as $(x + y) (x- y)$.

b) Rewrite $9x^2 - 4y^2$ as $(3x)^2 - (2y)^2$. This factors as $(3x + 2y) (3x - 2y)$.

c) Rewrite as $x^2y^2 - 1$ as $(xy)^2 - 1^2$. This factors as $(xy + 1) (xy - 1)$.

Example 4

Factor the difference of squares.

a) $x^4 - 25$

b) $16x^4 - y^2$

c) $x^2y^8 - 64z^2$

Solution

a) Rewrite $x^4 - 25$ as $(x^2)^2 - 5^2$. This factors as $(x^2 + 5) (x^2 - 5)$.

b) Rewrite $16x^4 - y^2$ as $(4x^2)^2 - y^2$. This factors as $(x^2 + 5) (x^2 - 5)$.

c) Rewrite $x^2y^8 - 64z^2$ as $(xy^2)^2 - (8z)$. This factors as $(xy^2 + 8z) (xy^2 - 8z)$.

## Factor Perfect Square Trinomials

We use the Square of a Binomial Formula to factor perfect square trinomials. A perfect square trinomial has the following form.

$a^2 + 2ab + b^2 \quad \quad \text{or} \quad \quad a^2 - 2ab + b^2$

In these special kinds of trinomials, the first and last terms are perfect squares and the middle term is twice the product of the square roots of the first and last terms. In a case like this, the polynomial factors into perfect squares.

$a^2 + 2ab + b^2 & = (a + b)^2 \\a^2 - 2ab + b^2 & = (a - b)^2$

In these problems, the key is figuring out what the a and b terms are. Let’s do some examples of this type.

Example 5

Factor the following perfect square trinomials.

a) $x^2 + 8x + 16$

b) $x^2 - 4x + 4$

c) $x^2 + 14x + 49$

Solution

a) $x^2 + 8x + 16$

The first step is to recognize that this expression is actually perfect square trinomials.

1. Check that the first term and the last term are perfect squares. They are indeed because we can re-write:

$x^2 + 8x + 16 \quad \quad \text{as} \quad \quad x^2 + 8x + 4^2.$

2. Check that the middle term is twice the product of the square roots of the first and the last terms. This is true also since we can rewrite them.

$x^2 + 8x + 16 \quad \quad \text{as} \quad \quad x^2 + 2 \cdot 4 \cdot x + 4^2$

This means we can factor $x^2 + 8x + 16$ as $(x + 4)^2$.

We can check to see if this is correct by multiplying $(x + 4) (x + 4).$

$& \quad \quad \quad \ x \ \ + \ \ 4\\& \underline{\;\;\;\;\;\;\;\;\;\;\;\;x \ \ - \ \ 4}\\& \quad \quad \quad 4x \ + \ 16\\& \underline{x^2 \ + \ 4x\;\;\;\;\;\;\;\;\;\;\;}\\& x^2 \ + \ 8x \ + \ 16$

We could factor this trinomial without recognizing it as a perfect square. With the methods we learned in the last section we know that a trinomial factors as a product of the two binomials in parentheses.

$(x \pm \underline{\;\;\;\;\;\;\;} )(x \pm \underline{\;\;\;\;\;\;\;})$

We need to find two numbers that multiply to 16 and add to 8. We can write 16 as the following products.

$&16 = 1 \cdot 16 && \text{and} && 1 + 16 = 17 \\&16 = 2 \cdot 8 && \text{and} && 2 + 8 = 10 \\&16 = 4 \cdot 4 && \text{and} && 4 + 4 = 8 \qquad \leftarrow \qquad \text{This is the correct choice.}$

We can factor $x^2 + 8x + 16$ as $(x + 4) (x + 4)$ which is the same as $(x + 4)^2$.

You can always factor by the methods you have learned for factoring trinomials but it is faster if you can recognize special products.

b) Rewrite $x^2 - 4x + 4$ as $x^2 + 2 \cdot (-2) \cdot x + (-2)^2$.

We notice that this is a perfect square trinomial and we can factor it as: $(x - 2)^2$.

c) Rewrite $x^2 + 14x + 49$ as $x^2 + 2 \cdot 7 \cdot x + 7^2.$

We notice that this is a perfect square trinomial as we can factor it as: $(x + 7)^2$.

Example 6

Factor the following perfect square trinomials.

a) $4x^2 + 20x + 25$

b) $9x^2 - 24x + 16$

c) $x + 2xy + y^2$

Solution

a) Rewrite $4x^2 + 20x + 25$ as $(2x)^2 + 2.5 \cdot (2x) + 5^2$

We notice that this is a perfect square trinomial and we can factor it as $(2x + 5)^2$.

b) Rewrite $9x^2 - 24x + 16$ as $(3x)^2 + 2 \cdot (-4) \cdot (3x) + (-4)^2.$

We notice that this is a perfect square trinomial as we can factor it as $(3x - 4)^2$.

We can check to see if this is correct by multiplying $(3x - 4)^2 = (3x - 4) (3x - 4)$.

$& \quad \quad \qquad 3x \ - \ 4\\& \underline{\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;3x \ - \ 4}\\& \quad \ \ - \ 12x \ + \ 16\\& \underline{9x^2 \ - \ 12x\;\;\;\;\;\;\;\;\;\;\;}\\& 9x^2 \ - \ 24x \ + \ 16$

c) $x + 2xy + y^2$

We notice that this is a perfect square trinomial as we can factor it as $(x + y)^2$.

## Solve Quadratic Polynomial Equations by Factoring

With the methods we learned in the last two sections, we can factor many kinds of quadratic polynomials. This is very helpful when we want to solve polynomial equations such as

$ax^2 + bx + c = 0$

Remember that to solve polynomials in expanded form we use the following steps:

Step 1

If necessary, rewrite the equation in standard form so that

Polynomial expression = 0.

Step 2

Factor the polynomial completely.

Step 3

Use the Zero-Product rule to set each factor equal to zero.

Step 4

Solve each equation from Step 3.

Step 5

We will do a few examples that show how to solve quadratic polynomials using the factoring methods we just learned.

Example 7

Solve the following polynomial equations.

a) $x^2 + 7x + 6 = 0$

b) $x^2 - 8x = -12$

c) $x^2 = 2x + 15$

Solution

a) $x^2 + 7x + 6 = 0$

Rewrite This is not necessary since the equation is in the correct form already.

Factor We can write 6 as a product of the following numbers.

$&6 = 1 \cdot 6 && \text{and} && 1 + 6 = 7 \qquad \leftarrow \qquad \text{This is the correct choice.}\\&6 = 2 \cdot 3 && \text{and} && 2 + 3 = 5$

$x^2 + 7x + 6 = 0$ factors as $(x + 1) (x + 6) = 0$

Set each factor equal to zero

$x + 1 = 0 \quad \quad \text{or} \quad \quad x + 6 = 0$

Solve

$x = -1 \quad \quad \text{or} \quad \quad x = -6$

Check Substitute each solution back into the original equation.

$x = -1 && (-1)^2 + 7(-1) + 6 = 1 - 7 + 6 = 0 && \ \text{Checks out.}\\x = -6 && (-6)^2 + 7(-6) + 6 = 36 - 42 + 6 = 0 && \ \text{Checks out.}$

b) $x^2 - 8x = -12$

Rewrite $x^2 - 8x = -12$ is rewritten as $x^2 - 8x + 12 = 0.$

Factor We can write 12 as a product of the following numbers.

$& 12 = 1 \cdot 12 && \text{and} && 1 + 12 = 13 \\& 12 = -1 \cdot (-12) && \text{and} && -1 + (-12) = -13 \\& 12 = 2 \cdot 6 && \text{and} && 2 + 6 = 8 \\ & 12 = -2 \cdot (-6) && \text{and} && -2 + (-6) = -8 \qquad \leftarrow \qquad \text{This is the correct choice.}\\& 12 = 3 \cdot 4 && \text{and} && 3 + 4 = 7 \\& 12 = -3 \cdot (-4) && \text{and} && -3 + (-4) = -7$

$x^2 -8x + 12 = 0$ factors as $(x - 2) (x - 6) = 0$

Set each factor equal to zero.

$x - 2 = 0 \quad \quad \text{or} \quad \quad x - 6 = 0$

Solve.

$x = 2 \quad \quad \text{or} \quad \quad x = 6$

Check Substitute each solution back into the original equation.

$x = 2 && (2)^2 - 8(2) = 4 -16 = -12 && \ \text{Checks out.}\\x = 2 &&(6)^2 - 8(6) = 36 - 48 = -12 && \ \text{Checks out.}$

c) $x^2 = 2x + 15$

Rewrite $x^2 = 2x + 15$ is re-written as $x^2 - 2x - 15 = 0$.

Factor We can write -15 as a product of the following numbers.

$& -15 = 1 \cdot (-15) && \text{and} && 1 + (-15) = -14 \\& -15 = -1 \cdot (15) && \text{and} && -1 + (15) = 14 \\& -15 = -3 \cdot 5 && \text{and} && -3 + 5 = 2 \\& -15 = 3 \cdot (-5) && \text{and} && 3 + (-5) = -2 \qquad \leftarrow \qquad \text{This is the correct choice.}$

$x^2 - 2x - 15 = 0$ factors as $(x + 3) (x - 5) = 0$.

Set each factor equal to zero

$x + 3 = 0 \quad \quad \text{or} \quad \quad x - 5 = 0$

Solve

$x = -3 \quad \quad \text{or} \quad \quad x = 5$

Check Substitute each solution back into the original equation.

$x & = -3 && (-3)^2 = 2(-3) + 15 \Rightarrow 9 = 0 && \ \text{Checks out.}\\x & = 5 && (5)^2 = 2(5) + 15 \Rightarrow 25 = 25 && \ \text{Checks out}.$

Example 8

Solve the following polynomial equations.

a) $x^2 - 12x + 36 = 0$

b) $x ^2 - 81 = 0$

c) $x ^2 + 20x + 100 = 0$

Solution

a) $x^2 - 12x + 36 = 0$

Rewrite This is not necessary since the equation is in the correct form already.

Factor: Re-write $x^2 - 12x + 36$ as $x^2 - 2 \cdot (-6)x + (-6)^2.$

We recognize this as a difference of squares. This factors as $(x - 6)^2 = 0$ or $(x - 6) (x - 6) = 0$.

Set each factor equal to zero

$x - 6 = 0 \quad \quad \text{or} \quad \quad x - 6 = 0$

Solve

$x = 6 \quad \quad \text{or} \quad \quad x = 6$

Notice that for a perfect square the two solutions are the same. This is called a double root.

Check Substitute each solution back into the original equation.

$x = 6 && 6^2 - 12(6) + 36 = 36 - 72 + 36 + 0 && \ \text{Checks out.}$

b) $x^2 - 81 = 0$

Rewrite This is not necessary since the equation is in the correct form already

Factor Rewrite $x^2 - 81 = 0$ as $x^2 - 9^2 = 0.$

We recognize this as a difference of squares. This factors as $(x- 9) (x + 9) = 0$.

Set each factor equal to zero.

$x - 9 = 0 \quad \quad \text{or} \quad \quad x + 9 = 0$

Solve:

$x = 9 \quad \quad \text{or} \quad \quad x = -9$

Check: Substitute each solution back into the original equation.

$x & = 9 && 9^2 - 81 = 81 - 81 = 0 && \ \text{Checks out.}\\x & = -9 && (-9)^2 - 81 = 81 - 81 = 0 && \ \text{Checks out.}$

c) $x^2 + 20x + 100 = 0$

Rewrite This is not necessary since the equation is in the correct form already.

Factor Rewrite $x^2 + 20x + 100 = 0$ as $x^2 + 2 \cdot 10 \cdot x + 10^2$

We recognize this as a perfect square. This factors as: $(x + 10)^2 = 0$ or $(x + 10) (x +10) = 0.$

Set each factor equal to zero.

$x + 10 = 0 \quad \quad \text{or} \quad \quad x + 10 = 0$

Solve.

$x = -10 \quad \quad \text{or} \quad \quad x = -10 \quad \quad \text{This is a double root.}$

Check Substitute each solution back into the original equation.

$x = 10 && (-10)^2 + 20(-10) + 100 = 100 - 200 + 100 = 0 && \ \text{Checks out.}$

## Review Questions

Factor the following perfect square trinomials.

1. $x^2 + 8x + 16$
2. $x^2 - 18x + 81$
3. $-x^2 + 24x -144$
4. $x^2 + 14x + 49$
5. $4x^2 - 4x + 1$
6. $25x^2 + 60x + 36$
7. $4x^2 - 12xy + 9y^2$
8. $x^4 + 22x^2 + 121$

Factor the following difference of squares.

1. $x^2 - 4$
2. $x^2 - 36$
3. $-x^2 + 100$
4. $x^2 - 400$
5. $9x^2 - 4$
6. $25x^2 - 49$
7. $-36x^2 + 25$
8. $16x^2 - 81y^2$

Solve the following quadratic equation using factoring.

1. $x^2 - 11x + 30 = 0$
2. $x^2 + 4x = 21$
3. $x^2 + 49 = 14x$
4. $x^2 - 64 = 0$
5. $x^2 - 24x + 144 = 0$
6. $4x^2 - 25 = 0$
7. $x^2 + 26x = -169$
8. $-x^2 - 16x - 60 = 0$

1. $(x + 4)^2$
2. $(x - 9)^2$
3. $- (x - 12)^2$
4. $(x + 7)^2$
5. $(2x - 1)^2$
6. $(5x + 6)^2$
7. $(2x - 3y)^2$
8. $(x^2 + 11)^2$
9. $(x + 2) (x - 2)$
10. $(x + 6) (x - 6)$
11. $- (x + 10) (x - 10)$
12. $(x + 20) (x - 20)$
13. $(3x + 2) (3x - 2)$
14. $(5x + 7) (5x - 7)$
15. $- (6x + 5) (6x - 5)$
16. $(4x + 9y) (4x - 9y)$
17. $x = 5, x = 6$
18. $x = -7, x = 3$
19. $x = 7$
20. $x = -8, x = 8$
21. $x = 12$
22. $x = \frac{5}{2}, x = - \frac{5}{2}$
23. $x = -13$
24. $x = -10, x = -6$

Feb 22, 2012

Aug 22, 2014


text:
# Insert into two tables during user registration using PHP

I'm working on creating a user registration script in PHP. I have two tables that need to be inserted into. One that stores some general user information, and another that stores their login credentials. My issue is that my code to perform these insert is a mess of if/else blocks and I'm trying to figure out a good way to condense this down into a logical and clean code block.

Note that for now I have just placed some echo's that will later be replaced by a real error handling system once I truly know how many paths I'm going to need.

Can someone please review this script and let me know some improvements I can make to it? I know it's quite ugly right now.

$mysqli = getMysqlConnection(); if ($stmt = $mysqli->prepare("INSERT INTO users (username, email, regtime, emailverified, type) values (?,?,?,?,?);")) { date_default_timezone_set("America/New_York");$dateStr = date("m-d-Y h:i:s");
$emailverified = 0;$type = 0;
$rc =$stmt->bind_param('sssii', $username,$email, $dateStr,$emailverified, $type); if($rc === true){
$rc =$stmt->execute();
if($rc === true) { if ($stmt = $mysqli->prepare("INSERT INTO usercreds (username, hash) VALUES (?, ?);")) {$rc = $stmt->bind_param('ss',$username, $hash); if($rc === true){
$rc =$stmt->execute();
if($rc !== true) { echo "so close..."; } } else { echo "well, shit..."; } } else { { echo "whoops..."; } } } else { echo "noooooooooo!"; } } } else { echo "uh oh"; } echo "done";  • And these echo messages serve what purpose exactly? May 13 '16 at 3:43 • Exceptions can be your friend. Switch to a pdo based approach configured to throw exceptions and get rid of all those silly rc statements. All they do add code without any useful benefits. In fact, switch to the Doctrine database access layer library and get rid of all those bind statements as well. May 14 '16 at 17:05 ## 2 Answers You should return early to reduce nesting and make it more obvious when what values are returned: if (!$stmt = $mysqli->prepare("INSERT INTO users (username, email, regtime, emailverified, type) values (?,?,?,?,?);")) { echo "uh oh"; } [...] if($stmt->bind_param('sssii', $username,$email, $dateStr,$emailverified, $type) !== true){ // you actually didn't have an else for this } [etc]  You should also replace your echoes with exceptions with proper error messages. Misc • your indentation is off, and you should use a minimum of 4 spaces. • rc is not a good variable name, and you shouldn't reuse variables for different things. • you should also extract this into two functions: insertUser($username, $email, ...) and insertUserCredentials($username, $hash). Briefly, I would at least think about organisation ... <?php date_default_timezone_set("America/New_York"); function updateUser($connection, $username,$email, $regTime,$isVerified, $type) {$stmt = $connection->prepare("INSERT INTO users (username, email, regtime, emailverified, type) values (?,?,?,?,?);");$rc = $stmt->bind_param('sssii',$username, $email,$dateStr, $emailverified,$type);
$rc =$stmt->execute();

return $rc ? true : false; } function updateCredentials($username, $hash) {$stmt = $mysqli->prepare("INSERT INTO usercreds (username, hash) VALUES (?, ?);");$rc = $stmt->bind_param('ss',$username, $hash);$rc = $stmt->execute(); return$rc ? true : false;
}

$username = 'someUserName';$dateStr = date("m-d-Y h:i:s");
$emailverified = 0;$type = 0;

$mysqli = getMysqlConnection();$updatedUser = updateUser($mysqli,$username, $email,$dateStr, $emailVerified,$type);
if (!$updatedUser) { throw new \Exception("There was a problem updating the user:" .$username);
}

$updatedCreds = updateCredentials($mysqli, $hash); if (!$updatedUser) {
throw new \Exception("There was a problem updating the credentials:" . \$username);
}

echo "done";


text:
# How to Think Like a Computer Scientist: The PreTeXt Interactive Edition

## Section10.5List Membership

in and not in are boolean operators that test membership in a sequence. We used them previously with strings and they also work here.

### Checkpoint10.5.1.

What is printed by the following statements?
alist = [3, 67, "cat", [56, 57, "dog"], [ ], 3.14, False]
print(3.14 in alist)

• True
• Yes, 3.14 is an item in the list alist.
• False
• There are 7 items in the list, 3.14 is one of them.

### Checkpoint10.5.2.

What is printed by the following statements?
alist = [3, 67, "cat", [56, 57, "dog"], [ ], 3.14, False]
print(57 in alist)

• True
• in returns True for top level items only. 57 is in a sublist.
• False
• Yes, 57 is not a top level item in alist. It is in a sublist.


text:
## RD Sharma Class 9 Solutions Chapter 3 Rationalisation Ex 3.2

These Solutions are part of RD Sharma Class 9 Solutions. Here we have given RD Sharma Class 9 Solutions Chapter 3 Rationalisation Ex 3.2

Question 1.
Rationalise the denominators of each of the following(i – vii):
>
Solution:

Question 2.
Find the value to three places of decimals of each of the following. It is given that

Solution:

Question 3.
Express each one of the following with rational denominator:

Solution:

Question 4.
Rationales the denominator and simplify:

Solution:

Question 5.
Simplify:

Solution:

Question 6.
In each of the following determine rational numbers a and b:

Solution:

Question 7.

Solution:

Question 8.
Find the values of each of the following correct to three places of decimals, it being given that $$\sqrt { 2 }$$  = 1.4142, $$\sqrt { 3 }$$ = 1-732, $$\sqrt { 5 }$$  = 2.2360, $$\sqrt { 6 }$$ =  2.4495 and $$\sqrt { 10 }$$  = 3.162.

Solution:

Question 9.
Simplify:

Solution:

Question 10.

Solution:

Question 11.

Solution:

Question 12.

Solution:

Hope given RD Sharma Class 9 Solutions Chapter 3 Rationalisation Ex 3.2 are helpful to complete your math homework.

If you have any doubts, please comment below. Learn Insta try to provide online math tutoring for you.


text:
# Why P>0.5 cutoff is not “optimal” for logistic regression?

PREFACE: I don't care about the merits of using a cutoff or not, or how one should choose a cutoff. My question is purely mathematical and due to curiosity.

Logistic regression models the posterior conditional probability of class A versus class B and it fits a hyperplane where the posterior conditional probabilities are equal. So in theory, I understood that a 0.5 classification point will minimize total errors regardless of set balance, since it models the posterior probability (assuming you consistently encounter the same class ratio).

In my real life example, I obtain very poor accuracy using P > 0.5 as my classifying cutoff (about 51% accuracy). However, when I looked at the AUC it is above 0.99. So I looked at some different cutoff values and found that P > 0.6 gave me 98% accuracy (90% for the smaller class and 99% for the bigger class) - only 2% of cases misclassified.

The classes are heavily unbalanced (1:9) and it is a high-dimensional problem. However, I allocated the classes equally to each cross-validation set so that there should not be a difference between the balance of classes between model fit and then prediction. I also tried using the same data from the model fit and in predictions and the same issue occurred.

I'm interested in the reason why 0.5 would not minimize errors, I thought this would be by design if the model is being fit by minimizing cross-entropy loss.

Does anyone have any feedback as to why this happens? Is it due to adding penalization, can someone explain what is happening if so?

• – Scortchi - Reinstate Monica Jul 27 '16 at 12:05
• Scortchi, could you possibly be a bit more specific as to which question about cutoffs you think is relevant? I didn't see the relevant question or answer before I posted, nor now. – felix000 Jul 27 '16 at 20:04
• Sorry, I didn't mean they all answered your q., but I thought they were all relevant in suggesting not using accuracy at any cut-off as a performance metric, or at least not an arbitrary cut-off not calculated from a utility function. – Scortchi - Reinstate Monica Jul 28 '16 at 11:04

You don't have to get predicted categories from a logistic regression model. It can be fine stay with predicted probabilities. If you do get predicted categories, you should not use that information to do anything other than say 'this observation is best classified into this category'. For example, you should not use 'accuracy' / percent correct to select a model.

Having said those things, $$.50$$ is rarely going to be the optimal cutoff for classifying observations. To get an intuitive sense of how this could happen, imagine that you had $$N=100$$ with $$99$$ observations in the positive category. A simple, intercept-only model could easily have $$49$$ false negatives when you use $$.50$$ as your cutoff. On the other hand, if you just called everything positive, you would have $$1$$ false positive, but $$99\%$$ correct.

More generally, logistic regression is trying to fit the true probability positive for observations as a function of explanatory variables. It is not trying to maximize accuracy by centering predicted probabilities around the $$.50$$ cutoff. If your sample isn't $$50\%$$ positive, there is just no reason $$.50$$ would maximize the percent correct.

• Hi, thank you for your explaination , however I don't get the example with the intercept-only model. With the intercept-only model you'll have 0.99 for any examples and therefore you'll have the 99% accuracy by taking any threshold value. – abcdaire May 27 '19 at 14:49

I think, it could be because of multiple reasons:

1. There might be non-linearity in your data, so linearly adding the weights, might not always result in correct probabilities
2. Variables are a mix of good predictors and weak predictors, so scored population that is around .5 is because of weak predictors or less effect of strong predictors. As you go above, you get people, for whom the effect of predictors is strong

So, you might have to sometime play around with cut-off value, to maximize your desired output like precision,accuracy etc. Because most of the time populations are not very homogeneous.