Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi,

I have some data (points of results -> a list of x - data and a list of corresponding y - data) and I would like to fit a curve to this data.  curves does not fit very well to the data points.

Can anybody give me a method to fit a curve to the data?

Tanks!

The data are:

 

 

This provides a Maple solution to compute the bivariate normal distribution by recursions for numerical inputs. It works even for extreme cases and handles situations, where usual integration with Maple has serious problems (even after reducing to dimension 1), it seems to be reliable and fast and works in 'arbitrary' precision.

To use it call N2_as_sum(1.0, 2.0, 0.8,  200) to compute the BVN for x = 1.0, y = 2.0 and correlation rho = 0.8 with at most 200 recursion steps (it will stop earlier, if no more improvements can be seen).

The calling sequence in ?complex states only the two argument form 'Complex(x, y)', but later in the section "Description", in a bit confusing way, two rules for the single argument form are stated:

 

I get "hypergeom" with Thomas Calculus exercise 5.6.15 for some unknown reason. the other exercises don't get this. See it at:

http://i36.tinypic.com/258lzqx.jpg

how can i get rid of the "hypergeom" in the answer ?

I need to do the following. Suppose I have an array, c[ ]. I need to be able to specialize the elements of this array, and then later "clear" the elements, making them indeterminates again. I attempted to do this by creating a temporary holding array

i:='i': for i from 1 to 5 do d[i]:=c[i] end do;
i:='i': for i from 1 to 5 do c[i]:=i end do;
i:='i': for i from 1 to 5 do c[i]:=d[i] end do;
 

I expected and want the output to be

c[0] c[1] c[2] c[3] c[4] c[5] 1 2 3 4 5 c[0] c[1] c[2] c[3] c[4] c[5]

Hello!

I have just found this incorrect behaviour of is  (Maple 12):

restart;

Hi all,

> deq := diff(x(t), t) = 3*x(t)/t+(9/2)*t-13;

                             d         3 x(t)   9       
                     deq := --- x(t) = ------ + - t - 13
                             dt          t      2       
> ci := x(3) = 6;

                               ci := x(3) = 6
> p := dsolve({ci, deq}, x(t), numeric);

                        p := proc(x_rkf45)  ...  end;
> plots[odeplot](p, view = [-1 .. 4, -10 .. 10]);


> p(0);

                  [                                     -8]
                  [t = 0., x(t) = 8.65023735199754930 10  ]

 

 

but if I do:

 

> q := dsolve({ci, deq}, x(t), type = numeric, method = taylorseries);

                    q := proc(x_taylorseries)  ...  end;
> plots[odeplot](q, view = [-1 .. 4, -10 .. 10]);


> q(0);

                             [t = 0., x(t) = 0.]
> solex := rhs(dsolve({ci, deq}, x(t)));

                                    9  2   13      3
                         solex := - - t  + -- t + t 
                                    2      2        


But in cases where I don't know the answer, which should I trust?  here is another one

> deq := diff(x(t), t) = 1-t-x(t)/t;

                               d                 x(t)
                       deq := --- x(t) = 1 - t - ----
                               dt                 t  
> ci := x(1) = 0;

                               ci := x(1) = 0
> q := dsolve({ci, deq}, x(t), numeric);

                        q := proc(x_rkf45)  ...  end;
> q(0);

                    [t = 0., x(t) = 1.73003351210698475]
> plots[odeplot](q);


> solex := rhs(dsolve({ci, deq}, x(t)));

                                    1  2   1      1 
                         solex := - - t  + - t - ---
                                    3      2     6 t
> plot(solex, t = -1 .. 1, -100 .. 100);


and for the finish

> r := dsolve({ci, deq}, x(t), numeric, method = taylorseries);

                    r := proc(x_taylorseries)  ...  end;
> plots[odeplot](r);
%;
Warning, could not obtain numerical solution at all points, plot may be incomplete


> r(0);
Error, (in r) cannot continue integration past t=0.585794295977905e-4, step size dropped below minimum

 

Thanks in advance for any help

 

Mario

Hi all,

Hi

Just started using the global optimization toolbox. Not sure if I am doing something wrong or if it is genuinely awful. After about 20mins it produces a fit that is dreadful,an alternative cheaper package (scop) produces a great fit in about 2 mins. Can anyone see what I'm doing wrong?

 

I have the following nonlinear ODE symmetric in the functions A(r) < - > B(r):

 

eq:= diff(A(r),r)^2/A(r)^2 + diff(A(r),r)*diff(B(r),r)/A(r)/B(r) + diff(B(r),r)^2/B(r)=k;

 

The task is to solve for A(r) in terms of B(r) and it goes like this: solve the quadratic equation for A'/A in terms of B'/B (or vise versa cause equation is symmetric) and then integrate.

dsolve(eq, A(r));  produces the required solution for A(r) in terms of integral over B and B'.

dsolve(eq, B(r)); returns nothing.

Should it really take 103 seconds to build a list of 95850 floats on a 2GHz machine?

I am using the data from the attached .m file and using the following code (I am not doing anything here but I will be) on the list, angles1_s which is read in from the .m file

Odd question time. I making several small 'sub functions', named in the form y_i. I don't know how big it will get, I keep adding and removing more as I go. Is there a easy way for Maple have combine all the y_i's together into a set(to later plot)? Thanks
Something simple, like this: y:=(x[0])->42 will give me: invalid parameters for inline function Anyone know why? Thanks

Hello,

I need to plot a solid circle on a line. The problem is that you can see the line through the circle:

with(plots):
with(plottools): 
l := plot(x,color=red,thickness=3): 
d:=disk([0.5, 0.5],0.05,color=black): 
display({l, d},view=[0..1,0..1]);

I think I need something which is called in Microsoft Office products "Bring Forward (or to Front)" and "Send Backward (to Back)"

I suppose it's something very simple but I just cannot find it!

Thank you!

I have this function:

Eig1 := proc (R) options operator, arrow; (1/9*(-27*deltaE^3*R^9-10*M^6+3*sqrt(-189*deltaE^4*R^12*M^4-147*deltaE^2*R^6*M^8-27*M^12+60*deltaE^3*R^9*M^6))^(1/3)-(-deltaE^2*R^6-7/9*M^4)/(-27*deltaE^3*R^9-10*M^6+3*sqrt(-189*deltaE^4*R^12*M^4-147*deltaE^2*R^6*M^8-27*M^12+60*deltaE^3*R^9*M^6))^(1/3)+2/3*deltaE*R^3+2/9*M^2)/R^3 end proc

where:

> deltaE := 0.355 , and

M := sqrt(540000.0000)

First 2015 2016 2017 2018 2019 2020 2021 Last Page 2017 of 2226