1
$\begingroup$

... is not a valid variable i dont know whats happend

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ If you run this code twice then a has a value and can't be used as variable in D. Start with ClearAll["Global`*"] $\endgroup$
    – Kuba
    Commented Sep 23, 2020 at 10:03
  • $\begingroup$ Crossposted here. $\endgroup$ Commented Sep 23, 2020 at 14:24
  • $\begingroup$ The definitions of d1, d2, and d3 can be simplified to either {d1, d2, d3} = D[a^2*b*(1+b)/(c^(1/3)), {{a, b, c}}] // Simplify or {d1, d2, d3} = Grad[a^2*b*(1+b)/(c^(1/3)), {a, b, c}] // Simplify and you have several unnecessary uses of N $\endgroup$
    – Bob Hanlon
    Commented Sep 23, 2020 at 17:24

1 Answer 1

1
$\begingroup$

Try the following.

Start your code with this statement:

Clear[a,b,c,aa,bb,cc];

Then enter your code until the definitions of d1, d2 and d3. Now define these variables a bit differently. For example, for d1 it is:

d1 = D[(a^2*b*(1 + b) c^(-1/3)), a] /. {a -> 2456, b->0.00078, c->0.008};

and also d2,d3 and df define analogously. In this case, the values 2456, 0.00078, and 0.008 will be once inserted into the final expression for d1, but a, b and c, will not be assigned to those values, but will, instead, stay variables.

Have fun!

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.