Hi, I want to diffrentiate the eA1 by y.
there is a lambda in the eA1, the lambda is sqrt(x^2+y^2) with some numbers.
I got error named “D::ivar: (B Sqrt[x^2+y^2])/(2 c[HBar]) is not a valid variable.”
How can I fix it?
Thanks.
Your code is too much of a mess to get an easy answer. I assume that Clear All should be ClearAll[]. I assume that log should be Log. As for D[log[H[\[Lambda]]], \[Lambda]], how do you expect that to evaluate to anything sensible if H is undefined? You get the error because \[Lambda] evaluates to a non-atomic expression involving several other symbols, and thus is not an appropriate variable to differentiate with. As for the fix, there’s no way to tell until you provide some clean code–code that is otherwise working.