version 1.33, 2010/11/11 03:52:35
|
version 1.34, 2010/11/11 15:57:49
|
Line 639 sub populate_arrays {
|
Line 639 sub populate_arrays {
|
my $dxdt=&ddt_cubic_hermite($t,@xparms); |
my $dxdt=&ddt_cubic_hermite($t,@xparms); |
if ($dxdt) { |
if ($dxdt) { |
$Apache::functionplotresponse::dfuncdx[$xi]=&ddt_cubic_hermite($t,@yparms)/$dxdt; |
$Apache::functionplotresponse::dfuncdx[$xi]=&ddt_cubic_hermite($t,@yparms)/$dxdt; |
} |
# Second derivative |
# Faa di Bruno |
|
# d^2y/dx^2=(d^2y/dt^2)/(dx/dt)^2+(dy/dt)/(d^2x/dt^2) |
|
my $d2xdt2=&d2dt2_cubic_hermite($t,@xparms); |
|
if (($dxdt) && ($d2xdt2)) { |
|
$Apache::functionplotresponse::d2funcdx2[$xi]= |
$Apache::functionplotresponse::d2funcdx2[$xi]= |
&d2dt2_cubic_hermite($t,@yparms)/($dxdt*$dxdt) |
($dxdt*&d2dt2_cubic_hermite($t,@yparms)-&ddt_cubic_hermite($t,@yparms)*&d2dt2_cubic_hermite($t,@xparms))/ |
+&ddt_cubic_hermite($t,@yparms)/$d2xdt2; |
($dxdt*$dxdt*$dxdt); |
} |
} |
} |
} |
} |
} |