MaplePrimes Questions

Given this

z := -d*(y+a)+a;

and say we want to replace  a-a*d by c  so that the result is  c - d*y, but this does not work:

algsubs((a-a*d)=c,z);

since Maple does not "see" the d*a expression as it is not expanded yet.  Only when writing this it works:

algsubs((a-a*d)=c,expand(z));

At first I thought since this is an "algebraic" substitution, then Maple will figure it out on its own. But it seems that the expression being substititued has to explicity show there for it to work? Looking it help, it says

"Like subs, it does not expand products or powers before substitution"

So my question is: Is the rule of thumb when using algsubs, is to always expand the expression as in the above example?

Is there another Maple command or a package, which would have found this substition on its own? (i.e. without expanding first)

 

 

 

 

with(Groebner):
T := lexdeg([x,y,z],[e1,e2]);
intermsof1 := y;
intermsof2 := -z;
GB := Basis([e1-intermsof1, e2-intermsof2], 'tord',T);
result := NormalForm(y^2-x*z, GB,'tord', T);
result := NormalForm(y^2-x*z, GB, T);

originally Basis do not have error when without parameter 'tord'

after it has argument error, it has to be added extra parameter tord

NormalForm has the same error too.

i do not understand why it has error, how to solve?

i just want to express y^2-x*z in terms of y and -z

 

 

Where is the mapleclud palltte button ?   It is not in my Maple 16,  not in   mymaplecloud

 

How to upload a maple work sheet into  my maplecloud private  storage ?

In Maple 2015:

 

restart;
with(Tolerances):
a:= 3 &+- 1;
b:= 2 &+- 1;
c:= 2 &+- 1;
solve(a*x^2+b*x+c=0,x);

gives "Error, (in evalr) improper op or subscript selector"

Is there a way to make it work with interval, i.e. Tolerances variables?  In Mathematica, the above works:

a = Interval[{2, 4}];
b = Interval[{1, 3}];
c = Interval[{1, 3}];
Solve[a*x^2 + b*x + c == 0, x]

Screen shot:

 

I was hoping to get similar result with Maple.  Is there differenet package/commands to work with interval variables in Maple that would support all operations if not this package?

 

consider quadratic equation ax^2+bx+c =0 :
the coefficients vary between -1 and +1 . just like this :
-1<a<+1 , -1<b<+1 , -1<c<+1 ;
how can some one proove that this equation should have real answers ?! can anybody help ? thanks in advance.

i am very new with Maple.

I have the following two equations:

x1=a-y1-d*y2;

x2=a-y2-d*y1;

I wish to express the first equation in terms of y1 and x2, so that

x1 = c - b*y1+d*x2;

where c=a-a*d and b=1-d^2. How can I get maple to rearrange the original equation x1 in term of y1, x2, c and b? 

 

This question is probably for maple devs...

I was wondering if it would be possible to outline what algorithm is used to generate replications (realizations) for various processes by the Finance:-SamplePath command (and friends). For example in the code like this:

with(Finance):

X := WienerProcess();
A := SamplePath(X(t), t = 0 .. 1, timesteps = 100, replications = 20);

Is it the Euler-Maruyama method?

Alternatively maybe you can show the portion of the code that is responsible for the integration of the SDE that the Wiener process defines.

I can't find any details related to this information in the help, and it would be very helpful to know this (and more importantly have it in the help section).

Thanks!

Hi,

     I was wondering if there is an easy way to define another set of indices in the Physics package. For example, usually greek indices are for all 4 spacetime dimensions. Using Setup(spaceindices = lowercaselatin), we can define 3 of those as space indices. I was hoping there is a more general command, so that I could use only 2 indices as "space indices". For example, X[i] would run over x,y while X[mu] would run over t, z. Is there such a command in the Physics package, or a simple way to implement this personally?

Second thing. I was playing with SumOverRepeatedIndices on an expression that contained both space indices and spacetime indices. Usually this seems to work, but in my attached example it does not. I tried the same thing with just spacetime indices in Maple 18 (newest Physics update) and it gave the same error.


Any help appreciated,

PhysicsBug.mw

Hello,

I hope that I will manage to explain my question.

I try to recover the structure of my worksheet by working on XMLElements.

Sometimes, I have in the XMLElements that I recover a XMLElements linked to "Font" and {"encoding" -> "UTF-8"} 

Why for one section defined as "text" and "headling1" I can have a change in "Font"? Is there a possibility to detect this changement for line of text.

In other words, how can I recognize a layout "Font" in a line of a worksheet and how can I change a layout "Font" into a layout "TexttField" ?

Thank you for your help.

 

Is there a way to make the first part of this look like the second picture depicted here? Also after intigration is there a way to make the highlighted posrtion not have an "ln(e)" parts and just have the exponetials and there constants?

Obviously I dont want to have to manually input this section everytime, is there some command I can use to achieve this goal?

I'm trying to determine that f(x) = (a/2)*e^(-a|x|) is a pdf for which I have tried to calcuate the integral from -infinity to +infinity but I am no getting a result that converges(even the wolfram alpha widget said the integral doesn't converge). How do I correcly implement this?

Above is the outcome I am getting at the current time... and I used map(expand,...) to do the expansion then simplifing it goes back to the origional. 

Below is the outcome I would like to achieve...you can see that this is a different method. The problem I have is this is the right click method of expansion and I am tring to build a program that solves matrix ODE's by just inputing the initial matrix and it doing everything so i can check my answers step by step. 

So my question is, is there another method of command input to get the bottom line in the below picture?

 

 

convert(Matrix(2, 2, {(1, 1) = (s-2)/(s^2-s-12), (1, 2) = -5/(s^2-s-12), (2, 1) = -2/(s^2-s-12), (2, 2) = (s+1)/(s^2-s-12)}), parfrac);
%;
Error, (in convert/parfrac) input must be a rational polynomial in s

gives me that error and i assume I can not use this command for matrix opperations if that is true is there a way to do it such as issolateing each element and doing each individually and putting it back into a matrix is that posible if so can someone show me the code for that?

 

I know 1st root of a function locates in a small interval (by drawing plots of function).

but fsolve command uses unreasonable time to find roots.

Also NextZero dosent work.

Please help me.

Thanks for your attention.

--------------------------------------------------------------------------------------------------

restart; s := sqrt(n)*Pi*(sqrt(n)*Pi-tan(sqrt(n)*Pi))/(sqrt(n)*Pi*tan(sqrt(n)*Pi)+2*(1-sec(sqrt(n)*Pi)));

C := (tan(sqrt(n)*Pi)-sqrt(n)*Pi*sec(sqrt(n)*Pi))/(sqrt(n)*Pi-tan(sqrt(n)*Pi));

S := s*(-C^2+1);

Gamma[b] := E[b2]/E[b1];

Gamma[c] := E[c2]/E[c1];

alpha[b] := t[b1]*t[b2]/(t[b1]+t[b2])^2;

alpha[c] := t[c1]*t[c2]/(t[c1]+t[c2])^2;

EIb := b*E[b1]*(t[b1]^4+2*Gamma[b]*alpha[b]*(2-alpha[b])*(t[b1]+t[b2])^4+Gamma[b]^2*t[b2]^4)/(12*(Gamma[b]*t[b2]+t[b1]));

EIc := b*E[c1]*(t[c1]^4+2*Gamma[c]*alpha[c]*(2-alpha[c])*(t[c1]+t[c2])^4+Gamma[c]^2*t[c2]^4)/(12*(Gamma[c]*t[c2]+t[c1]));

b := 1;Lb := 2; Lc1 := 2.5; Lc2 := 3; E[b1] := 180; E[b2] := 200; t[b1] := 0.3e-1; t[b2] := 0.4e-1; E[c2] := 220; t[c1] := 0.5e-1; t[c2] := 0.2e-1;

for k from 0 by 10 to 100 do

E[c1] := 150+k; nce := (1/2)*(Lc1/Lc2)^2*n; nb := (1/2)*(Lb/Lc2)^2*n; q[k] := 1000*fsolve((subs(n = nce, C*s)*EIc/Lc1)^2/(S*EIc/Lc2+subs(n = nce, s)*EIc/Lc1+subs(n = nb, s*(1-C))*EIb/Lb)-subs(n = nce, s)*EIc/Lc1-2*EIb/Lb, n = 1.45 .. 1.56)*evalf(Pi^2)*EIc/(2*Lc2^2); print(q[k], k)

end do;

with(CurveFitting); F := PolynomialInterpolation([seq([10*i, q[10*i]], i = 0 .. 10)], z)

Trying to get this function to work in Maple 18 

CharacteristicPolynomial(M,x)

I am trying to creat a way to solve matrix differential equations step by step.

 

First 1250 1251 1252 1253 1254 1255 1256 Last Page 1252 of 2429