Y=|X^2+3x-4|

find dy/dx?

a trick is involved. Realize that

|x|=sqrt(x^2)

y=sqrt(x^2+3x+4)
y'=1/(2*sqrt( )) * (2x+3)/1

Following bob's own suggestion, it should have been:

y = √ ( (x^2 + 3x + 4)^2)
= [( (x^2 + 3x + 4)^2)]^(1/2)
dy/dx = (1/2) ( (x^2 + 3x + 4)^2)^(-1/2) (2)(x^2 + 3x + 4) (2x+3)

= (2x+3)√(x^2 + 3x + 4)

or

we could do it piece-meal

y=|x^2+3x-4|
--> y = x^2 + 3x - 4 , for x <-4 OR x > 1
dy/dx = 2x + 3 for x <-4 OR x > 1

or

y = -x^2 - 3x + 4 for -4 < x < 1
dy/dx = -2x - 3 for -4 < x < 1

dy/dx is not defined at x = -4 or x = 1

wolframalpha cleverly combines the two solutions as

(2x-3) * y/|y|

which takes care of the +/- cases.

To find dy/dx, we need to differentiate the given function, which is y = |x^2 + 3x - 4|. The absolute value signs in the function indicate that the expression inside the absolute value can be either positive or negative.

To differentiate this function, we will consider the two cases separately when the expression inside the absolute value sign is positive (x^2 + 3x - 4 ≥ 0) and when it is negative (x^2 + 3x - 4 < 0).

When x^2 + 3x - 4 ≥ 0, we can solve for the values of x that satisfy this condition by finding the roots of the equation x^2 + 3x - 4 = 0.

Using the quadratic formula, x = (-b ± √(b^2 - 4ac)) / (2a), where a = 1, b = 3, and c = -4, we get:

x = (-3 ± √(3^2 - 4(1)(-4))) / (2(1))
x = (-3 ± √(9 + 16)) / 2
x = (-3 ± √25) / 2
x = (-3 ± 5) / 2

Therefore, when x ≥ 1 or x ≤ -4, the expression x^2 + 3x - 4 is positive.

Now, let's differentiate y = |x^2 + 3x - 4| with respect to x in the case when x^2 + 3x - 4 ≥ 0:

When x ≥ 1 or x ≤ -4, the function y can be written as y = x^2 + 3x - 4. We differentiate this standard quadratic function using the power rule:

dy/dx = d/dx (x^2 + 3x - 4)
= 2x + 3

However, we also need to consider the case when x^2 + 3x - 4 < 0. In this case, y = -(x^2 + 3x - 4) because the absolute value sign turns the positive expression into its negative counterpart. To differentiate this, we apply the chain rule:

dy/dx = d/dx [-(x^2 + 3x - 4)]
= -1 * d/dx (x^2 + 3x - 4)
= -1 * (2x + 3)
= -2x - 3

So, the derivative of y = |x^2 + 3x - 4| is given by:

dy/dx = 2x + 3, if x ≥ 1 or x ≤ -4,
dy/dx = -2x - 3, if -4 < x < 1.