Funny Stuff Thread.... to loosen your day

Status
Not open for further replies.

Miragedriver

Brigadier
Something to get you thinking today

MdzjLv4.jpg
 
Excellent amigos.
maybe not just yet ...:

Pretty elementary algebra :)

...
here's the challenge:
the most complicated way to solve it LOLOL

I offer (actually I did it while waiting for a waiter with the check for me) to solve the nonlinear system
function F = Amigo(x)

F(1) = 3*x(1) - 30;
F(2) = x(1) + 4*x(2) - 18;
F(3) = 2*x(2) - 2*x(3) - 2;
F(4) = x(3) + x(1)*x(2) - x(4);
in Matlab, starting from the guess of all zeros:

>> [x,fval,exitflag,output] = fsolve(@Amigo, [0 0 0 0])

Equation solved.

fsolve completed because the vector of function values is near zero
as measured by the default value of the function tolerance, and
the problem appears regular as measured by the gradient.

<stopping criteria details>


x =

10.0000 2.0000 1.0000 21.0000


fval =

1.0e-09 *

0 0 0 -0.1384


exitflag =

1


output =

iterations: 6
funcCount: 35
algorithm: 'trust-region-dogleg'
firstorderopt: 1.3839e-09
message: 'Equation solved.…'
getting solution of Today at 5:29 PM as the fourth element (highlighted above) of the vector solving a nonlinear problem F(x) = 0

beat this!
(am leaving the pub now)

EDIT am I trolling
Funny Stuff Thread.... to loosen your day
? LOL!
 
Last edited:
Status
Not open for further replies.
Top