MaplePrimes Questions

I have a maple proc for which I would like to find parameters to fit data I have. The proc has an 'if' statement in it, and when I try to use the CurveFitting function 'NonlinearFit' function, I'm getting an error.

Is there a curve fitting function that can be used with procs with 'if' statements in them?

Thanks. 

restart:

f:=exp(-I*Im(s)*(t)); # I is iota, s is a complex number and t is time.

simplify(%);

Thanks

hi

I want help. 

my question is if I have coupled system of x and y variable . how can I find polynomial between these system?

Is there any simple way to extract the feasible range for the variables from solve result ?

For example, when I do solve({x-y = 10, x+y < 100}) I get {x = y + 10, y < 45}

From here, I need -inf<y<45 and -inf<x<55. Is it possible ? (I tried few methods, but it is not working for all cases.)

Why am I getting different results in these two cases ?

 

Hello maple prime users

I have used the sequence command and series command in Maple before, but seem to have hit a little hurdle with a particular problem.

I want to run the expression:

h(a,b,c):=b!*(a+c)!*sum(F,n=0..c)

   Where F:=(-1)^n*binomial(c,n)*N(a+n):

   Where N(a):=(-1)^n*[evalf(ln(2)) - 1 + 0.5 -1/3 + 1/4 +... + (-1)^a/a]:

I ran a test case using the following code:

restart:
a:=1:
b:=2:
c:=3:
tot:=0:
F:=((-1)^(a+n)/(a+n)):

for n from 0 to c do
      Seq_F2:=(-1)^(a+n):
   
      Seq:=[seq(F,n=0..n)];
      Seq2:=convert(Seq, `+`);

      final:=Seq_F2*(evalf(ln(2))+Seq2);

      SS:=(-1)^n*binomial(c,n)*final;

      S:=(b!*(a+c)!)*SS;
      tot:=tot+S;
od:
tot;

This works for the case where a =1, but will not work for a>1 as in the N(a+n) sequence it misses out the terms in the series for a-1, a-2 etc.... So when a = 2 it misses out the -1 of the sequence and when a = 3 it misses out the -1 and 1/2. Are there any tips on how to overcome this?

 

Best regards

 

- Yeti

found differentiated functions with same name but depending on different arguments in the given DE system

restart:

eqn0 := diff(f0(y), y, y, y, y) = 0;

bcs0:=f0(0)=0,(D@@2)(f0)(0)=0,f0(S)=1,D(f0)(S)=0:

dsolve({eqn0,bcs0});

How to fix it?

Thanks

I have the following in a text file.

a:="方程式";

When I read it in command-line maple, I am getting the following error.

on line 1, syntax error, non-ASCII character in unicode file 1:
Error, while reading `123456.txt`


Is it possible to input foreign characters in maple? (I dont want to enter directly in maple worksheet)

Currently I am running a maple engine using a java script and sending equations to the engine.

Thanks in advance.

Dear All,

I am new to maple and trying to write a recursive function with two input variables, but when i execute the statement it shows error "Error, (in B) too many levels of recursion"

Following is the set of instructions which i am trying to execute:

if n=1 then  

B(m,n):=omega(m);  

else  

B(m,n):=sum(omega(j)*B(m-j,n-1),j=1..m-1)

end if


After execution, i try to access B(1,1) or B(2,1), the following error occurs

B(1, 1);
Error, (in B) too many levels of recursion


I'll be grateful, if someone can help me to fix this problem. 

lambdaaaaaa.mwI have calculated lambda(s), now I to substitute  its derivative(1st,2nd) in b[2], b[3]and b[4] in order to calculate the values of constants i.e C1,C2 and C3, plz help

Say I have a funtion something like this

f:=x^2;

f1:=diff(f,x);

Now I want the above output to be saved to a .txt file having maple friendly format.

 

I want to solve numerically the PDE:

u_xx + u_yy= = u^{1/2}+(u_x)^2/(u)^{3/2}

 

My assumptions are that  |sqrt(2)u_x/u|<<1 (but I cannot neglect the first term since its in my first order approximation of another PDE.

 

So I tried solving by using pdsolve in maple, but to no cigar.

 

Here's the maple file:

 nonlinear.mw

PDE := diff(diff(u(x, y), x), x)+diff(diff(u(x, y), y), y) = u^(1/2)+(diff(u(x, y), x))^2/u^(3/2); IBC := {D[1](u)*(1, t) = 0, D[2](u)*(x, 1) = 0, u(0, t) = 1, u(x, 0) = 1}; pds := pdsolve(PDE, IBC, type = numeric); pds:-plot3d(t = 0 .. 1, x = 0 .. 1, axes = boxed, orientation = [-120, 40], color = [0, 0, u])

diff(diff(u(x, y), x), x)+diff(diff(u(x, y), y), y) = u^(1/2)+(diff(u(x, y), x))^2/u^(3/2)

 

{D[1](u)*(1, t) = 0, D[2](u)*(x, 1) = 0, u(0, t) = 1, u(x, 0) = 1}

 

Error, (in pdsolve/numeric/process_PDEs) all dependent variables in PDE must have dependencies explicitly declared, got {u}

 

Error, `pds` does not evaluate to a module

 

``

 

Download nonlinear.mw

I created my own package and one procudure inside this package is to calculate the eigenvalues of a identity matrix, as shown below

 

 

 

Then, I use this package in another document, all other procedures work well except the procedure calculating egigenvalues, as shown below

 

 

 

How to solve this problem? Thank you.

Hi,

Another newbie question...

I have an excel file with lots of named ranges. I can use the ExcelTools WorkbookData command to get a list of all the available named ranges, and then I can assign the contents of each named range to a Maple variable with the Import command.

I'm thinking that there must be an elegant way to create a Maple variable for each string in the list of named ranges and assign it to the contents. Something like looping through each named range in the list, creating a variable of that name, and then assigning the contents of that named range. I hope I'm clear without repeating myself too much.

Am I explaining my need?

Thanks in advance. This looks like a good forum, and I hope to be able to contribute someday.

Mike McDermott

i was to design a GUI using embedded components, i started as shown in the screenshot i uploaded but i had alittle problem trying to code the `evaluate at params` bottton i wanted the botton to return the evaluation of the mathematical expression at the value of the various parameters [delta,gamma,alpha,G,C] into the mathcontainer infront of it i.e evaluating at these points which can be change as new vualues are type in the textfeilds. such as

this is the code i used and it poping out an error message

use DocumentTools in

module()
local f,q,delta,gamma,alpha,G,C;

Do(f=%MathContainer0);
Do(delta=value(%MathContainer1));
Do(gamma=value(%MathContainer2));
Do(alpha=value(%MathContainer3));
Do(G=value(%MathContainer4));
Do(C=value(%MathContainer5));



q:=eval(f,value,delta,gamma,alpha,G,C);
Do(%MathContainer6=q);




end module;
pls i need some one to correct me

First 1238 1239 1240 1241 1242 1243 1244 Last Page 1240 of 2429