# Question:Solve - symbolic x numerical

## Question:Solve - symbolic x numerical

When the solution is obtained in symbolic form, and then numeric values are assigned to variables, the answer is different from the numerical solution.

vol := -R^2*Pi*H*(-3*R*C^2*sin(theta)-3*H^2*cos(theta)^2*sin(theta)*R+6*R*C*sin(theta)*cos(theta)*H-sin(theta)*R^3+sin(theta)*R^3*cos(theta)^2+C^3-3*C^2*cos(theta)*H-cos(theta)^3*H^3+3*H^2*C*cos(theta)^2+3*R^2*H*cos(theta)^3+3*R^2*C-3*R^2*H*cos(theta)-3*cos(theta)^2*R^2*C)/(3*(H^2*cos(theta)^2-R^2+cos(theta)^2*R^2)^(3/2)):

V := (1/3)*Pi*R^2*H:

vp := Pi*h*R^2*(3*H^2-3*H*h+h^2)/(3*H^2):

eq := V-vp = vol;

va := theta = (1/6)*Pi, R = 2, H = 20, h = 14;

Symbolic solution:
sc := solve(eq, [C]);
evalf(subs(va, sc));
[[C = 18.36540754], [C = 18.29805834 + 0.03888407898 I],  [C = 18.29805834 - 0.03888407898 I]]

Numerical solution:
eq1 := subs(va, eq);
evalf(solve(eq1, [C]));
[[C = 20.91425055 + 4.492493739 I], [C = 20.91425055 - 4.492493739 I], [C = 13.13302314]]

Why this happens?
I am grateful for your attention.
Sinval Oliveira Santos.

﻿