# modular arithmetic question help

I have to solve $x$ given the next three equations:$x=2\mod 7$, $x=3\mod 11$ and $x=4\mod 13$.

What I tried: first try to find $x$ that satisfies the first two equations. There are $a,b\in \mathbb Z$ such that $7a+11b=1$. So $x=21a+22b$. Then I thought that if I add a multiple of $77$ to $x$, then $x\mod 77$ won't change. But here I got stuck.

Thank you.

-
Have you tried actually finding $a$ and $b$? – Chris Eagle Feb 26 '13 at 16:32
@Chris Eagle yes but I could do that also at the end, or not? – Badshah Feb 26 '13 at 16:33
So you're stuck, and see a thing you could usefully do, and then... don't do it? This is not good problem-solving strategy. – Chris Eagle Feb 26 '13 at 16:34
@Chris Eagle I actually tried using the last step but I couldnt find anything, but I wanted to mention the last step – Badshah Feb 26 '13 at 16:35
– lab bhattacharjee Feb 26 '13 at 16:52

$\rm mod\ 11,13\!:\,\ 2x\equiv -5$ $\iff$ $\rm mod\ 143=11\cdot 13\!:\,\ 2x\equiv -5\equiv 138\!\iff\! x\equiv 69.\$ Therefore, applying  Easy CRT  to solve $\rm\ x\equiv 69\,\ (mod\ 143),\ \ x\equiv \color{#C00}2\,\ (mod\ 7)\$ yields
$$\rm mod\,\ 7\cdot 11\cdot 13\!:\,\ x\,\equiv\, 69 + 143\left[\dfrac{\color{#C00}2\!-\!69}{143}\ mod\ 7\right]\equiv 212,\ \ \ by\ \ \ mod\ 7\!:\,\ \dfrac{2-69}{143}\,\equiv\, \dfrac{3}3 \,\equiv\, 1$$