MaplePrimes Questions

How can I make transformations like:

sum(a*u[k]+b*v[k],k=1..n) into a*sum(u[k],k=1..n)+b*sum(v[k],k=1..n)

and in the opposite direction?

Dear,

I paste below a simple code illustrating what I want to do: interpolate a function from two lists . I wonder it is a very simple task but I the function and the graph I get don't match with the correct ones in the end (both are plotted below).

> y_data:=[0.5266426348e-1, 0.7090942099e-1, 0.9392192453e-1, .1228458380, .1598545751, .2107200296, .3127241088, .4144428927, .5679723063, .6817484378, .7973388763, .9326799232, 1.393259472, 1.493936979, 1.566845149, 1.624353545, 1.670898228, 1.708874880, 1.739919717, 1.765298377, 1.786042765, 1.803007037, 1.816897481, 1.828294327, 1.837670808, 1.845410531, 1.851823072, 1.857157571, 1.861614283, 1.865354162, 1.868506707, 1.871176289, 1.873447229, 1.875387839, 1.877053637, 1.878489894, 1.879733654, 1.880815343, 1.881760039, 1.882588494, 1.883317935, 1.883962726, 1.884534877, 1.885044474, 1.885500010, 1.885908668, 1.886276537, 1.886608800, 1.886909882, 1.887183573, 1.887433127, 1.887661351, 1.887870669, 1.888063180, 1.888240711, 1.888404854, 1.888557000, 1.888698365, 1.888830022, 1.888952911, 1.889067865];

> x_data:=[10, 53/5, 56/5, 59/5, 62/5, 13, 68/5, 68/5, 13, 62/5, 59/5, 56/5, 56/5, 59/5, 62/5, 13, 68/5, 71/5, 74/5, 77/5, 16, 83/5, 86/5, 89/5, 92/5, 19, 98/5, 101/5, 104/5, 107/5, 22, 113/5, 116/5, 119/5, 122/5, 25, 128/5, 131/5, 134/5, 137/5, 28, 143/5, 146/5, 149/5, 152/5, 31, 158/5, 161/5, 164/5, 167/5, 34, 173/5, 176/5, 179/5, 182/5, 37, 188/5, 191/5, 194/5, 197/5, 40];

inverted_pairs:=[seq([y_[i], x_[i]], i = 1 .. nops(y_))]; 

interp := LeastSquares(y_data, x_data, k_, curve = a*k_^3+b*k_^2+c*k_+d);

 

I've tried different kinds of interpolation methods. In this code I use LeastSquares() function. I'm sure it has a quick solution but I'm really stuck and would appreciate any help/advice.  

Thanks in advance!

 

 

PS: I didn't mention in above, but it is really important for me to get the associated function of the curve (e.g. ak_^3+bk_^2+ck_+d). I can get it using LeastSquares() function but with your code (where you use ArrayInterpolation()) the function is not generated in the end. Could you please indicate some way to do that? Thanks!

I need to find the local maxima and minima of f(x,y)=x(x+y)*e^(y-x). I have tried to look for an appropriate method that I could use to achieve this, but got stuck. I also don't quite understand the math behind tying to obtain the local maxima and  minima for a function of this type.

I'm trying to evaluate the multidimensional limit: 

(1+y)^(x-1)-1/(1-cos((x-1)^2+y^2)^(1/4)) as (x,y)->(1,0) using the limit command :

limit((1+y)^(x-1)/(1-cos((x-1)^2+y^2)^(1/4)),{x=1,y=0});

 

but don't seem to get any output. Also, I think the limit for this function doesn't exist or is indeterminate on R2. Where am I wrong?

I am considering options to access Maple features from within a Fortran program using the OpenMaple API. I do not find any examples illustrating this (or even precise statements if this is possible in principle). (Quite surprising to me considering the presence of Fortran in scientific computing).

Is the only way to go to write a C wrapper for the API? If yes, is there an example for such a wrapper which performs common conversions between Fortran and C data types.

Thanks!

Greetings, seeking an expert to animate a plot.

see worksheet.posterior_graphs_(encapsulted)_1D.mw

before they play each other, each have a law (a normal distribution) plot-output 6.

after DD defeats CC, and a numerical integration is performed the new laws are given by plot-output 18.

as you can see, the laws of DD and CC are closer together.

if the calc was repeated (DD defeats CC again), the laws would be closer again.

so what i require is an animation of the new laws from game 1 to (say) game 6 (DD defeats CC every time). seeing the red and blue distributions merging would be ideal.

as an aside I heard maples FFT could simplify the complicated integration. any suggestions?

cheers

(http://imgur.com/SDBP0sw)


Hello, everyone!


I was given this week's Maple assignment in my class and I've come across a problem. I'll say this now so I don't get sent away, I am NOT asking for the answer. For this question there is a part A and part B, but also a preliminary check to make sure our code is wokring (as seen in the picture link). The issue I'm here for is that I can't figure out the code for the preliminary check... I've been here for hours and I'm stumped.

 

This is my attemp so far; 

 

f := x^(6*ln(x))

Digits:=15;

T2 := convert(%, polynom)

f_value := evalf(subs(x = 5, T2))

 

I'm very confused what to do next in order to get that preliminary test amount of 5121425.461.

Thanks in advance! :)

I have been Maple  18 with no problem. Then, today, the  "=" symbol and  "+" symbol don't work.  Does anyone know what to do about this?

 

Hi,
There a lot of symbols that don't work in Maple.
The symbols that dont work are shown as an "A".
Almost half of the symbols in the pallets are shown as an "A".

Hi,

I am trying to discretize a kernel of the form $K(x,y,t,s)$. I want to evaluate a four dimensional integral of the form

\int\int\int\int K(x,y,t,s)*h_m(x)*h_n(y)*h_p(t)*h_q(s) dsdtdxdy, where limits of integration are from 0 to 1.

$h_m()$ are function of one variable.

please suggest how to evaluate this.

thanks

 

In the attached Maple worksheet I attempt to plot the solution of an initial value problem for a first order ODE.  DEplot fails with a cryptic message.  Strangely enough, if I give the "arrows=none" option to DEplot, it produces the correct plot!

I see this behavior in Maple 17 and 18.

Maple 11, however, works fine with or without the "arrows=none" option.

Is there an explanation for this or is it a bug?

DEplot-bug.mw

restart; macro(x = eta); einf := 4; gm1 := 10; gm2 := 5; mf := .5; pr := 6.2; le := 10; nb := .2; nt := .2; r := 2; tr := 2; bi := .5; m := 2; tr1 := 1.5;
a1 := (m+1)*(1/2);
eqs1 := diff(f(x), [`$`(x, 3)])+a1*f(x)*(diff(f(x), [`$`(x, 2)]))-m*(diff(f(x), [`$`(xx, 2)]))^2+gm1*g(x)-gm2*h(x)-mf*(diff(f(x), [`$`(x, 1)])) = 0;
eqs2 := diff(g(x), [`$`(x, 2)])+a1*pr*f(x)*(diff(g(x), [`$`(x, 1)]))+pr*nb*(diff(g(x), [`$`(x, 1)]))*(diff(h(x), [`$`(x, 1)]))+pr*nt*(diff(g(x), [`$`(x, 1)]))^2+(4/3)*r1*(diff((1+(tr-1)*g(x))^3*(diff(g(x), [`$`(x, 1)])), x)) = 0;
eqs3 := diff(h(x), [`$`(x, 2)])+a1*le*f(x)*(diff(h(x), [`$`(x, 1)]))+nt*(diff(g(x), [`$`(x, 2)]))/nb = 0;
bcs1 := f(0) = 0, (D(f))(0) = 1, (D(f))(einf) = 0;
bcs2 := (D(g))(0) = bi*(g(0)-1), g(einf) = 0;
bcs3 := h(0) = 1, h(einf) = 0;
eqs := {bcs1, bcs2, bcs3, eqs1, eqs2, eqs3};
sol1 := dsolve(eqs, [f(x), g(x), h(x)], numeric, output = listprocedure);

If I typed the above line it's showing 

Error, (in dsolve/numeric/process_input) missing differential equations and initial or boundary conditions in the first argument: eqs

Kindly, I request you to do the needful as early as possible.

hai everyone. i am currently trying to solve an integration of the following ∫g(η)dη . integrate from 0 to 10.

from the following odes.

f ''' +1-(f ')2 +ff ''=0,

g''-gf'+fg'=0,

with boundary conditions f(0)=0, f'(0)=λ, f'(∞)=1, g(0)=1,g(∞)=0

First, i solve the odes using the shooting method. then i used the trapezoidal rule to solve for the integration of g(eta) using the following codes

> with(student);
> trapezoid(g(eta), eta = 0 .. 10, 10);
> evalf(%);

it seems that it can not read the data from the shooting method. can anyone suggest why it is happening?

thank you verymuch for your concern :)

Hi

I need a command for adding screentip to maple textbox.When user select textbox field, a comment appear and guide him to write correct format of algebric expression, e.g. when user writes 2sin(x) the format scanner can't specify 2 from 2sin, and user must write 2*sin(x) instead of 2sin(x).

I want explain these hints with screentip.

 

First 1314 1315 1316 1317 1318 1319 1320 Last Page 1316 of 2429