how to solve a non-factorable quadratic congruence

Sdílet
Vložit
  • čas přidán 10. 09. 2024
  • Learn how to solve a non-factorable quadratic congruence with prime modulus. Then check out brilliant.org/... and try their daily problems now.
    We will see how to solve a non-factorable quadratic congruence by completing the square and also a clever trick. This is a fun math topic in number theory or discrete math!
    Check out an example if the module isn't prime: 👉 • solving a quadratic co...
    Subscribe for more math for fun videos 👉 bit.ly/3o2fMNo
    💪 Support this channel, / blackpenredpen
    🛍 Shop math t-shirt & hoodies: bit.ly/bprpmerch. (10% off with the code "WELCOME10")
    🛍 I use these markers: amzn.to/3skwj1E

Komentáře • 112

  • @Ni999
    @Ni999 Před 5 lety +58

    "We can do it because we have this powerful green marker..."
    _Perfect!_ Seriously, perfect.

  • @thedoublehelix5661
    @thedoublehelix5661 Před 4 lety +15

    Method #3: Check all the numbers from 0-6 to see if any of them work

  • @wongbob4813
    @wongbob4813 Před 5 lety +12

    Do a mod 6 next time!

  • @jeremy2719
    @jeremy2719 Před 5 lety +2

    And i just started learning modular arithmetic today, thank you!!!!

  • @balancedactguy
    @balancedactguy Před 5 lety +12

    Can you give an introduction to TENSORS??

    • @dectorey7233
      @dectorey7233 Před 5 lety +7

      I'd love to see BPRP tackle tensors but if you want, Andrew Dotson has a great ongoing series on the topic right now

    • @balancedactguy
      @balancedactguy Před 5 lety +1

      @@dectorey7233 Thank You!

  • @dwaipayandattaroy9801
    @dwaipayandattaroy9801 Před 5 lety +3

    Tell honestly that hasnt you mugged up this thing , you are patient , kudos

  • @holyshit922
    @holyshit922 Před 5 lety +1

    x_{1}=3+7k_{1}
    x_{2}=2+7k_{2}
    where k_{1} and k_{2} in Z
    Calculated mentally and used 2nd version - the factorization

  • @Jordan-zk2wd
    @Jordan-zk2wd Před 5 lety +2

    x^2+2x+1=2 mod 7
    x^2+2x+1=9 mod 7
    Doesn't that also mean:
    x^2+2x+1=16 mod 7 (because 9+7=16).
    Therefore:
    (x+1)^2=4^2 mod 7
    x+1=4 mod 7 and x+1=-4 mod 7
    x=3 mod 7 and x=-5 mod 7
    Adding 7 to the last one, we get...
    Wait x=3 and x=2, same solutions opposite order. Huh.
    Is it always as easy as checking one case (9 is enough and 16 is unnecessary) for all quadratic equations mod some prime?

  • @superjugy
    @superjugy Před 5 lety +3

    Oh shit, green pen! This is getting serious now

  • @WildAnimalChannel
    @WildAnimalChannel Před 5 lety +6

    I don't know why but I don't like modular arithmetic. It just feels like counting gone wrong!

  • @JM-us3fr
    @JM-us3fr Před 5 lety +2

    This is pretty cool! I hope you make more number theory videos

  • @gordonchan4801
    @gordonchan4801 Před 5 lety +5

    5:02 "indi-k"

  • @jzanimates2352
    @jzanimates2352 Před 5 lety +7

    Can you try to differentiate x! using the definition of factorial as pi or gamma function plz!!!

    • @srpenguinbr
      @srpenguinbr Před 5 lety

      Once I did it and the result was in terms of psi(x) a special function I had never heard about

    • @maxwongpt2channel328
      @maxwongpt2channel328 Před 5 lety

      @@srpenguinbr That's the digamma function.

  • @SmileyMPV
    @SmileyMPV Před 5 lety +2

    In general you can actually just use the quadratic formula. For the square root you just have to calculate the quadratic residue. Since the quadratic residues of 2 mod 7 are 3 and 4, we find x=-1+3=2 and x=-1+4. Interestingly, some numbers don't have a quadratic residue mod 7, for example 3. This means that some quadratic equations, such as x^2+2x-2=0mod7, do not have any solutions.

  • @jonathanhanon9372
    @jonathanhanon9372 Před 3 lety +1

    I just did it as x^2 + 2x - 1 = x^2 - 5x + 6 = (x-3)(x-2) mod 7

  • @robertlozyniak3661
    @robertlozyniak3661 Před 5 lety +1

    Because it is "mod 7", there are only seven possible cases that you need to look at. You could plug in x=0, x=1, and so forth, up to x=6, and see which values of x actually work.

  • @Quadratic4mula
    @Quadratic4mula Před 5 lety +2

    I'm trying to click on the in video, "Video" Link that says, "Chen Lu" and Dr. ¿Peyam? ... where is that video.

  • @salmamuhammad5416
    @salmamuhammad5416 Před 3 lety

    Thank you very much, i was stuck in a quadratic congruence like that and you helped me .. all respect

  • @nicholasleclerc1583
    @nicholasleclerc1583 Před 5 lety +1

    If all this is 0 modulus 7, then that means the answer is a *multiple* (i.e. “k”) of 7, right ?
    Then:
    x^2+2x-1=7k
    x^2+2x-(7k+1)=0
    x=-1+/- sqrt(-28k-3)
    x=-1 +/- i*sqrt(28)*sqrt(k+3/28)
    So:
    k

  • @ericthegreat7805
    @ericthegreat7805 Před 2 lety +1

    You can also do
    X2+2x=-1 mod7 = 6 mod7
    X2+2x-6=0 mod7
    (X-3)(x-2) = 0 mod7
    X = 2 mod 7, 3 mod 7

  • @deidara_8598
    @deidara_8598 Před 3 lety

    x^2 + 2x - 1 = 0 (mod 7)
    x^2 + 2x = 1 mod 7
    x + 2 = inv(x) mod 7
    15 = 3*5 = 1 mod 7
    3 + 2 = inv(3) mod 7
    x = 3 mod 7
    8 = 2*4 = 1 mod 7
    x = 2 mod 7
    x = 2 or 3 mod 7
    Of course that only works here because we easily found 15 and 8. A more general solution would require the quadratic formula, of course keepin in mind that division would have to be replaced with multiplying with the inverse, and the square root would be calculated with Tonelli-Shanks

  • @theactualbowmonk
    @theactualbowmonk Před 5 lety +2

    So using mod 7 means we can add as many 7s as we want to the righthand side because there is no remainder?

    • @Domestofobia
      @Domestofobia Před 5 lety

      yes, in congruences you can replace anything with anything as long as they are im the same /remain group/(not sure if it is called this in english but for example x :=: y (mod n) then you can replace x with y

    • @ahmedbenlahrech5352
      @ahmedbenlahrech5352 Před 3 lety

      @@Domestofobia Exactly , thats what differentiates modular arithmetics from standard math but the type of problems and questions asked in this field is kinda hard ngl

  • @thetetrix4474
    @thetetrix4474 Před 5 lety +1

    Juste make a congruence table and take values from 1to7

  • @user-cm9dx8zq1d
    @user-cm9dx8zq1d Před 4 lety

    your vidoes are so useful

  • @petermhart
    @petermhart Před rokem

    Very cool! Thanks for posting!

  • @mathforbem
    @mathforbem Před 5 lety +1

    Nice😍😍thx

  • @satoruai3475
    @satoruai3475 Před 2 lety

    I hope there are more of number theory videos. Thanks for the videos😁

  • @KatzKitz10
    @KatzKitz10 Před 5 lety +6

    Where i can get this subject? I dont get it in high school

    • @98danielray
      @98danielray Před 5 lety +2

      its anything related to modular algebra. usually given in abstract algebra or number theory

    • @balancedactguy
      @balancedactguy Před 5 lety

      You will find this in basic NumberTheory. See if you can find an "Introductory Number Theory" book.

    • @Rafael-oq9vu
      @Rafael-oq9vu Před 5 lety

      yep, just go for number theory.

  • @andywright8803
    @andywright8803 Před 5 lety +2

    Are you only restricted to integers in modular arithmetic?

    • @willnewman9783
      @willnewman9783 Před 5 lety

      Modular arithmetic refers to only doing things in the integers, I believe. You can extend it to all real numbers, but only addition makes sense in this realm.

    • @WilliamLeeSims
      @WilliamLeeSims Před 5 lety

      Not unless your solution requires it. For example, 12 mod 6.28 = 5.72. In that example, you have an angle of 12 radians which is one turn around the circle (2 pi) plus another 5.72 radians. Another example is the sawtooth wave function y = x - floor(x); I like to think of it instead as y = x mod 1.

  • @BeauBreedlove
    @BeauBreedlove Před 5 lety +3

    You could also change it to x^2+2x-15 and factor that to (x-3)(x+5) to get x=3 or x=2
    Or you can factor the original x^2+2x-1 to (x-2)(x-3) knowing that -2 * -3 is congruent to -1 (mod 7) and -2 - 3 is congruent to 2 (mod 7)

  • @insertoyouroemail
    @insertoyouroemail Před 4 lety

    You are a life saver!

  • @lonigaming5880
    @lonigaming5880 Před 5 lety

    Great video!

  • @marcushendriksen8415
    @marcushendriksen8415 Před 5 lety

    Excellent video and thought-provoking material as usual! It's got me wondering about cubic congruences now...

  • @amaliacoughlan7071
    @amaliacoughlan7071 Před 4 lety

    Thanks man! That was so cool.

  • @AaronHe
    @AaronHe Před 5 lety +1

    You should do geometry.

  • @helloitsme7553
    @helloitsme7553 Před 5 lety

    Another way: substitute x=7k+c, then (7k+c)^2+2(7k+c)-1=49k^2+14kc+c^2+14k+2c-1=7(7k^2+2kc+2k)+c^2+2c-1 thus we have to find c between 0 and 7 for which c^2+2c-1 is congruent to 0 mod 7. And then check for all those numbers

  • @solomonbirhane3648
    @solomonbirhane3648 Před 5 lety

    you areThe Brilliant one keep it up

  • @mathematicsanalysis7213

    Really good,,, sir

  • @user-sg1eu2or3c
    @user-sg1eu2or3c Před 3 lety

    Very good

  • @selenalu444
    @selenalu444 Před 5 lety +1

    Wow~that's amazing

  • @dwaipayandattaroy9801
    @dwaipayandattaroy9801 Před 5 lety +3

    1 step seems forced logic like nah ? But solvable a+b whole sq , what training impact on mind

  • @radouaniabdelhadi332
    @radouaniabdelhadi332 Před 5 lety

    Very nice

  • @thebloxxer22
    @thebloxxer22 Před 5 lety +1

    From Algebra I to Either an advanced form of Calculus or Pre-Calc.

  • @DarrenMcStravick
    @DarrenMcStravick Před 5 lety +2

    Bro that intro was so gangsta my supreme boi

    • @LS-Moto
      @LS-Moto Před 5 lety +1

      Goes to show how cool math really is

  • @DeepakKumar-qv1zb
    @DeepakKumar-qv1zb Před 5 lety +1

    Good bro keep on

  • @newtonnewtonnewton1587
    @newtonnewtonnewton1587 Před 5 lety +1

    Nice subjct thanks a lot for u

  • @xcalibur6482
    @xcalibur6482 Před 5 lety +2

    How can I send you a problem?🤔

  • @user-zt4hf2eu6g
    @user-zt4hf2eu6g Před 2 lety

    or just complete the square lol. x^2+2x+1-2=0 x^2+2x+1= 2 (x+1)^2 = 2 x+1 = sqrt(2) x sqrt(2)-1 OOOOR x+1= -sqrt(2) x = -sqrt(2) - 1. or just use the determinant lol

  • @hero947
    @hero947 Před 5 lety

    @Blackpenredpen you can solve this : ∫1/(e^x + e^-x +1) dx ?

  • @user-nl7mn4rr6s
    @user-nl7mn4rr6s Před 5 lety +1

    可能加了別的倍數也是解,怎麼證明這就是全部的解?

  • @wojtek9395
    @wojtek9395 Před 5 lety +2

    What about non prime numbers in place of 7?

    • @ivan1793
      @ivan1793 Před 5 lety

      That's a very general question.
      And my very general answer would be: use the Chinese remainder theorem.

  • @mryip06
    @mryip06 Před 3 lety

    Amazing

  • @shandyverdyo7688
    @shandyverdyo7688 Před 5 lety +1

    What about some integrals again?

  • @UrViridescentLeaf
    @UrViridescentLeaf Před 5 lety +2

    👍

  • @christiansmakingmusic777

    You can’t take the square root unless it is a quadratic residue. Only half the non-zero residues are quadratic residues. 1,2,4 are the quadratic residues, 3,5,6 have no square root over the finite field of integers modulo seven.

  • @drpeyam
    @drpeyam Před 5 lety +3

    That intro 😂

  • @srpenguinbr
    @srpenguinbr Před 5 lety

    Maybe you could that the quadratic is equal to 7k and use the quadratic formula.
    Then, use those formulas for the pithagorean triples and find what values for k give an integer solution to x

  • @lakhwinderhairtransplantco6803

    I have some problems in 3 dimensional geometry

  • @josephhtoo1
    @josephhtoo1 Před 5 lety +3

    Can you do a day in my life?

  • @nicolassamanez6590
    @nicolassamanez6590 Před 5 lety +1

    but what about (x+1)^2=16mod7? since 16mod7=2mod7

    • @skallos_
      @skallos_ Před 5 lety +1

      That will give you x+1=+-4 (mod 7).
      x=3,-5 (mod 7).
      x=2,3 (mod 7).

    • @Theraot
      @Theraot Před 5 lety +1

      Ends up the same, even if you take (x+1)^2 = 2+7*14 (mod 7) or any other square of the form 2+7n. Note: 2+7*14 = 100.
      Proof?
      Hmm...
      This is what I have been able to come up with:
      Any other square you can build form adding 7 multiple times to 9 will be 2+7+7m where m is positive integer... And must be a square, at least equal to 9 = 3^2.
      Thus, 2+7+7m = 9 + 7m = (3 + k)^2
      =>
      9 + 7m = (3 + k)^2
      =>
      9 + 7m = 3^2 + 2(3)k + k^2
      =>
      9 + 7m = 9 + 6k + k^2
      =>
      7m = 6k + k^2
      Given that 6 = 2 * 3, 6 does not share factors with 7, thus this factor must come from m....
      7a +7(6)b = 6+k^2
      =>
      6 = 7(6)b
      7a = k^2
      Given that 7a must be a square, therefore a must be a multiple of 7, in fact, it must be a square by 7: a = 7c^2
      =>
      7(7c^2) = k^2
      =>
      7c = k
      Or simply, given that we know that 6k = 7(6)b
      =>
      k = 7b
      We conclude that k must be a multiple of 7, in other words k = 0 (mod 7)
      Alright, go back to (x+1)^2 = 2 (mod 7) knowing that 7m = 0 (mod 7) and 7m = 6k + k^2
      =>
      (x+1)^2 = 2 + 7 (mod 7)
      =>
      (x+1)^2 = 2 + 7 + 7m (mod 7)
      =>
      (x+1)^2 = 2 + 7 + 6k + k^2 (mod 7)
      =>
      (x+1)^2 = 9 + 6k + k^2 (mod 7)
      =>
      (x+1)^2 = 9 + 2(3)k+k^2 (mod 7)
      =>
      (x+1)^2 = (3 + k)^2 (mod 7)
      =>
      (x+1)^2 = (3 + k)^2 (mod 7)
      =>
      (x+1)^2 = (3 + k)^2 (mod 7)
      =>
      x + 1 = 3 + k (mod 7), x + 1 = -3 - k (mod 7)
      =>
      x = 2 + k (mod 7), x = -4 - k (mod 7)
      And since we know that k = 0 (mod 7):
      x = 2 + k (mod 7), x = -4 - k (mod 7)
      =>
      x = 2 (mod 7), x = -4 (mod 7)
      =>
      x = 2 (mod 7), x = 3 (mod 7)
      That is the same result on the video (4:36), this shows that the selection of square is irrelevant for this case.

  • @6c15adamsconradwilliam3

    Can we differentiate both sides of the congruence?

  • @muhammadqasim7056
    @muhammadqasim7056 Před 5 lety +1

    Video on cycloids next?

  • @swarnakshi_official8533

    Sir what is the answer of X^2 congruent 27(mod59)

  • @conorbrennan5838
    @conorbrennan5838 Před 5 lety

    Can you integrate cos (x^2) next , hint : use taylor series

  • @hassanalihusseini1717
    @hassanalihusseini1717 Před 5 lety

    If you have x^2+2x-1==0 mod 7 it is much easier to try all possible reminders:
    0: 6
    1: 2
    2: 0 This is a solution
    3: 0 This is also a solution.
    4: 2
    5: 6
    6: 5

  • @thomaswilliams9320
    @thomaswilliams9320 Před 5 lety +3

    You should run in 2020

  • @scimaniac
    @scimaniac Před 5 lety +1

    What if it is even?

  • @Random12260
    @Random12260 Před 4 lety

    Ah, the elusive green pen

  • @snigdhasahoo9952
    @snigdhasahoo9952 Před 4 lety

    If there is any coefficient in x² then what should to do ???

    • @ZipplyZane
      @ZipplyZane Před 10 měsíci

      Then you divide all the terms by the the coefficient. Since you divide by the same thing on both sides, the equation remains valid, and thus it doesn't mess up the value of x.
      So, say, 3x²+4x=-3 becomes x²+(4/3)x=-1

  • @ssdd9911
    @ssdd9911 Před 5 lety +2

    doraemon in the middle of the video

  • @rogerkearns8094
    @rogerkearns8094 Před 5 lety +1

    Up the mods.

  • @isaacmojica3463
    @isaacmojica3463 Před 3 lety

    Dude you're very awsome. I was looking this kind of way s¡to solve that equiation for hours an nothing: Ty. This is a beautiful simple way and easy to understand
    :D

  • @diederickfloor4261
    @diederickfloor4261 Před 4 lety

    why doesn't this work:
    x^2 + 2x - 1 cong. 0 mod 7
    x^2 + 2x cong. 1 mod 7
    x(x + 2) cong. 1 mod 7
    x cong. 1 mod 7
    x + 2 cong 1 mod 7
    x cong. 6 mod 7
    edit: I know line 4 is not justified you can only split the factors with 0 mod n.

  • @johnariessarza3622
    @johnariessarza3622 Před 5 lety +1

    Make a video of mod is even..

    • @blackpenredpen
      @blackpenredpen  Před 5 lety +1

      John Aries Sarza I have another video when mod is composite. See description

    • @johnariessarza3622
      @johnariessarza3622 Před 5 lety

      blackpenredpen thanks bprp.. hope i can meet you personally. Always watching your tutorial blog, thanks.

    • @blackpenredpen
      @blackpenredpen  Před 5 lety

      @@johnariessarza3622 : ))))) Thank you!!

  • @jabir5768
    @jabir5768 Před 5 lety +2

    How to be good at maths:
    1) Be crazy about maths
    2)There is no number 2
    3)There is no number 3
    ...
    n)There is no number n
    Pls validate my worthless existence

  • @BigDBrian
    @BigDBrian Před 5 lety

    so... what do you do if it isn't prime?

    • @blackpenredpen
      @blackpenredpen  Před 5 lety

      mrBorkD I have that video in the video already. It’s unlisted so be the first few to watch!! : )

    • @BigDBrian
      @BigDBrian Před 5 lety

      @@blackpenredpen oh cool, thanks

  • @RexxSchneider
    @RexxSchneider Před 2 lety +1

    At 4:32 "Two answers - that's it, right?" Not really. You failed to consider that 4^2 is also congruent to 2 mod 7.
    Now, it turns out that we will end up with the same values for x, but how is the viewer to know that will always be the case?
    It is in fact true that quadratic residues (mod p) occur in pairs in Z/pZ, if p is an odd prime, but that also isn't obvious to the viewer, and you haven't proven it.
    You can also use the quadratic formula directly to find solutions by changing from a congruence to an equality with an extra (integer) variable:
    x^2 + 2x - 1 ≡ 0 mod 7 is equivalent to x^2 + 2x - 1 = 7n where n is an integer.
    So x^2 + 2x - (1 + 7n) = 0 and we can use the quadratic formula:
    x = (-2 ± √(4 + 4(1+7n)))/2 = -1 ± √(1 + 1+7n) after diving top and bottom by 2
    x = -1 ± √(2+7n) but we require integer solutions, so the term inside the square root must be a perfect square, which we can call m^2
    x = -1 ± m where m^2 = 2 + 7n. The condition m^2 = 2 + 7n is equivalent to m^2 ≡ 2 mod 7 and the only values of m that have quadratic residues of 2 mod 7 are m=3 and m=4 mod 7.
    So either m = 3 + 7k or m = 4 + 7k where k is an integer.
    That gives x = -1 ± (3 + 7k), producing x = 2 + 7k or x = -4 - 7k; or x = -1 ± (4 + 7k), producing x = 3 + 7k or x = -5 - 7k. But -4 - 7k gives the same set of numbers as 3 + 7k does, and -5 - 7k gives the same set of numbers as 2 + 7k does, as k takes on all positive and negative values. The complete set of x values may therefore be summarised as 2 + 7k and 3 + 7k.

  • @garavelustagaravelusta9717

    Better Solution:
    x^2 + 2x = 1mod7
    x(x+2) = 1 mod7
    (x+2) = (1/x)mod7
    Find pair elements in mod7 such that their multiplication is equal to 1 in mod7. (Hence they form a pair of x and 1/x)
    Pair 1: 1 1
    x+2 = 1mod7 and x = 1mod7 ? No solution for the system!
    Pair 2: 2 4 (8 = 1mod7)
    Option 1: x = 2mod7 and x+2 = 4mod7
    x = 2mod7 (Valid)
    Option 2: x = 4mod7 and x+2 = 2mod7 -> x=0mod7 (Not Valid!)
    Pair 3: 3 5 (15 = 1mod7)
    Option 1: x = 3mod7 and x+2 = 5mod7
    x = 3mod7 (Valid)
    Option 2: x = 5mod7 and x+2 = 3mod7 -> x = 1mod7 (Not Valid!)

  • @user-eq1hr2ib3p
    @user-eq1hr2ib3p Před 4 lety

    When the congruence has no solution
    ؟

  • @carftinginshakthi5720
    @carftinginshakthi5720 Před 5 lety +1

    BRO PLZ SPEAK LITTLE BIT LOUDER

  • @gauravsuyal4456
    @gauravsuyal4456 Před 5 lety +1

    1st like