Here is the problem I need to solve:

Name:  A9_R218_C.jpg
Views: 218
Size:  10.4 KB

Here is the code I created in order to solve it:

double numx, numz, result;
            numx = Convert.ToDouble(textBox1.Text);
            numz = Convert.ToDouble(textBox2.Text);
            result = Math.Pow(numx, 2) + Math.Pow(numz, 2) / 1 - Math.Pow(numx, 2) - Math.Pow(numz, 2) / 2;
            label1.Text = result.ToString();
But when solving the problem manually I get different answer, so what I'm doing wrong? A help would be appreciated and thanks for your time in advance.

Kind regards,