Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm a computer science grad student, so forgive me for being a little rusty on my math here. I'm working with Gaussian numerical Integration.I know how to find everything, I just wanted to know the best way to solve for the unknowns of the form:

a = w1+w2

b = w1X1+w2

c = w1X1^2+w2

I've already found the solution using elimination and substitution, but it seems intuitive that this could be solved more easily. What would be the best way to solve for the unknowns when a, b, and c are given?

share|improve this question
    
Are the $w$'s your unknowns or the $X$'s? –  Mitch May 11 '11 at 16:47
    
Odd, I'd have thought the second equation would be something like $b=w_1 X_1+w_2 X_2$ for generating a Gaussian quadrature. Anyway, see this. –  J. M. May 11 '11 at 17:30

1 Answer 1

up vote 2 down vote accepted

Since all equations have $w_2$ in them, it makes sense to transform to the differences:

$$ \begin{eqnarray} b-a&=&w_1(X_1-1)\;,\\ c-a&=&w_1(X_1^2-1)\;. \end{eqnarray} $$

Now you can use the fact that $X_1^2-1$ contains $X_1-1$ as a factor by dividing the two equations:

$$\frac{c-a}{b-a}=X_1+1\;.$$

That gives you $X_1$, and the others follow by subtitution into $b-a=w_1(X_1-1)$ and then into $a=w_1+w_2$.

share|improve this answer
    
That's exactly what I was looking for. Thank you. –  Championcake May 11 '11 at 17:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.