Manoj, you have to initialize y as a function of x rather than a Symbol
>>> var('x') >>> y = Function('y')(x) >>> eqn = x**2 + y >>> diff(eqn, x) 2*x + Derivative(y(x), x) -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/88e4c8b1-5ac3-47aa-b1b1-d8034112f553%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.