• Welcome to the new Internet Infidels Discussion Board, formerly Talk Freethought.

Math Problem Thread

steve_bank

Diabetic retinopathy and poor eyesight. Typos ...
Joined
Nov 9, 2017
Messages
13,782
Location
seattle
Basic Beliefs
secular-skeptic
Is there an x,y that solves the equations?
a = 7
b = 4
a = 2*x + y*b
b = x*y + a/4
 
Using steve_bank's statement of it, I find

a = 7, b = 4, x = (1/4)*(7+sqrt(-23)), y = (1/8)*(7-sqrt(-23))

and also sqrt(-23) -> -sqrt(-23)
 
Here's a problem that I found online, one reportedly due to Srinivasa Ramanujan:

sqrt(x) + y = 7
x + sqrt(y) = 11

It has a solution in positive integers.
 
It has a solution, but you still have to solve two simulaneos eqiations for a closed form solution.


I'll wade through it. I thought the xy product would make it impossible to separate variables.

1st steps

a = 2*x + y*b
0 = 2*x + y*b - a

b = x*y + a/4
0 = x*y + a/4 - b

2*x + y*b - a = x*y + a/4 - b

2x + y*b - x*y = a/4 - b -a

2x + y(b - x) = a/4 - b -a

y(b - x) = a/4 - b -a - 2x

y = [a/4 - b -a - 2x]/[b - x]

to be continued...
 
2*x + y*4 = 7 = a
Xy + 7/4 = 4 = b

2*x + y*4 = 7
4y = 7-2x
Y= 7/4 -x/2.
X=-2y+7/2

Xy + 7/4 = 4
Xy = 4 - 7/4
Y = 4/x - 7/4x (x!=0)...
X = 4/y - 7/4y (y!=0)...

(7/4 - x/2 = 4/x - 7/4x)*4x
7x - 2(x^2) = 16 - 7

- 2x^2 + 7x - 9 = 0 (has no real roots)

(-2y+7/2 = 4/y - 7/4y)*-4y
8y*y+14y=-16+7

8y*y+14y+23=0 (has no real roots)
 
2*x + y*4 = 7 = a
Xy + 7/4 = 4 = b

2*x + y*4 = 7
4y = 7-2x
Y= 7/4 -x/2.
X=-2y+7/2

Xy + 7/4 = 4
Xy = 4 - 7/4
Y = 4/x - 7/4x (x!=0)...
X = 4/y - 7/4y (y!=0)...

(7/4 - x/2 = 4/x - 7/4x)*4x
7x - 2(x^2) = 16 - 7

- 2x^2 + 7x - 9 = 0 (has no real roots)

(-2y+7/2 = 4/y - 7/4y)*-4y
8y*y+14y=-16+7

8y*y+14y+23=0 (has no real roots)
Y=9/(4x)
X=9/(4y)

- 2x^2 + 7x - 9 = 0
- 2x^2 + 7(9/(4y)) - 9 = 0
2x^2 + 9 = 7(9/(4y))
2*4x^2/9*7 + 4/7= (1/4*y)
1/(2*4x^2/9*7) + 1/(4/7)= y
9*7/2*4x^2 + 7/4= y

8y*y+23=-14(9/(4x))
2y*y+23*4=-14(9/x)
-(y*y)/7*9-23*2/7*9=(1/x)
-7*9/y*y-7*9/23*2=x
...

These two functions appear to intersect in the upper left quadrant, which is where I expect the solution must be.
 
There are several ways to solve simultaneous equations well covered on the net. Linear algebra only works for linear equations.

1. Simply plot the functions and see if they intersect.
2. Substitution-subtraction.
3. Gausian elmination
4. Matrix operations
5. When all else fails an iterative solver.

4x + y = 10
x + y = 3

Subtraction
4x + y = 10
x + y = 3
------------
3x + 0 = 7

x =7/3

Substitution
4x + y = 10
x + y = 3
y = 3 – x
4x + 3 – x = 10
3x = 7
x = 7/3
y = 10 – 28/3
x = 2.3
y = .6

and

4x + y = 10
4x + y – 10 = 0
x + y = 3
x + y – 3 = 0
4x + y – 10 = x + y – 3
3x – 7 = 0
x = 7/3

Matrices

Scilab treats all variables as matrices.

The problem is expressed as Ax = b. Solve for be the solution x.

4x + y = 10
x + y = 3

Scilab script
A = [4 1;1 1]
b = [10 3]
x = b/A

x = [2.333 0.666]
 
2*x + y*4 = 7 = a
Xy + 7/4 = 4 = b

2*x + y*4 = 7
4y = 7-2x
Y= 7/4 -x/2.
X=-2y+7/2

Xy + 7/4 = 4
Xy = 4 - 7/4
Y = 4/x - 7/4x (x!=0)...
X = 4/y - 7/4y (y!=0)...

(7/4 - x/2 = 4/x - 7/4x)*4x
7x - 2(x^2) = 16 - 7

- 2x^2 + 7x - 9 = 0 (has no real roots)

(-2y+7/2 = 4/y - 7/4y)*-4y
8y*y+14y=-16+7

8y*y+14y+23=0 (has no real roots)
Y=9/(4x)
X=9/(4y)

- 2x^2 + 7x - 9 = 0
- 2x^2 + 7(9/(4y)) - 9 = 0
2x^2 + 9 = 7(9/(4y))
2*4x^2/9*7 + 4/7= (1/4*y)
1/(2*4x^2/9*7) + 1/(4/7)= y
9*7/2*4x^2 + 7/4= y

8y*y+23=-14(9/(4x))
2y*y+23*4=-14(9/x)
-(y*y)/7*9-23*2/7*9=(1/x)
-7*9/(y^2)-7*9/23*2=x
...

These two functions appear to intersect in the upper left quadrant, which is where I expect the solution must be.
From here it looks like I have to take -7*9/(y^2)-7*9/23*2=x and get that in terms of Y. Only one of the two quadrants it traverses (y>0) can intersect with the other function, where Y > 0 and X < 0, so the relation can be broken into two functions and the function of negative Y can be discarded.

Once it is solved for Y it can be set equal to 9*7/2*4x^2 + 7/4, and if there is an intersection there, it will be the one which solves the system.

Because it is an intersection, this will give both the X and the Y values which together solve.

I don't want to do the tedium of doing that right now, and I'm at work.
 
The question is whether the problem is linear. If not ten linear algebra does not apply and a solver is required.

The first step would be to plot the two equations and see if they intersect which they do. Using the solver I posted an iterated solution is

a = 6.998 b = 3.996
x = 7.028 y = 3.997

Which jives with plotting the two equations

a = 7
b = 4
a = 2*x + y*b
b = x*y + a/4

It does not look lkie it can be expressed as Ax = b.
 
Contiuing my algebra review.


Trying a substitution.

1. a = 2*x + y*b
2. y = (a – 2*x)/b

3. b = x*y + a/4
4. y = (b - a/4)/x

Substituting 4 into 1.

a = 2*x + b*(b-a/4)/x

a*x = 2*x^2 + b*(b-a/4)
x = ( 2*x^2)/a + (b*(b – a/4))/a
x = .286*x^2 + 1.286
x - .286*x^2 – 1.286 = 0

a = 1
b = -.286
c = -1.286

x = (-b + sqrt(b^2 - 4ac))/2a
x = (-b - sqrt(b^2 – 4ac))/2a
x =-1, 1.286

Plugging into 2 and 4 , not a solution.

Equation 2 is linear, equation 4 is not.

https://courses.lumenlearning.com/w...-for-solving-a-system-of-nonlinear-equations/


A system of nonlinear equations is a system of two or more equations in two or more variables containing at least one equation that is not linear. Recall that a linear equation can take the form Ax+By+C=0. Any equation that cannot be written in this form in nonlinear. The substitution method we used for linear systems is the same method we will use for nonlinear systems. We solve one equation for one variable and then substitute the result into the second equation to solve for another variable, and so on. There is, however, a variation in the possible outcomes.
 
Back
Top Bottom