janhardo

725 Reputation

12 Badges

11 years, 110 days

MaplePrimes Activity


These are answers submitted by janhardo

restart;
with(PDEtools);
with(LinearAlgebra);
with(SolveTools);
_local(gamma);
K := 2*k[i]*exp((-(alpha*l[i]^3 + (-k[i]^2 - b - c)*l[i] - a)*k[i]*Int(1/g(_z1), _z1 = 0 .. t) + 2*(k[i]*(y + z)*l[i] + x*k[i] + eta[i])*beta)/(2*beta))/(1 + exp((-(alpha*l[i]^3 + (-k[i]^2 - b - c)*l[i] - a)*k[i]*Int(1/g(_z1), _z1 = 0 .. t) + 2*(k[i]*(y + z)*l[i] + x*k[i] + eta[i])*beta)/(2*beta)));
K1 := eval(K, i = 1);
Fig1params := {a = 1, alpha = 1, b = 1, beta = 1, c = 1, y = 1, z = 1, eta[1] = 1, k[1] = 1, l[1] = -2, r[1] = 1};
test := value(eval(K1, {g = (t -> cos(t)), i = 1}));
unum := eval(test, Fig1params);
ux := eval(unum, t = 0);
printf("=== CONTROLE ===\n");
printf("test = ");
print(test);
printf("unum = ");
print(unum);
printf("ux = ");
print(ux);
plot(ux, x = -10 .. 10, numpoints = 300, title = "ux plot");
plot3d(unum, t = -10 .. 10, x = -10 .. 10, shading = ZHUE, grid = [50, 50], lightmodel = light4, style = surfacecontour, title = "unum 3D plot");
=================================================================
restart;
with(plots);
K := 2*k[i]*exp((-(alpha*l[i]^3 + (-k[i]^2 - b - c)*l[i] - a)*k[i]*Int(1/g(_z1), _z1 = 0 .. t) + 2*(k[i]*(y + z)*l[i] + x*k[i] + eta[i])*beta)/(2*beta))/(1 + exp((-(alpha*l[i]^3 + (-k[i]^2 - b - c)*l[i] - a)*k[i]*Int(1/g(_z1), _z1 = 0 .. t) + 2*(k[i]*(y + z)*l[i] + x*k[i] + eta[i])*beta)/(2*beta)));
K1 := eval(K, i = 1);
Fig1params := {a = 1, alpha = 1, b = 1, beta = 1, c = 1, y = 1, z = 1, eta[1] = 1, k[1] = 1, l[1] = -2, r[1] = 1};
K1_num := (x_val, t_val, g_func) -> eval(eval(K1, {g = g_func, t = t_val, x = x_val, Int(1/g(_z1), _z1 = 0 .. t) = evalf(Int(1/g_func(s), s = 0 .. t_val))}), Fig1params);
ux_num := x -> K1_num(x, 0, cos);
printf("=== TEST EENVOUDIGE PUNTEN ===\n");
for i from -2 to 2 do
    result := ux_num(i);
    printf("ux_num(%d) = %a\n", i, result);
end do;
plot(ux_num(x), x = -10 .. 10, numpoints = 300, title = "2D Plot: ux_num(x)");
plot3d(K1_num(x, t, cos), x = -10 .. 10, t = -5 .. 5, shading = ZHUE, grid = [30, 30], title = "3D Plot: K1_num(x,t,cos)");

generalized hyperbolic distribution
Generalized Hyperbolic Distributions - Jim Killingsworth
GENERALIZED_HYPERBOLIC_DISTRIBUTIONmprimes7-10-2025.mw


We can use the max­i­mum like­li­hood method to fit a gen­er­al­ized hy­per­bol­ic dis­tri­b­u­tion to a giv­en set of data
Let me try   for stock exchance in Amsterdam (AEX) ?, no i  take first the example data his­tor­i­cal stock prices of Mi­crosoft Cor­po­ra­tion

GH_Distribution_Plot := proc(mu, delta, alpha, lambda, {beta := 0, xmin := -10, xmax := 10})
restart;
f := 419*x^2 + 116*x*y - 426*x*z + 78*y^2 - 142*y*z + 133*z^2 - 1604*x - 682*y + 1086*z + 2306;
df_dx := diff(f, x);
df_dy := diff(f, y);
df_dz := diff(f, z);
centrum := solve({df_dx = 0, df_dy = 0, df_dz = 0}, {x, y, z});
                      "maple.ini in user"

             df_dx := 838 x + 116 y - 426 z - 1604

              df_dy := 116 x + 156 y - 142 z - 682

             df_dz := -426 x - 142 y + 266 z + 1086

               centrum := {x = 7, y = 11, z = 13}

It is a quadratic surface, with this point : centrum ? : point symmetry around centrum, needs more info.

eqt1 := u(x, y, 0, t) = 4*alpha*(-lambda[1]*t*(lambda[1]^2 - 3*lambda[2]^2)*alpha + (b*lambda[1] + ((r[1] + r[2])*c)/2 + a)*t + beta*(y*lambda[1] + x))*lambda[2]^2*beta/(lambda[2]^2*t^2*(lambda[1]^2 + lambda[2]^2)^3*alpha^3 + 3*t*lambda[2]^2*alpha^2*(2*(b*t + beta*y)*lambda[2]^4/3 + t*c*(r[2] - r[1])*lambda[2]^3*I/3 + 2*lambda[1]*((((r[1] + r[2])*c)/2 + a)*t + x*beta)*lambda[2]^2 - lambda[1]^2*t*c*(r[2] - r[1])*lambda[2]*I - (2*lambda[1]^3*((b*lambda[1] + ((r[1] + r[2])*c)/2 + a)*t + beta*(y*lambda[1] + x)))/3) + lambda[2]^2*((b*t + beta*y)^2*lambda[2]^2 + t*c*(b*t + beta*y)*(r[2] - r[1])*lambda[2]*I + ((b*lambda[1] + c*r[2] + a)*t + beta*(y*lambda[1] + x))*((b*lambda[1] + c*r[1] + a)*t + beta*(y*lambda[1] + x)))*alpha + beta^2)

Can this function be used now ?

@Alfred_F 

There are some corrections  to make for the procedure FastPursuite 
Handling the ode system in Maple for this procedure can be different on two ways.


As you can see the goat is escaping the wolf ..lol,  message (  try  correct this  and add  coordinat axes)



The procedure approach:

@Alfred_F 
A bijective function cannot be periodic ?

sol := dsolve([de1, de2, bc], numeric, method = bvp[midrich], approxsoln = [y(x) = 1 - exp(-x), z(x) = exp(-x)], abserr = 0.1e-5, maxmesh = 128)

` Solve using BVP with midrich method (collocation-type)`

 

1 2 3 4 5 6 7 Page 1 of 7