how to slove the congruence such that

$\displaystyle

x^{2}+1\equiv 0 (\bmod 5)

$

cheers!

Printable View

- May 18th 2009, 01:40 AMxixihahahow to slove the congruence s.t x^2+1=0 mod 5 ??
how to slove the congruence such that

$\displaystyle

x^{2}+1\equiv 0 (\bmod 5)

$

cheers! - May 18th 2009, 04:29 AMDeadstar
Since you're working in mod 5 you just need to check the values 0,1,2,3,4.

For 0 we have, $\displaystyle 0^2 + 1 = 1$

For 1 we have, $\displaystyle 1^2 + 1 = 2$

For 2 we have, $\displaystyle 2^2 + 1 = 5 = 0$ mod 5

For 3 we have, $\displaystyle 3^2 + 1 = 10 = 0$ mod 5

For 4 we have, $\displaystyle 4^2 + 1 = 17 = 2$ mod 5

So x = 2 or 3.

Do you understand what mod 5 means? - May 18th 2009, 05:05 AMxixihaha
if the modulo here is 7. shall i only need to consider the values 0 up to 6?

- May 18th 2009, 05:07 AMRapha
- May 18th 2009, 05:33 AMxixihaha
thank you~i understand now.

see if the question is like

$\displaystyle

x^{2}-1\equiv 0 (\bmod 5)

$

can i use that method to solve the problem?? - May 18th 2009, 05:39 AMDeadstar
Yep. Just plug in the values of x you can use and mod the answer by 5 until its between (or equal to) 0 and 4. Can you figure out which values of x will give $\displaystyle x^2 - 1 = 0$ mod 5? Hint: there's two of them.

- May 18th 2009, 05:48 AMxixihaha
$\displaystyle

(x-1)(x+1)\equiv 0 (\bmod 5)

$

$\displaystyle

x\equiv 1 (\bmod 5)

$

$\displaystyle

x\equiv -1 (\bmod 5)

$

so x =0,1

am i right? - May 18th 2009, 06:33 AMDeadstar
I think you've mistyped there. Should be 'so x = -1,1'

But -1 = 4 mod 5 so the answer is x = 1 and 4.

Test this by putting the values into $\displaystyle x^2 - 1$.

x=0 gives 0-1 = -1 = 4 mod 5 (since -1 + 5 = 5)

x=1 gives 1-1 = 0.

x=2 gives 4-1 = 3.

x=3 gives 9-1 = 8 = 3 mod 5 (since 8 - 3 = 5)

x=4 gives 16-1 = 15 = 0 mod 5 (since 15 - 5 - 5 - 5 = 0)

This confirms that 1 and 4 are the correct answers. - May 18th 2009, 07:35 AMxixihaha
oh yes. you are right. im quite clear now.

last,i'll say thank you to Rapha and Deadstar for helping me.

cheers.