c# - Find the min and max for quadratic equation -
How to find the minimum and maximum for quadratic equation using C #? I've found = 0, max = 8p = 2 = 78.957. I tried to write code based on the liner class but something goes completely wrong give this code minimum = -4. ?? And maximum = 96 can you know where my fault is? I uploaded the code to Dropbox, if anyone can see: Do you want to count (sin (x)) or sin (X ^ 2)? In your F (x, y) formula it looks like (sin) (x) ^ 2, but in your method two works like verb sin (x ^ 2).
f (x, y) = x ^ 2 + y ^ 2 + 25 * (sin (x) ^ 2 + sin (y) ^ 2), where (x , y) from (-2p, 2p)) ?? Manually solve
double [] X, Y, results; // Range array and result array set any range for Private Zero BtnRun_Click (Object Sender, EventArgs E) {// Function X = setRange (-2 * Math.PI, 2 * Math.PI, 10000); Y = Setrange (-2 * Math.PI, 2 * Math, PI, 10000); Results = getOutput_twoVariablesFunction (X, Y); Int max index = getMaxIndex (results); Int Min Induct = Millindex (results); TxtMin.Text = result [min indax]. Ostring (); TxtMax.Text = Result [Max Indexes] .Ostring (); } Private Double Double Variables Function (Double X, Double Y) {Double F; // Any two variable function F set = Math.Pau (X, 2) + Math Pov (y, 2) + 25 * (Math.p. (Math sign (X), 2) + Math. Sin (Y), 2)); Return; } Private Double [] Setrange (Double Start, Double End, At Sample) {Double Phase = (End - Start) / Sample; Double CurrentVaue = Start; Double [] array = new double [sample]; {Array [index] = current VAU for (int index = 0; index
Comments
Post a Comment