La resolución de
Fórmula Cuadrática
Lo que usted necesita se llama la fórmula cuadrática. Se utiliza para resolver ecuaciones de segundo grado, que son de la forma ax2+bx+c=0ax2+bx+c=0. Esto podría ser x2+3x+2x2+3x+2, por ejemplo. Con su ecuación, lo primero que necesitamos hacer llegar 00 en un lado del signo igual:
x2=3x+4x2=3x+4
0=−x2+3x+40=−x2+3x+4
Okay, now we clearly have a quadratic equation. A good thing to do when using the quadratic formula is defining unun, bb, and cc (remember the standard form). So, in this case, you'd have
a=−1a=−1
b=3b=3
c=4c=4
Next, we literally just plug the numbers into the formula if doing it by hand. The formula is
x=−b±√b2−4ac2ax=−b±√b2−4ac2a
So, we have x=−3±√32−4∗−1∗42∗−1x=−3±√32−4∗−1∗42∗−1
Lo que se reduce a x=−3±5−2x=−3±5−2
Now, there are almost always two solutions to the quadratic formula (at least in Algebra I textbook problems), because when graphed, quadratic equations take the form of a parabola:
![enter image description here]()
which crosses the x-axis at two places, and we are solving for xx.
So, the solution is x=−1x=−1 or x=4x=4 Honestly, I think this is the easiest way to solve a quadratic (though you should know all of them).
Factoring
Factoring operates off of the zero product property (ZPP). Basically, it just says that in an equation ax=0ax=0 either =0=0 or x=0x=0. Simple, but powerful. So the purpose of factoring is to find expressions that, when simplified, equal the equation you are trying to factor. So, for example, x2−8x+12=0x2−8x+12=0 factors out neatly to (x−6)(x−2)=0(x−6)(x−2)=0 which, since this is equal to zero, so we can pull out the ZPP and get x=6x=6 or x=2x=2.
Now, for a nice method to make this easier (as opposed to plug-and-chug). A good way to do it is saying, okay, a⋅ca⋅c is equal to whatever and bb is equal to whatever. Then, you find two numbers that multiply to a⋅ca⋅c and add to bb. For example, taking our earlier equation, x2−8x+12=0x2−8x+12=0, we see that $$ is one, so our number has to multiply to 12 and add to -8 (don't forget the negative signs!) and so we can write out the factors of 12, which are 1, 2, 3, 4, 6, and 12. Now, we can change the sign on these numbers (aka, we can make them -1 or 1, for instance) so keep that in mind. Which pair adds to 8? Well, 12-1=11 and 12+1=13, so that's out. -6+-2=-8...oh, perfect.
Then, you say, okay, this is really equal to x2−6x−2x+12=0x2−6x−2x+12=0. Then, we put parentheses around it: (x2−6x)+(−2x+12)=0(x2−6x)+(−2x+12)=0. Then, we factor out the largest common factor from each: x(x−6)+2(x−6)=0x(x−6)+2(x−6)=0. Once you are finished factoring you should get the same expression in both sets of parentheses. If not, you have done something wrong. Then, you can say (x−2)(x−6)=0(x−2)(x−6)=0. From here, we're home free, and we can solve using the ZPP (see the very first example in this section).
Completing the Square
Okay, completing the square is another method to solve a quadratic. First, let's assume you've already set your equation up so that it is directly equal to 00. Some quadratics are a bit easier to solve by factoring than others. Take x2+6x+9=0x2+6x+9=0, for instance. You can factor this and get (x+3)2=0(x+3)2=0, and then take the square root (nothing happens to the zero) and notice that x=−3x=−3. These types of simple equations are called perfect squares.
A whole method has based off of these wonderfully simple equations. Take, for example, the perfectly hideous equation x2+6x−16=0x2+6x−16=0. We can actually do something really cool here. Let's move the 16 over to the other side (no, don't look at me weird yet, hold on) to get x2+6x=16x2+6x=16. Now, let's say we want to make this a perfect square. To get what number in the place of cc will make it a perfect square, simply do (b/2)2(b/2)2. In this case, we get 9. So, add 9 to both sides, getting x2+6x+9=25x2+6x+9=25. Then, we know this reduces to (x+3)2=25(x+3)2=25. How to do that simply? Take xx plus b/2b/2 and then get (x+b2)2(x+b2)2. Square root both sides, and you get x+3=±5x+3=±5. Then, remember the way we did this on the quadratic formula, we can just calculate, getting x=2x=2 or x=−8x=−8. Now obviously not all of them turn out quite this nice, but it is another handy method for the quadratic toolbelt.
Deriving the Quadratic Formula
The reason I went through all that is so I could explain where the quadratic formula comes from. Remember that wonderful standard form, ax2+bx+c=0ax2+bx+c=0? Well, if you complete the square on that, you get the quadratic formula. This is not that bad. So, here we go:
ax2+bx+c=0ax2+bx+c=0 −c=ax2+b−c=ax2+b −ca=x2+bax−ca=x2+bax Side note: baba divided by 2 is b2ab2a, that squared is b24a2b24a2. Carrying on... b24a2+−ca=x2+ba+b24a2b24a2+−ca=x2+ba+b24a2 Another side note: To simplify further, we need to give the two fractions on the left side of the equation a common denominator, so −ca−ca is multipled by 4a4a4a4a to give b2−4ac4a2b2−4ac4a2 (once the two fractions are added). b2−4ac4a2=x2+ba+b24a2b2−4ac4a2=x2+ba+b24a2 Complete the square here b2−4ac4a2=(x+b2a)2b2−4ac4a2=(x+b2a)2 Square root both sides √b2−4ac4a2=√(x+b2a)2√b2−4ac4a2=√(x+b2a)2 ±√b2−4ac2a=x+b2a±√b2−4ac2a=x+b2a −b±√b2−4ac2a=x−b±√b2−4ac2a=x
Codificación
Ahora, para la codificación de la solución. Yo python:
import math
a = 1
b = 3
c = 2
def quad_solve(a, b, c):
if (b*b >= 4*a*c):
print "There is a solution!"
d = math.sqrt((b*b)-(4*a*c))
solution1 = (-b-math.sqrt(d))/(2*a)
solution2 = (-b+math.sqrt(d))/(2*a)
if (solution1 != solution2):
print (solution1,solution2)
else:
print solution1
else:
print "No solutions, imaginary number"
quad_solve(a, b, c)
Para conectar los números que usted desea, cambie a
, b
y c
(recuerde que el estándar de la ecuación). La forma en que funciona es este. En primer lugar, no es una función definida que se lleva en las variables a, b, y c de. A continuación, se comprueba para asegurarse de que los números bajo la raíz cuadrada no salen negativas (si lo hicieron, la solución sería un número imaginario). Si pasa eso, entonces, que, literalmente, se calcula utilizando las variables, si no, te lo dice. La otra sentencia if comprueba para asegurarse de que la solución 1 solución y 2 no son iguales antes de la impresión de las dos; que es muy útil en los cuadrados perfectos.
Espero que esto ayude! Déjeme saber si usted tiene alguna pregunta acerca de derivar la fórmula cuadrática, o uno de los métodos, ni nada de eso. Finalmente, un último consejo: yo había álgebra I en el último año, y la fórmula cuadrática es realmente importante para memorizar. Trate de cantar con la melodía de Pop Goes the Weasel; te lo prometo, te la tienen pegada en la cabeza para siempre. =)