Wikipedia:Reference desk/Archives/Mathematics/2013 October 1

= October 1 =

Calculus chain rule problem
I'm currently working my way through Professor Kleitman's Calculus for Beginners. Unfortunately, there are no solutions provided for the example problems, and I'm having some trouble arriving at the correct answers in some cases, so I would like some assistance in figuring out where I've gone wrong.

Given the functions $$ f(x)= \tfrac{x^2 + 1}{x} $$ and $$ g(x)= x^2 - 1$$ I am asked to use the chain rule to determine the derivative of $$f(g(x))$$. I start by determining the derivative g(x): $$ g(x)= x^2 - 1$$ $$ g'(x)= 2x$$ Then I let g(x) = s and substitute it into f(x): $$\text{Let } g(x)= s$$ $$f(s)= \tfrac{s^2 + 1}{s} $$ I then rearrange f(s): $$f(s)= (s^2 + 1) \frac{1}{s} $$ Apply the product rule to get: $$f'(s)= 2 + (s^2 + 1) \left ( \frac{1}{s} \right )' $$ Apply the reciprocal rule: $$f'(s)= 2 + (s^2 + 1) \tfrac{-s'}{s^2} $$ Now applying the chain rule and substituting $$x^2 - 1$$ for s and 2x for s': $$ \begin{align} \tfrac{df(g(x))}{dx} & = \big[ 2 + ((x^2 - 1)^2 + 1) \tfrac{-2x}{(x^2 - 1)^2} \big] 2x \\ & = 4x + \tfrac{-4x^2 ((x^2 - 1)^2 + 1)}{(x^2 - 1)^2} \\ & = 4x -4x^2 - \tfrac{4x^2}{(x^2 - 1)^2} \\ \end{align} $$ To check if this derivative is correct, Professor Kleitman provided an applet. To input the substituted expression: $$ \tfrac{(x^2 -1)^2 + 1}{(x^2 -1}$$ I used the notation ((((x^2)-1)^2)+1)/((x^2)-1). I checked this manually to make sure that the applet returns the correct value for f(x) and it does. The values the applet returns for f'(x) only match those returned by my derivative for x=-1,1,0. What's wrong with my working above? 202.155.85.18 (talk) 02:32, 1 October 2013 (UTC)
 * The first error I see is the $$s'$$ at the end of the first set of equations. Since $$f':=\frac{df}{ds}$$, $$s'\equiv\frac{ds}{ds}\equiv1$$.  The chain rule doesn't involve substituting $$g'$$ for $$s'$$, but rather multiplying $$f'(s)g'(x)$$ (where the first derivative is with respect to s, of course!).  Meanwhile, instead of using the product and reciprocal rules, I would write $$f(s)=s+s^{-1}$$ and just use the power rule twice.  --Tardis (talk) 03:07, 1 October 2013 (UTC)
 * Sorry, I don't understand that at all. When I apply the reciprocal rule to the inverse of s, the result has s' as the numerator. Given that we let g(x) = s surely g'(x)=s'? I can't use the power rule at this stage as I haven't gotten that far in the course yet. 202.155.85.18 (talk) 03:38, 1 October 2013 (UTC)
 * This reasoning is fine, actually. However, you made a mistake earlier in your differentiation: if you're differentiating with respect to $$x$$, the derivative of $$(s^2 + 1)$$ is $$2ss'$$, not $$2s$$.  So $$f'(s) = 2s' + (s^2 + 1)\tfrac{-s'}{s^2}$$.  Now substitute in, and you'll get the correct result.--80.109.106.49 (talk) 07:13, 1 October 2013 (UTC)
 * Actually, rereading I can see what you mean. Instead of s' that should just be $$ns^{n-1}$$ i.e. 1, correct? Then the expression for f'(s) reduces to $$2 + \tfrac{-(s^2 + 1)}{s^2} $$ and substituting and applying the chain rule gives $$ \big[ 1 - \tfrac{1}{(x^2 - 1)^2} \big] 2x $$, correct? 202.155.85.18 (talk) 04:07, 1 October 2013 (UTC)

Ok, that seems to have fixed my working so the final expression becomes $$2x - \tfrac{2x}{(x^2 - 1)^2} $$. This matches the derivative that I get when I directly substitute g(x) into f(x) (i.e. skipping the chain rule and just using the product and reciprocal rules). The output that I get from this expression is still slightly different to the output from the applet though e.g. for x=-5 the applet gives -9.98 whereas I get -10.02 manually. Is this just an artifact from how the applet works out derivatives? 202.155.85.18 (talk) 04:58, 1 October 2013 (UTC)
 * Your expression $$2x - \frac{2x}{(x^2 - 1)^2} $$ is correct. You just made a sign error with regards to the second term in your manual evaluation for x=-5. Abecedare (talk) 06:05, 1 October 2013 (UTC)
 * Ah, yes I did! Thanks very much for your help. 202.155.85.18 (talk) 06:11, 1 October 2013 (UTC)

The chain rule becomes intuitive when working formally with differentials. Given
 * $$ s= x^2 - 1$$.

and
 * $$ y = \frac{s^2 + 1}{s}= s+s^{-1} $$

Differentiate
 * $$ ds=d(x^2 - 1)= 2xdx$$

and
 * $$ dy = d(s+s^{-1} )=(1 -s^{-2})ds $$

Substitute the above expressions for s and ds
 * $$ dy =(1 -(x^2 - 1)^{-2})2xdx $$

and get the final answer
 * $$ \frac{dy}{dx} =2x -\frac{2x}{(x^2 - 1)^{2}} $$

Bo Jacoby (talk) 09:51, 1 October 2013 (UTC).
 * The OP's original mistake is that he mixed up pure functions with formal differentials. Either you use $$\frac{df}{dx}=\frac{df}{dg}\frac{dg}{dx}$$ as in Bo's answer; or you treat f and g as pure functions and use $$f'(g(x))g'(x)$$. But the original derivation not only switches between differentiating f with respect to s and x mid-way, but he then multiplies again with the $$g'(x)$$ term that is already contained within the differentiation of s wrt to x (ending up with multiplying by $$2x$$ twice). -- Meni Rosenfeld (talk) 11:24, 1 October 2013 (UTC)

Modules isomorphism
Make $${\mathbb{R}^2} $$ an $$\mathbb{R}[x] $$-module  by  $$x\begin{pmatrix} a\\ b \end{pmatrix}= \begin{pmatrix} \frac{5}{2}a +\frac{b}{2}\\ -\frac{1}{2}a +\frac{3}{2}b \end{pmatrix} $$. Prove that $$\mathbb{R}^2\simeq \frac{\mathbb{R}[x]}{<(x-2)^2>} $$ as  $$\mathbb{R}[x] $$-modules.

It is from a past exam, and I have no idea. Is it a private case of something?--85.65.26.40 (talk) 16:33, 1 October 2013 (UTC)
 * A more general question is given any n×n matrix M with characteristic polynomial P(x), if R[x] acts on Rn via xv=Mv then is Rn≃R[x]/? Fix a v in Rn and map R[x] to Rn by f(x)→f(M)v. The kernal of this map contains P(x) by Cayley–Hamilton. If v can be chosen so that v, Mv, M2v, ... spans Rn, which is clearly true in the special case given, you're essentially done; just compare dimensions as vector spaces over R. My algebra is a bit rusty so I'm not clear on what would happen if there is no such v, or what conditions on M would guarantee there is such a v. For M=0 it appears that the modules are not isomorphic, so I'm guessing there is an additional condition needed for the isomorphism to hold. --RDBury (talk) 21:21, 1 October 2013 (UTC)


 * The appropriate polynomial is the minimal polynomial, not the characteristic polynomial.  Sławomir Biały  (talk) 22:53, 1 October 2013 (UTC)
 * Dim(R[x]/)=deg(f), so unless the degree of the minimal polynomial is n, in which case it would be equal to the characteristic polynomial, you can rule out an isomorphism with R[x] mod the minimum polynomial. --RDBury (talk) 04:41, 2 October 2013 (UTC)
 * And in cases where the minimal and characteristic polynomials coincide, is it always true? Probably not, due to the M={0} example given, but what further conditions are needed? And how can one find the vector v that makes this morphism onto? --85.65.26.40 (talk) 07:07, 2 October 2013 (UTC)
 * The action of R[x] factors through R[x]/M(x), but this of course does not answer the original question. You're right that the characteristic polynomial is the one to look at for the isomorphism $$\mathbf R^n\cong \mathbb R[x]/P(x)$$, and I think this is only true if the characteristic and minimal polynomials coincide.  The explicit isomorphism should take the generators of a Jordan basis (the "highest weight vectors") to the corresponding maximal nilpotent operators (the "Jordan blocks") in R[x]/M(x).  Of course, this only actually works as an isomorphism if M(x) = P(x) (e.g., on dimensional grounds).
 * But actually this map should really go the other way: map the maximal nilpotent elements of R[x]/M(x) to the corresponding highest weight vectors in Rn. This establishes a one-to-one map of R[x]/M(x) to an invariant subspace V1 of Rn (which actually has an invariant complement).  We can repeat this procedure on Rn/V1, obtaining a new minimal polynomial M1(x), and new injective map from the quotient space R[x]/M1(x) onto an invariant subspace V2 of Rn/V1, and so forth.  The end result of this procedure is an isomorphism of R[x]-modules
 * $$\mathbf R^n = \frac{\mathbf R[x]}{M(x)}\oplus\frac{\mathbf R[x]}{M_1(x)}\oplus\cdots\oplus\frac{\mathbf R[x]}{M_k(x)}.$$
 * Moreover $$P(x)=M(x)M_1(x)\cdots M_k(x)$$.  (This is the invariant factor decomposition.)  Sławomir Biały  (talk) 12:22, 2 October 2013 (UTC)
 * I finally looked this up; what you're saying is essentially the content of Theorem 3.1 (Ch. 15) of my edition (2nd) of Lang's Algebra. So, at least in his approach, this is the first step in proving the Jordan decomposition. --RDBury (talk) 15:30, 2 October 2013 (UTC)