MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Way to evaluate D[(1-x^2)y''[x],{x,n}] ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14952] Re: [mg14914] Way to evaluate D[(1-x^2)y''[x],{x,n}] ?
  • From: BobHanlon at aol.com
  • Date: Fri, 27 Nov 1998 03:49:49 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 11/25/98 10:34:21 PM, p.kent at ic.ac.uk writes:

>I'm wondering if and how to make Mathematica evaluate  derivatives like
>
>D[(1-x^2)y''[x],{x,n}]
>
>y[x] is an unspecified function, n is a +ve integer.
>
>It seems as though the system ought to "know" that this reduces to three
>terms only, provided that n is constrained?
>

Phillip,

I do not know a general solution; however, for the specific example

nmax = 4;
deriv = TableForm[Table[{n, D[(1 - x^2)*y''[x], {x, n}]}, 
	{n, 0, nmax}], TableHeadings -> {None, {"n", "f[n]"}}]

[Table deleted]

By inspection

f[n_, x_Symbol:x, y_Symbol:y] := 
	 -n*(n-1)*D[y[x], {x,   n}] - 
		2*n*x*D[y[x], {x, n+1}] + 
	(1 - x^2)*D[y[x], {x, n+2}]

If you can't determine the exact form by inspection but can "guess" the 
rough form (undetermined coefficients)

eqn = (a*n^2 + b*n + c)*D[y[x], {x,   n}] - 
	(d*n + e)*x*D[y[x], {x, n+1}] + 
	(1 - x^2)*D[y[x], {x, n+2}];
Solve[Table[eqn == D[(1 - x^2)*y''[x], {x, n}], 
	{n, 0, 4}], {a, b, c, d, e}];
eqn /. % // Simplify

{-(-1 + n)*n*Derivative[n][y][x] - 2*n*x*(y^Derivative[1 + n])[x] - 
   (-1 + x^2)*(y^Derivative[2 + n])[x]}

Verifying

deriv == TableForm[Table[{n, f[n]}, {n, 0, nmax}], 
	TableHeadings -> {None, {"n", "f[n]"}}]

True

Proof by induction

D[f[n], x] == f[n+1] // Simplify

True

Bob Hanlon


  • Prev by Date: Re: Abs and derivative problems
  • Next by Date: Re: Stupid problems on bracket and parenthesis! Please Help
  • Previous by thread: Re: Way to evaluate D[(1-x^2)y''[x],{x,n}] ?
  • Next by thread: complexity function for computer code