How can I solve this system of equations? I've tried all night and all day but I get nowhere every time

How can I solve this system of equations? I've tried all night and all day but I get nowhere every time.
[math]a+b+c+d=100[/math],

[math]a^2=b^2+c^2+d^2[/math], and

[math]d=c+1[/math],

I've reduced it down to two equations by subbing in the value given for [math]c[/math].

[math]a+b+2c=99[/math], and

[math]a^2=b^2+2c^2+2c+1[/math].

I've tried rearranging the first equation for [math]a[/math] and squaring the RHS and letting it equal the second equation's RHS. It gets messy with non-linear terms.

How do I do this? I know there are solutions because Wolfram. Also I'm not that retarded at math so feel free to be technical. PS: I don't want to graph them and find intersections. Pic unrelated.

You have three equations and four unknowns, dingus. You cant solve this.

Prove it.

What you said applies very well to linear equations... but for non linear ones you better do a more in depth analysis.

I'd wager that the solution is a two dimensional object, just solve in terms of two variables and leave the two other variables as functions of the independent ones

Now use eq 1 to substitute for a in the last equation.This gives you a second order equation in b and c.

Which is a conic section. With a and d arbitrary more or less (some values will give a conic with no solutions e.g. x^2 = -1).

cramers rule

Nah sorry dog. Don't work that way.

Yeah I'm sure you're right. I'll give it another shot but it always gets so messy with non-linear terms.

I see what you mean. I'll give an update in a few minutes.

Could you please explain how Cramer's rule would help here? There are 3 equations and 4 unknowns.

le bait

Bait? How? Are not understanding?

Update:
[math]a=(99-b-2c)^2[/math] from eqn 1.
Then [math]a^2=b^2 + 4 b c - 198 b + 4 c^2 - 396 c + 9801[/math].
But this is also in eqn 2.
Then [math]b^2 + 4 b c - 198 b + 4 c^2 - 396 c + 9801=b^2+2c^2+2c+1[/math].
Simplifying, [math]4 b c - 198 b + 2 c^2 - 398 c + 9800 = 0[/math].
I don't think I've made any mistakes so far but I'm scared to try to express [math]c[/math] in terms of [math]b[/math] because I just know it'll get nasty and I'll make a mistake and waste 20 mins of my life.
There must be a better way?

use a matrix fuckturd
werks errytime

EDIT with first line.
[math]a=99-b-2c[/math]. Not sure why I squared that.

There are several ways to solve systems of equations using linear algebra.
If you can give me the name of a method I can use here, I'd like to fucking hear it.

Okay bois, pure mathematics freshman coming the fuck in to solve this or you.

Let me get this clear:

First take the equation

[math] a^2=b^2+2c^2+2c+1 [/math] and use your IQ to reduce:

[math] a^2 - b^2 =2c^2+2c+1 [/math]

which then, through harder IQ power becomes

[math] (a+b)(a-b) = 2c^2+2c+1 [/math]

That is our first equation in what I like to call, non-brainlet form. That is to say, it will yield a solution.

Then take [math]a+b+2c=99[/math] and also put in non-brainlet form to get
[math] a+b = 99 - 2c [/math]

Now we have a form for a+b so now replace
[math](99 - 2c)(a-b) = 2c^2+2c+1[/math]

which yields

[math](a-b) = \frac{2c^2+2c+1}{99 - 2c} [/math]

Now add this on top of our equation for a+b to get

[math]2a = \frac{2c^2+2c+1}{99 - 2c} + 99 - 2c [/math]

which then becomes

[math]a = \frac{\frac{2c^2+2c+1}{99 - 2c} + 99 - 2c}{2} [/math]

And then, repalcing in one of our equations for a + b to get

[math]b = 99 - 2c - \frac{\frac{2c^2+2c+1}{99 - 2c} + 99 - 2c}{2} [/math]

Then obviously [math] d = c + 1 [/math]

and c is our free variable

Plugging in c=0 we get d=1, a=49.50505050...
b = 49.49494949...

You can try it out.

There are 3 unknowns since d is given as a function of c.

OP here. Absolutely genius mate. Props for knowing your shit unlike some people here.
Where do you learn these techniques? I'm also studying pure mathematics (2nd year) but this seems like some serious out of the box thinking.
I got this problem from a stupid word puzzles book last night. Finally got some closure now. Cheers.

No problem. I would have solved it earlier but I was playing overwatch with a friend, but then he left me because he got hungry so I decided to attack the beast.

>Where do you learn these techniques?

Well, if you notice I really didn't use any technique or theorem. But I think the most important part was when I decided to get an equation for (a+b)(a-b) and my logic there was that if calculus has taught me anything, it is that products are good, sums are bad, so take everything you have and somehow turn it into a product. So call it the "instinct to turn everything into a product" technique.

After that the pieces started falling together.

Yeah I hear ya man. While playing around with it I actually got to that [math](a+b)(a-b)[/math] term but didn't think to do much with it.

dude there all lines on the graph

what is a line

what is a linear equation

>what is a linear equation

A linear equation is one where all the terms are... linear? So what about this one, dummy: [math]a^2=b^2+c^2+d^2[/math]

This is not a linear algebra problem, it is an algebra problem.

Also, I already found the solutions here and they turn out to be infinitely many.

In[1]:= Solve[
a + b + c + d == 100 && a^2 == b^2 + c^2 + d^2 && d == c + 1, {a, b,
c, d}]

During evaluation of In[4]:= Solve::svars: Equations may not give solutions for all "solve" variables.

Out[1]= {{a -> (-4901 + 197 c - 3 c^2)/(-99 + 2 c),
b -> (-4900 + 199 c - c^2)/(-99 + 2 c), d -> 1 + c}}

Suppose instead we want integer solutions:

In[2]:= Solve[
a + b + c + d == 100 && a^2 == b^2 + c^2 + d^2 && d == c + 1, {a, b,
c, d}, Integers]

Out[2]= {{a -> -7551, b -> -2450, c -> 5050, d -> 5051}, {a -> -2551,
b -> 2550, c -> 50, d -> 51}, {a -> -171, b -> 34, c -> 118,
d -> 119}, {a -> -139, b -> 66, c -> 86, d -> 87}, {a -> 39,
b -> 34, c -> 13, d -> 14}, {a -> 71, b -> 66, c -> -19,
d -> -18}, {a -> 2451, b -> -2450, c -> 49, d -> 50}, {a -> 7451,
b -> 2550, c -> -4951, d -> -4950}}

a=39
b=34
c=13
d=14

This has to be the nicest, cleanest solution.

OP here. This was the solution presented in the puzzle book.
The puzzle was this:
A man has a wife, daughter, and son.
The sum of each family members' ages total to 100.
The sum of the squares of the wife's, daughter's and son's ages equal the square of the husband's age.
The daughter is 1 year younger than her brother.

So this solution is the only plausible one for the word problem and is the solution in the book.

Mind you I am very triggered about the book because how the fuck is the average reader supposed to work that one out? It is a Game of Thrones style puzzle book. Fucking ridiculous.

>math freshman
Not for long, I see. You chose the hardest path to the result. If nobody posts the correct way this problem was intented to be solved by in 10 hours, I will post it.

Then you have two equations with three unknowns.

[math]
(99 - b - 2c)^2 = 99^2 - 198b -396c + b^2 + 4c^2 + 4bc = b^2 + 2c^2 + 2c + 1 \\
-2c^2 + 398c + (1-99^2) +198b - 4bc \implies -2(c^2 - 199c + 2bc -198b + 4900) = 0 \\
c^2 +(2b - 199)c + (4900-198b) = 0
[/math]
Quadratic formula solves for b in terms of c, not sure what to do from there.

Explicitly, I guess
[math]
c = \frac{199 - 2b \pm \sqrt{(2b-199)^2 - 4(4900 - 198b)}}{2}
[/math]
Which makes b our free variable, this should be equivalent to the solution the other guy got. Didn't see his before I posted mine.

Samefag detected.

You can do much of what did but add the fourth VERY IMPORTANT constraint that all the numbers are ages, or rather that they're all positive integers. The problem can't be properly solved otherwise.

Eh, I guess perservering we can simplify that expression a little further to a single quadratic expression under the radical, which is
[math]
c = \frac{199 - 2b \pm \sqrt{(2b-199)^2 - 4(4900 - 198b)}}{2}
[/math]

wait fuck that didn't copy right
[math]
c = \frac{199 - 2b \pm \sqrt{4b^2 + 394b + 20001}}{2}
[/math]

>You can do much of what did but add the fourth VERY IMPORTANT constraint that all the numbers are ages, or rather that they're all positive integers. The problem can't be properly solved otherwise.

Why would you turn a good problem and turn it into a brainlet exercise?

Well, you also didn't give us all of the information, OP. There are more constraints you neglected. Can the son and daughter be older than the mother and father?

In[1]:= Solve[
a + b + c + d == 100 && a^2 == b^2 + c^2 + d^2 && d == c + 1 &&
a > c && a > d && b > c && b > d && {a, b, c, d} > 0, {a, b, c,
d}, Integers]

Out[1]= {{a -> 39, b -> 34, c -> 13, d -> 14}}

There's only one solution.

>implying it's not a brainlet exercise if the fourth constraint is just "plug in any value for any c"

>prove it

Not doing this super carefully, but could you say that each equation corresponds to a closed (not necessarily concave or connected, but I assume they probably are) region in R^4. Four variables will correspond to a 3-dimensional "hypervolume" region. Intersections of two of those regions (which obviously intersect since we can compute solutions) produces a region of two-dimensional volume. Intersecting a two dimensional volume with an overlapping three dimensional "hypervolume" will produce some two dimension sub-region volume. Hence there is no precise single solution.

oh wait, I think all my dimensions were one short. But the idea is the same.

>Hence there is no precise single solution.
But there is a solution, and you said there wasn't.

Anyways, now we know that OP wanted an integer solution with some constraints between the variables, so there is one unique solution for his problem.

this is literally algebra 1

[math] a + b + c + d = 100 [/math]
[math] a^2 = b^2 + c^2 + d^2 [/math]
[math] d = c + 1 [/math]
Eliminate b:
[math] a^2 = (100 - a - c - d)^2 + c^2 + d^2 [/math]
[math] d = c + 1 [/math]
Eliminate d:
[math] a^2 = (100 - a - c - (c+1))^2 + c^2 + (c+1)^2 [/math]
Expand:
[math] 0 = 3 c^2 + 2 ac - 99 a - 197 c + 4901 [/math]
Substitute [math]a = \frac{1}{\sqrt{13}} x - \frac{1}{\sqrt{13}} y [/math] and [math]c = \left( \frac{1}{2} + \frac{3}{26} \sqrt{13} \right) x + \left( \frac{1}{2} - \frac{3}{26} \sqrt{13} \right) y [/math]
[math] 0 = \left( \frac{3}{2} + \frac{11}{26} \sqrt{13} \right) x^2 + \left( - \frac{197}{2} - \frac{786}{26} \sqrt{13} \right) x + \left( \frac{3}{2} - \frac{11}{26} \sqrt{13} \right) y^2 + \left( - \frac{197}{2} + \frac{786}{26} \sqrt{13} \right) y + 4901 [/math]
Complete the squares:
[math] 0 = \left( \frac{3}{2} + \frac{11}{26} \sqrt{13} \right) \left(x - \frac{249}{2} + 25 \sqrt{13} \right)^2 + \left( \frac{3}{2} - \frac{11}{26} \sqrt{13} \right) \left(y - \frac{249}{2} - 25 \sqrt{13} \right)^2 + \frac{10001}{4} [/math]
[math] 1 = \left( - \frac{6}{10001} + \frac{22}{130013} \sqrt{13} \right) \left(y - \frac{249}{2} - 25 \sqrt{13} \right)^2 - \left( \frac{6}{10001} + \frac{22}{130013} \sqrt{13} \right) \left(x - \frac{249}{2} + 25 \sqrt{13} \right)^2 [/math]
So we get the parametric solution

[math] x = \frac{249}{2} - 25 \sqrt{13} + \frac{1}{\sqrt{\frac{6}{10001} + \frac{22}{130013} \sqrt{13}}} \sinh(t) [/math]
[math] y = \frac{249}{2} + 25 \sqrt{13} + \frac{1}{\sqrt{-\frac{6}{10001} + \frac{22}{130013} \sqrt{13}}} \cosh(t) [/math]
with [math] t \in \mathbb{R} [/math].
You can now backwards substitute to get long and ugly solutions for [math]a,b,c,d [/math] since:
[math]a = \frac{1}{\sqrt{13}} x - \frac{1}{\sqrt{13}} y [/math]
[math]c = \left( \frac{1}{2} + \frac{3}{26} \sqrt{13} \right) x + \left( \frac{1}{2} - \frac{3}{26} \sqrt{13} \right) y [/math]
[math]d = c + 1 [/math]
[math]b = 100 - a - c - d[/math]

Not hating, great job, but were you trying to make it as complicated as possible?

kek

I have a solution. It probably isn't the best, but whatever. The first thing I did was let [math]f\equiv a+b[/math] and [math]g\equiv a-b[/math]. I then rewrote the equations so
[eqn]a+b+c+d=100[/eqn] becomes
[eqn]f+2c+1=100[/eqn] or
[eqn]c=\frac{99-f}{2}.~~~~~(1)[/eqn]
We also see that
[eqn]a^2-b^2=c^2+d^2[/eqn] becomes
[eqn]fg=2c^2+2c+1.[/eqn] If we substitute equation (1) into this, we get:
[eqn]f(g+1)=2c^2+100[/eqn] which becomes
[eqn]f(g+1)=2\left(\frac{99-f}{2}\right)^2+100.[/eqn] If we expand this out and divide through by f, we get:
[eqn]g+1=\left(\frac{99^2+200}{2f}\right)-99+\frac{f}{2}.~~~~~~(2)[/eqn]

This equation tells us that f is a factor of [math]99^2+200=10001.[/math] That much I could in my head, but finding the factors for this was a nightmare. I actually went back through and looked for a mistake because I thought this was prime. It isn't. The factors are 73 and 137. If you plug these in to (2), you get [math]g=5[/math].

Since [math]f=a+b,[/math] and [math]a+b

Let me fix that for you:

I have a solution. It probably isn't the best, but whatever. The first thing I did was let [math]f\equiv a+b[/math] and [math]g\equiv a-b[/math]. I then rewrote the equations so
[eqn]a+b+c+d=100[/eqn] becomes
[eqn]f+2c+1=100[/eqn] or
[eqn]c=\frac{99-f}{2}.(1)[/eqn]
We also see that
[eqn]a^2-b^2=c^2+d^2[/eqn] becomes
[eqn]fg=2c^2+2c+1.[/eqn] If we substitute equation (1) into this, we get:
[eqn]f(g+1)=2c^2+100[/eqn] which becomes
[eqn]f(g+1)=2\left(\frac{99-f}{2}\right)^2+100.[/eqn] If we expand this out and divide through by f, we get:
[eqn]g+1=\left(\frac{99^2+200}{2f}\right)-99+\frac{f}{2}.(2)[/eqn]

This equation tells us that f is a factor of [math]99^2+200=10001.[/math] That much I could in my head, but finding the factors for this was a nightmare. I actually went back through and looked for a mistake because I thought this was prime. It isn't. The factors are 73 and 137. If you plug these in to (2), you get [math]g=5[/math].

Since [math]f=a+b,[/math] and [math]a+b

bro your LaTex kinda fucked up

Yeah apparently it doesn't take kindly to putting ~ in for spacing.

Nice, mate. Was pleasing to read, took me on a trip back to high school.

>I'd wager
There is no wagering at Veeky Forums, Grandpa.

matrix

So...You gonna post it?