function Apr18()
% There are four nonlinear equations in the 4 unknowns w1, w1, x1, x2
% Approx integral must be exact for integrand = 1:
%                     w1 + w2 = 2
% Approx integral must be exact for integrand = x:
%                     w1*x1 + w2*x2 = 0
% Approx integral must be exact for integrand = x^2:
%                     w1*x1^2 + w2*x2^2 = 2/3
% Approx integral must be exact for integrand = 1:
%                     w1*x1^3 + w2*x2^3 = 0
% So pass fsolve a function F like this..

function y = F(x)
x1 = x(1); x2 = x(2); w1 = x(3); w2 = x(4);
y = [w1+w2-2; w1*x1+w2*x2; w1*x1^2+w2*x2^2-2/3; w1*x1^3+w2*x2^3];
