# Solve system of two equations with dependent variable

Posted 3 months ago
574 Views
|
3 Replies
|
1 Total Likes
|
 I want to solve the following system of two equations for $u$ and $v$ but can't figure out how to input it into WolframAlpha. $$\sum_{i=1}^{n} \frac{x_i-u}{v} = 0$$ $$-\frac{n}{2v}+\sum_{i=1}^{n} \frac{(x_i-u)^2}{2v^2} = 0$$The results I try to get from WA are $$u = \frac{1}{n} \sum_{i=1}^n x_i$$ $$v = \frac{1}{n} \sum_{i=1}^n (x_i - u)^2$$These are done by hand but want to know how to solve similar equations with WA.The problems are that I don't know how to write the $x_i$ (x_i in $\LaTeX$) and also don't know how to input the system of two equations. I know I can do this: https://www.wolframalpha.com/input/?i=system+of+two+equations and input them there, but then I can't specify what to solve them for. Answer
3 Replies
Sort By:
Posted 3 months ago
 Try solve (x1-u+x2-u+x3-u+x4-u)/v=0, -4/(2 v)+((x1-u)^2+(x2-u)^2+(x3-u)^2+(x4-u)^2)/(2 v^2)=0 for u,v hereWAIf you study the form of that solution carefully then I think that might let you realize the form of the solution for general n. You can extend that example to include x5 and see that the form of the solution persists.I believe there are two typos in your desktop published equations, in both cases you are summing over n from 1 to n when those should almost certainly be summing over i from 1 to n.If you absolutely must give your problem to WolframAlpha in Latex and you must pose your problem for abstract values of n then perhaps someone else can help you with that, those are far beyond me. Answer
Posted 3 months ago
 You are completely right. I had two typos there but they are fixed nowActually I don't care in which way I input these equations in fact the only reason I choose Latex was because it was the easiest way to write the equations down. I am not sure what you mean by "abstract values". (I also couldn't find the meaning of this term online.)To better show what I want as from Wolfram|Alpha, I added the desired result to my post. Answer
Posted 3 months ago
 By "abstract" I meant "with some form, but without concrete or specific value" and in "I want to solve this for some n, but I can't or won't tell you what n is." Mathematica and WolframAlpha sometimes seem to only have less powerful methods available when solutions are desired in terms of variables that are not given specific concrete values for n.Thank you for providing the desired form of your solution. That helped. Getting Mathematica or WolframAlpha to provide a solution in a specific desired form has often been more difficult than just getting it to provide a correct solution in any form.I realize that people often want compact solutions in the form that they desire. Unfortunately I have no idea how to tell it to provide your solutions in the form that you desire. When asking it to provide solutions for u and v, I have not seen it provide solutions where u is left in part of the solution, not unless the problem is so difficult that there is no way to solve for u. What I have seen is that it keeps pounding on the solution until there is no u or v left in the right hand side of either equation. Answer