[Community Puzzle] Derivative time ! - part1

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @pluieciel,validated by @Myrrhe,@Sceurpien and @BleedingWithin.
If you have any issues, feel free to ping them.

I’ve forgotten all calculus stuff. Could someone tell me what is the difference between two versions of a test case?
Test case “power with number”

((x^2)+(9*(x+y)))
x
x 1 y 2

== vs ==

((x^2)+(9*(x+y)))
x y
x 1 y 2

1 Like

In the first case, you derive once (with x), in the second case, you derive with x, then with y.

1 Like

After derive with x, will the result be
2x + 9 + 9y

and then derive with y, will the result be
2x + 9

?

starting from:

x^2 + 9x + 9y

d/dx gives 2x + 9 because 9y is considered a constant number for x.

Then d/dy gives 0.

1 Like

That makes sense. Thank you.

Hi there,
I am quite stuck ont his problem. My approach is to convert the string function to a executable function, where I can evaluate it at every point. And then I apply the definition of derivation: lim(h to 0) of (f(x+h)-f(x))/h for each derivate. Up to de second derivative, eveything runs smoothly. Third derivatives dont work at all. Any one has followed this approach? Any thoughts? Any other approaches to explore?

Thanks in advance!

For higher order derivatives the equations are different. Like for 2nd derivative use this Second derivative - Wikipedia

Hey, I’m having some trouble visualizing Case #4 with the following inputs:
((x^2)+(9*(x+y)))
x
x 1 y 2

Can someone break down to me how this would end up equaling 11? I can’t make it make any sense right now. The way I’m looking at it gives me the equation 2x + (9*(1+y)) after deriving which would give the answer 29 after substituting. Is there a rule I’m missing here or am I just completely wrong?
Thanks

d(x²+9x+9y)/dx=2x+9.