Is it possible to write formula in solidworks for drawing a shape.for example can i write the hyperbola formula and solidworks draw that? if not how should i draw a hyperbola in solidworks?

You can use equation driven curves.

Check this article

https://forum.solidworks.com/message/541015?tstart=0#541015

My hyperbola is Y^2/3^2-x^2/2^2=1 so y=3*SQRT(1+x^2/4) as an example.

Edit sketch an click on curve.

You can use equation driven curves.

Check this article

https://forum.solidworks.com/message/541015?tstart=0#541015

My hyperbola is Y^2/3^2-x^2/2^2=1 so y=3*SQRT(1+x^2/4) as an example.

Edit sketch an click on curve.