MaplePrimes Questions

In workbook mode I use the Insert>>Paragaph>>Before Cursor to create a text block. I just want to type text into this block by way of comments on what preceded/follows. However, when I type parentheses or <> of (I expect) other stuff that Maple recognises as being parts of mathematical expressions Maple switches to italic and bold and starts generally interefering with my text. In the case of my title I get the result in the picture below. Is there any way to stop Maple doing this so I can type text?

 

How I can solve it ? If I want a solution dependent of a. With fsolve? But how?

-x3+ax2-lnx=0
 

Hello,

I'm working in a project where I use the Java Open Maple library. I need to evaluate a procedure but with a very large number. In the function engine.newNumeric() the only large option is a long which is not enough for me. I use Java BigInteger class to represent my very large numbers. Any suggestions that might help is very welcomed!

 

Thank you

I am trying to write a procedure that implements Karmarkar's algorithm for solving linear programming problems.

I am getting a parsing error and I am not sure why. Each of the command in the procedure are working the way I want them to but there is something wrong with the loop controls. The code is attached below:

with(LinearAlgebra);

print(??); # input placeholder
Karmarkar:= proc(A,c)

     n:=ColumnDimension(A);

     x:=ZeroVector(n);

     y:=Vector(n,1/(n));

     r:=1/(sqrt(n*(n-1)));

     for i from 1 to nops(NullSpace(A))do

          x:=x+NullSpace(A)[i];

     end do;

     C:=1.0;

     while C>0.0001 do ;

          Diag := DiagonalMatrix(x/Norm(x, 1));

          B := `<,>`(A.Diag, Vector[row](n, 1));

          p := (IdentityMatrix(n)-Transpose(B).MatrixInverse(B.Transpose(B)).B).Transpose(c.Diag);

          p:=evalf(p/(Norm(p,2)));

          y:=y-0.9*r*p;

          x_new:=evalf((Diag . y)/((Vector[row](n,1) . (Diag . y))));

          C:=evalf((c . x_new-c . x)/(c . x));

          if C>0.0001 then

               x_new:=x;

          end if;

      end do;

end proc;

Any ideas on how to fix this?

 

I'm trying to solve a system of two differential equations of the second order in Maple. I set it up as a system of four differential equations of the first order, but after calling for the solution, all I get back is what I entered in without receiving a solution of any sort. What do I need to fix?

Here's what I did:

_________________________________________________

> with(plots);
print(`output redirected...`); # input placeholder

> m := 0.46e-1; d := 0.42e-1; v := 60; alpha0 := 12; g := 9.81; pa := 1.205; cd := .2; n := 100; omega := 2*Pi*(1/60);
                            
> p := 6*m/(Pi*d^3);

> k1 := (3/4)*cd*pa/(d*p); k2 := (3/8)*omega*pa/p;
                                        
> gl1 := vx(t) = diff(x(t), t);                   
> gl2 := vy(t) = diff(y(t), t);
                              
> gl3 := diff(vx(t), t) = -k1*vx(t)*(vx(t)^2+vy(t)^2)^(1/2)-k2*vy(t);
 
> gl4 := diff(vy(t), t) = -g-k1*vy(t)*(vx(t)^2+vy(t)^2)^(1/2)+k2*vy(t);


> init1 := x(0) = 0;
> init2 := y(0) = 0;
> init3 := vx(0) = v*cos((1/15)*Pi);                              
> init4 := vy(0) = v*sin((1/15)*Pi);

> sol; dsolve({gl1, gl2, gl3, gl4, init1, init2, init3, init4}, {vx(t), vy(t), x(t), y(t)}, type = numeric);

> sol(.1);
                            sol(0.1)

> odeplot(sol, t, x(t), t, y(t), t = 0 .. 1);
                   Error, (in plots/odeplot) input is not a valid dsolve/numeric solution


____________________________________________________________________________

After calling for the solution at t=0.1, I don't get anything back. I also tried plotting the solution, but then I receive an error message.

I have downloaded and trying to run the application "Traveling Salesman Problem" by Bruno Guerrieri: 

http://www.maplesoft.com/applications/view.aspx?SID=6873

However, the animations do not work properly. Instead of the animations, I get series of sets of plots. Each such set consists of four plots: one with a green edge, one with a blue edge, one with blue edges, and one with points (nodes).

I guess, it happens because of a new version of maple: the application was created in 2008 for Maple 12, and I use Maple 2015.

Could anybody, please, tell me what exactly should I change in the code so that it will work properly?

Any help will be very much appreciated.

Many thanks in advance!

Hi All, 

 

I'm trying to numerically solve a differential equation which has a numeric function in it. 

For example, consider the function f. 

f:=(r)-> evalf(Int( <some messy function>, <some range>)) ;  <- This can be solved numerically and returns an answer quickly. i.e

f(23) gives 102;

 

Now, I want to numericaly solve something like.

Eq:= diff(p(r),r,r) + diff(p(r),r) - f(p(r));

ICS:=D(p)(0.001)=0, p(0.001) = 3

dsolve({Eq,ICS},numeric).

dsolve will not attempt to solve it due to the numeric integration in f. Is there a way I can just use numeric techniques to solve this kind of problem?

Thanks in advance.  

Is it possible to view maple workbook content in older versions?

This is for the infamous Calc 2 Goblet Maple Project

I have tried everything changed all the numbers and got nowhere or worse results. The only thing that accurately works is the example project:

(0, 1.5) and end at (0.5, 0.2). which equals f1(x)=-2.6x+1.5

and f2:=x->0.2+0.05*sin(2*(x-0.5)) which is really 0.2+0.05sin(2x-1)

The goal is to change the example project so it becomes something of my own creation. 

When I change f2:=x->0.4+0.05*sin(2*x-0.5)) it is at least attached but forms a sharp dip down first then connects at the point when it should be smooth curve. It seems you can do anything to the other curve

f3:=x->a*x^3+b*x^2+c*x+d;
x -> a x^3 + b x^2 + c x + d

connection1:=f3(5.5)=f2(5.5);
166.375 a + 30.25 b + 5.5 c + d = 0.3727989445

arc1:=f3(7)=1;
343 a + 49 b + 7 c + d = 1

arc2:=f3(7.5)=0.9;
421.875 a + 56.25 b + 7.5 c + d = 0.9

arc3:=f3(9)=1.6;
729 a + 81 b + 9 c + d = 1.6

values:=solve({eq1,eq2,eq3,eq4},{a,b,c,d});

F:=x->piecewise(x<0.5,f1(x),x>=0.5 and x<5.5,f2(x),x>=5.5,f3(x));

plot(F(x),x=0..9,y=0..4,scaling=constrained);

So how can this be fixed?

I have an equation 

eq := diff(y(x), x) = ((76.559-179.54*((1/3600)*x+1)+113.15*((1/3600)*x+1)^2-13.661*((1/3600)*x+1)^3+.4621*((1/3600)*x+1)^4)*.88-.15*((76.559-179.54*((1/3600)*x+1)+113.15*((1/3600)*x+1)^2-13.661*((1/3600)*x+1)^3+.4621*((1/3600)*x+1)^4)*.88)*(1-0.45e-2*(y(x)-9.8-273))-(3.8+2.8*3.7+5.76*10^(-8)*(y(x)^2+(273+9.8+(1/46800)*(18.3-9.8)*x)^2)*(y(x)+273+9.8+(1/46800)*(18.3-9.8)*x))*(273+9.8+(1/46800)*(18.3-9.8)*x-y(x)))/(903*(2702*0.2e-2));

Maple gives me a general solution.

then I  tried to get a particular solution using dsolve({eq, y(0) = 283.8});

But Maple dose not return anything.

Thank you for any help.

Is there a difference between these two? 

with(Statistics):

Sample(Normal(0,1),100)

Sample(RandomVariable(Normal(0, 1)), 100)

 

Hello everyone,

I am trying to solve numerically int( f(t,z) , t=0..T ) = 0 , in z for a cumbersome f.

I tried z1=fsolve( int( f(t,z) , t=0..T ) = 0 , z). But then I tried int( f(t,z1) , t=0..T ) and the result is clearly not zero nor anything small.

It looks like Maple evaluates analytically the integral, and does it wrong (check this for more details) so fsolve uses the wrong equations.

Anyone knows how I can force Maple to evaluate numerically the integral at each step of the fsolve function?

Thank you!

Hello,

In the creation of package wrapping some procedures, may you tell me the differences between using a table or a module so as to wrap the procedures ?

In my case, it seems to me that table is more convenient since I can create with table packages while keeping my program with a structure of section, subsection, ...

But, I'm a beginner in the use of packages. Consequently, I'm very interested in your opinions on this question.

Thanks a lot for your help

hi,i am studying the maple most recent.But when calculating function integral,I ran into trouble.I hope to get your help.Here is the code I wrote, but it runs a very long time. How to effectively reduce the integration time?

restart;
with(student);
assume(n::integer);
Fourierf := proc (sigma, a, b, N) local A, A0, B, T, S, Ff; T := b-a; A0 := int(sigma, t = a .. b); A := int(sigma*sin(n*Pi*t/T), t = a .. b); B := int(sigma*cos(n*Pi*t/T), t = a .. b); S := sum(A*sin(n*Pi*t/T)+B*cos(n*Pi*t/T), n = 1 .. N)+(1/2)*A0; Ff := unapply(S, t) end proc;

f := proc (t) options operator, arrow; piecewise(t < .13*2.6 and 0 <= t, 100*t/(.13*2.6), .13*2.6 <= t and t < 2.6, 100, 2.6 <= t and t < 2.6*1.1, 0) end proc;

sigma := f(t);
a := 0;
b := 1.1*2.6;
s1 := unapply((Fourierf(sigma, a, b, 500))(t)/uw0, t);

s2 := unapply((Fourierf(sigma, a, b, 500))(t)/ua0, t);
A1 := (2*n+1)^2*Pi^2*(C3+1+sqrt(4*C1*C2*C3+C3^2-2*C3+1))/(8*C1*C2-8);
A2 := (2*n+1)^2*Pi^2*(C3+1-sqrt(4*C1*C2*C3+C3^2-2*C3+1))/(8*C1*C2-8);
g := -C2*Cww*(diff(s1(x), `$`(x, 2)))+Caa*(diff(s2(x), `$`(x, 2))+(n+1/2)^2*Pi^2*(diff(s2(x), x)));
f1 := -(1/2)*(n+1/2)^2*Pi^2*sqrt(4*C1*C2*C3+C3^2-2*C3+1)+C2*Cww*((D@@1)(s1))(0)-Caa*((D@@1)(s2))(0)+(n+1/2)^2*Pi^2*(C2-(1/2)*C3+1/2);

CN := ((2*(int(exp(-A1*x)*g, x = 0 .. t)-f1))*exp(A1*t)-(2*(int(exp(-A2*x)*g, x = 0 .. t)-f1))*exp(A2*t))/((n+1/2)^3*Pi^3*sqrt(4*C1*C2*C3+C3^2-2*C3+1));
ua := sum(CN*sin((n+1/2)*Pi*z), n = 0 .. 100);

 

 

I want to solve one equation with one variable and the variable is also in definite integral delimiter. When trying fsolve, I get the error:

"Error, (in fsolve) Can't handle expressions with typed procedures"

code

Here is worksheet.mw

How can I obtain solution with method other from simple manual testing Te values?

First 1141 1142 1143 1144 1145 1146 1147 Last Page 1143 of 2434