maple2015

140 Reputation

7 Badges

9 years, 248 days

MaplePrimes Activity


These are replies submitted by maple2015

@mmcdara 

Thanks a lot for your great comments.

Please download attached file and check the interpolated function.

Model.mw


 

restart; Y := `<,>`(.2, .2, .2, .2, .2, .3, .3, .3, .3, .3, .3, .35, .35, .35, .35, .35, .35); X := `<,>`(2, 2.2, 2.4, 2.6, 2.8, 2, 2.2, 2.4, 2.6, 2.8, 3, 2, 2.2, 2.4, 2.6, 2.8, 3); Z := `<,>`(15, 33.7, 62.8, 188, 394, 5.47, 5.82, 6.21, 8.3, 11.5, 24.1, .372, .485, .675, 1.11, 1.27, 1.35); ans := Statistics:-Fit(add(add(a[k, n-k]*x^k*y^(n-k), k = 0 .. n), n = 0 .. 2), `<|>`(X, Y), Z, [x, y], summarize = embed)

-HFloat(814.3815773809906)+HFloat(1163.6625396826184)*y+HFloat(10379.76111111104)*y^2+HFloat(489.5947767857354)*x-HFloat(3239.053571428586)*x*y+HFloat(117.2734374999967)*x^2

(1)

err = (eval(ans, [x = 2., y = .35])-Z[12])/Z[12]

err = HFloat(120.95390104966586)

(2)

IN1 := CurveFitting:-PolynomialInterpolation([seq([X[k], Z[k]], k = 1 .. 5)], nu);

-2630.208328*nu^4+25983.33329*nu^3-94873.54151*nu^2+152197.4164*nu-90668.99986

(3)

INP := `$`(eval(IN1, nu = 2+.2*k), k = 0 .. 4):

Student:-Statistics:-ChiSquareGoodnessOfFitTest([seq(Z[k], k = 1 .. 5)], [INP], output = both)

Chi-Square Test for Goodness-of-Fit
-----------------------------------
Null Hypothesis:
Observed sample does not differ from expected sample
Alt. Hypothesis:
Observed sample differs from expected sample
 
Categories:              5
Distribution:            ChiSquare(4)
Computed Statistic:      .7231672199e-9
Computed p-value:        1.
Critical Values:         9.48772903678116
 
Result: [Accepted]
This statistical test does not provide enough evidence to conclude that the null hypothesis is false.
Histogram Type:  default
Data Range:      15. .. 394.
Bin Width:       12.6333333333333
Number of Bins:  30
Frequency Scale: relative
Histogram Type:  default
Data Range:      14.9999 .. 394.

Bin Width:       12.6333366666667
Number of Bins:  30
Frequency Scale: relative

 

Student:-Statistics:-ChiSquareGoodnessOfFitTest([seq(Z[k], k = 1 .. 5)], [INP], output = plot)

 

IN2 := CurveFitting:-PolynomialInterpolation([seq([X[k], Z[k]], k = 6 .. 11)], nu);

289.8437500*nu^5-3536.718750*nu^4+17210.67708*nu^3-41732.28124*nu^2+50406.85916*nu-24252.04000

(4)

INP := `$`(eval(IN2, nu = 2+.2*k), k = 0 .. 5):

Student:-Statistics:-ChiSquareGoodnessOfFitTest([seq(Z[k], k = 6 .. 11)], [INP], output = both)

Chi-Square Test for Goodness-of-Fit

-----------------------------------
Null Hypothesis:
Observed sample does not differ from expected sample
Alt. Hypothesis:
Observed sample differs from expected sample
 
Categories:              6
Distribution:            ChiSquare(5)
Computed Statistic:      .4230272580e-8
Computed p-value:        1.
Critical Values:         11.0704974062099
 
Result: [Accepted]
This statistical test does not provide enough evidence to conclude that the null hypothesis is false.
Histogram Type:  default
Data Range:      5.47 .. 24.1
Bin Width:       .621
Number of Bins:  30
Frequency Scale: relative
Histogram Type:  default
Data Range:      5.4699 .. 24.09985
Bin Width:       .620998333333333
Number of Bins:  30
Frequency Scale: relative

 

Student:-Statistics:-ChiSquareGoodnessOfFitTest([seq(Z[k], k = 6 .. 11)], [INP], output = plot)

 

IN3 := CurveFitting:-PolynomialInterpolation([seq([X[k], Z[k]], k = 12 .. 17)], nu);

36.53645836*nu^5-456.3541670*nu^4+2265.526044*nu^3-5587.208338*nu^2+6845.853006*nu-3334.209004

(5)

INP := `$`(eval(IN3, nu = 2+.2*k), k = 0 .. 5):

Student:-Statistics:-ChiSquareGoodnessOfFitTest([seq(Z[k], k = 12 .. 17)], [INP], output = both)

Chi-Square Test for Goodness-of-Fit

-----------------------------------
Null Hypothesis:
Observed sample does not differ from expected sample
Alt. Hypothesis:
Observed sample differs from expected sample
 
Categories:              6
Distribution:            ChiSquare(5)
Computed Statistic:      .1321775288e-8
Computed p-value:        1.
Critical Values:         11.0704974062099
 
Result: [Accepted]
This statistical test does not provide enough evidence to conclude that the null hypothesis is false.
Histogram Type:  default
Data Range:      .372 .. 1.35
Bin Width:       .0326
Number of Bins:  30
Frequency Scale: relative
Histogram Type:  default
Data Range:      .37201 .. 1.350015
Bin Width:       .0326001666666667
Number of Bins:  30
Frequency Scale: relative

 

Student:-Statistics:-ChiSquareGoodnessOfFitTest([seq(Z[k], k = 12 .. 17)], [INP], output = plot)

``

 

ans := CurveFitting:-PolynomialInterpolation([[.2, IN1], [.3, IN2], [.35, IN3]], mu)

(-53097.22220*nu^5+471149.3057*nu^4-1407843.057*nu^3+1276592.369*nu^2+977902.9872*nu-1638753.190)*mu^2+(29447.04860*nu^5-244639.7570*nu^4+616194.9664*nu^3-106883.5818*nu^2-1506857.065*nu+1483546.194)*mu-3765.520832*nu^5+27451.77085*nu^4-40941.93771*nu^3-124560.5199*nu^2+414452.7100*nu-321828.1111

(6)

err = (eval(ans, [nu = 2., mu = .35])-Z[12])/Z[12]

err = 0.2688172043e-3

(7)

``


 

Download Model.mw

@Carl Love 

Thank you very much for your valuable hints

@Mac Dude 

Thank you for your hints

In the case of more than two variables, is it possible to use  "ChiSquareGoodnessOfFitTest" ?

@tomleslie 

Thank you

@Carl Love 

I hope you have a good sleep.

I attach a PDF to explain the proposed algorithm which is used in the "ADAMS.mw" worksheet. As I mentioned before, the convergence is decreased by moving from vicinity of the initial point.

I will be grateful, if I can know more about digging into the Maple code (method= classical[adambash]) ).

ADAMS.pdf

@Carl Love 

The mentioned formula is used for first order ODE. I modify it for 2nd order ODE.

I think Maple uses some controller steps or something like that to guarantee the convergence of the numerical solution.

I am very appreciate for your contribution.

Your hints make it possible to dig through the algorithm.

@Carl Love 

Thank you for your hints

The plot below shows difference between exact and approximated solutions based on my algorithm.

Plot (odeplot command) of the numerical solution for method= classical[adambash] shows a complete agreement between exact and approximated solutions.

If it is possible, can I find the correct algorithm which is used by Maple?

@tomleslie 

{eval(phi, y = -sqrt(-z^2+1)), eval(phi, y = sqrt(-z^2+1))}

Two last equations (above mentioned Eqs.) make balance between 39 equations and 41 unknowns.

The function phi is obtained in terms of two variables y and z, therefore the result of double integral is a number.

I just want to solve double integral in less possible time.

Is there a way to calculate it in less possible time?

 

@vv 
Thank you

@tomleslie 

Your code rectifies the deficiencies of previous code

Thanks

@Carl Love 

 

Thanks for your valuable hints

@tomleslie 

Thank you for your hints

I expected that P should be approached to zero. Now I can be sure that my assumptions are true!

If it is possible, please help me to find the amount of Omega in attached file
 

omega^2-.3846153846*(Int(Int((5/2)*(1182993435*omega^2-413891981)*(cos((1/650240945)*sqrt(1099314545041681865*omega^2-384615384486573943)*r*sin(t))-cos((1/65024094500000)*sqrt(1099314545041681865*omega^2-384615384486573943)*sqrt(-10000000000*r^2*cos(t)^2+11283791670)))*r/(cos((1/65024094500000)*sqrt(1099314545041681865*omega^2-384615384486573943)*sqrt(-10000000000*r^2*cos(t)^2+11283791670))*(8453132285*omega^2-2957483587)), t = 0 .. 6.283185308), r = 0 .. 1.062251932)) = 0
``

 

SOLVE-OMEGA.mw

 

 

 

@vv 

At y=0 the function 'psi' in attached file and its second derivative are vanished. Also by taking G as a constant amount, 'G,y' is zero. Therefore the problem has solution.

We haven't the integration constant. By assuming this constant equal to zero, I try to solve the problem (it is a guess!)

My questions are

1- The MAPLE can not solve the last equations in 1.mw by fsolve. What is the reason? The problem hasn't answer or some codes like the Newton's iterative method must be used instead of fsolve?

2- Is it possible to minimize 'phi' by using two coupled nonlinear equations in 2.mw? If yes then which commands can be used?

3- Please suggest a method to solve the problem, if it is possible.

Thanks a lot

@vv 

Hi

Please find the attachment

Yours sincerely

PROBLEM.pdf

 

@tomleslie 

 

The ODE exp(B*x)*w''+A*w=0 is stability equation of a rod and we can not change it to

exp(B*x)*(diff(w(x),x,x)+A*w(x))=0 which is equivalent to diff(w(x),x,x)+A*w(x)=0 .

When B approaches to zero we have a rod with uniform mass distribution

 

Thank you anyway

1 2 3 4 5 6 Page 3 of 6