MaplePrimes Questions

Search Questions:

Latest Questions Latest Questions Feed

Dear All,

I have a problem solving the attached nonlinear system of equations using shooting method.
I will be grateful if you could help me finding the solutions out.

 

restart; Shootlib := "C:/Shoot9"; libname := Shootlib, libname; with(Shoot);
with(plots);
N1 := 1.0; N2 := 2.0; N3 := .5; Bt := 6; Re_m := N1*Bt; gamma1 := 1;
FNS := {f(eta), fp(eta), fpp(eta), g(eta), gp(eta), m(eta), mp(eta), n(eta), np(eta), fppp(eta)};
ODE := {diff(f(eta), eta) = fp(eta), diff(fp(eta), eta) = fpp(eta), diff(fpp(eta), eta) = fppp(eta), diff(g(eta), eta) = gp(eta), diff(gp(eta), eta) = N1*(2.*g(eta)+(eta-2.*f(eta)).gp(eta)+2.*g(eta)*fp(eta)+2.*N2.N3.(m(eta).np(eta)-n(eta).mp(eta))), diff(m(eta), eta) = mp(eta), diff(mp(eta), eta) = Re_m.(m(eta)+(eta-2.*f(eta)).mp(eta)+2.*m(eta)*fp(eta)), diff(n(eta), eta) = np(eta), diff(np(eta), eta) = Re_m.(2.*n(eta)+(eta-2.*f(eta)).np(eta)+2.*N2/N3.m(eta).gp(eta)), diff(fppp(eta), eta) = N1*(3.*fpp(eta)+(eta-2.*f(eta)).fppp(eta)-2.*N2.N2.m(eta).(diff(mp(eta), eta)))};
blt := 1.0; IC := {f(0) = 0, fp(0) = 0, fpp(0) = alpha1, g(0) = 1, gp(0) = beta1, m(0) = 0, mp(0) = beta2, n(0) = 0, np(0) = beta3, fppp(0) = alpha2};
BC := {f(blt) = .5, fp(blt) = 0, g(blt) = 0, m(blt) = 1, n(blt) = 1};
infolevel[shoot] := 1;
S := shoot(ODE, IC, BC, FNS, [alpha1 = 1.425, alpha2 = .425, beta1 = -1.31, beta2 = 1.00, beta3 = 1.29]);
Error, (in isolate) cannot isolate for a function when it appears with different arguments
p := odeplot(S, [eta, fp(eta)], 0 .. 15);
Error, (in plots/odeplot) input is not a valid dsolve/numeric solution
display(p);
Error, (in plots:-display) expecting plot structure but received: p
p2 := odeplot(S, [eta, theta(eta)], 0 .. 10);
Error, (in plots/odeplot) input is not a valid dsolve/numeric solution
display(p2);
Error, (in plots:-display) expecting plot structure but received: p2

 

 

I am interested in using conformal maps for image distortion. How can this be made in Maple (an analogy to the ImageForwardTransformation[] in Mathematica, see http://community.wolfram.com/groups/-/m/t/854405?p_p_auth=TLh6kMXL). Thanks!

The problem that I'm asking about here doesn't show in the MaplePrimes display of the worksheet below; you'll need to download the worksheet to see it. The problem is that the last subsection (which is currently empty) overlaps with the second-to-last subsection. It also overlapped when it was not empty. I just want to delete that last subsection, but nothing that I've tried works. This is not the first time that I've had overlapping subsections, but previously I've always been able to fix the problem by closing and re-opening the worksheet. That doesn't work in this case.

ReparamT.mw: A scratch space for testing NewSLO:-reparam

Modify at will.

Created by Carl 2016Jun17.

 

Important: If any change is made to KB.mpl or NewSLO.mpl then before running this worksheet

1. Restart all open Maple sessions.

2. From the command line, run "cmaple -q < update-archive.mpl".

 

restart;

dir:= "C:/cygwin64/home/owner/hakaru/maple/":

Load:= proc(package::symbol) read ""||dir||package||".mpl" end proc:

 

with(NewSLO);

with(KB);

Load(ReparamT);

 

Passed cases

   

Cases being worked on

 

infolevel[reparam]:= 2:

 

Linear fractional transformation (LFT) with symbolic coefficients

   

LFT with explicit coefficients

   

Simplest nonlinear LFT: 1/x

   

Symbolic constant multiple

   

Two-variable LFT with Gamma

   

Two-variable constant multiple with ChiSquare and Standard Normal

   

(t16) Sum of std normals to Normal(0, sqrt(2))

   

(t20) Sum of n Bernoullis to Binomial

   

(t23) Sum of Exponentials to Gamma

   
 
   

 

Download ReparamT.mw

In my study, I often need to verify that two operator is symmetric i.e. [P,Q]=PQ-QP=0, where A and D are operator polynomial such like  D2+4u+uxD-1 multiply with D3+uD+ux,where D is differential operator.

I tried to use the Ore_package which can easily deal with the operator polynomial without integral(i.e. D-1 term), so in my case , how to deal with operator with both differential and integral?

Wondering if anyone has created a Maple "front end" for handling SLAB calls.

 

 

I want calcule the product of this function for x = x1, x2, ... xn:
       
    fx:= theta*exp(-theta*x)

I tried this:

    prod:= product(fx, x=1..n)

However this consider the integer values of x's, i.e, x = 1,2,3...,n.

I don't know how to make x values undefined. Is there anyway?

Hi
I want to solve this integration simbolic:


I use this cammand :

But Maple return this:

Would you Please Help me , thanks

How can I change the color of a graphic tittle?

Hello guys, i would like to do parallel computation in my code written in the Maple18. The question that can help me is:

Given a procedure that compute an function g, where g = f1+f2+f3+f4+f5+f6+f7+f8, i would like to compute all fi at same time.
Now, i´m using " grid:-seq('f[i]',[i=1,2,3,4,5,6,7,8])" and it works very well. However, i think that for my case an better solution should be;
Calculate the f1 in core 1, f2 in core 2, f3 in core 3 ... f8 in core 8 at same time, and after this, to sum all results(f1+f2+f3+..+f8). How i can do this?

Att,

Griffith.

import com.maplesoft.openmaple.*;

import com.maplesoft.externalcall.MapleException;

class test

{

    public static void main( String args[] )

    {

        String a[];

        Engine t;

        int i;

        a = new String[1];

        a[0] = "java";

        try

        {

            t = new Engine( a, new EngineCallBacksDefault(), null, null );

            t.evaluate( "int( x,x );" );

        }

        catch ( MapleException e )

        {

            System.out.println( "An exception occurred\n" );

            return;

        }

        System.out.println( "Done\n" );

    }

}

This code error import com.maplesoft.externalcall.MapleException in java?

Please help me.

http://www.maplesoft.com/support/help/Maple/view.aspx?path=OpenMaple/Java/Examples

I have the following multi-variable polynomial:

F:=(d^4-2)*C+(7*d^3-3*d)*C^2-(10*d^4-4*d)*L^2+(d-d^2)*L^3+(R+z^2)*x1+(10*d^3-4*d)*L;

Here my question is how to (i) generate "F" in the following form-> F:=k1*C+k2*L+k3*x1; (ii) How to find the coeficient terms of  "C", "L", "x1".

 

Thanking you in advance.

 

MVC

I am using mathematical simplification. In between the simplifcations I have the function after unsing "factor(f)"

f:=X^2*R*(1-y^3)(5+4*x-10*p+34*x^2)*y*x^2*(R+d^3+4*R-10*a*b^2)

 

Here my question is "How can separate or take out the term(s) within the brackets()" from the multivariate polynomial.

 

Thanking you in advance for your help.

 

MVC

I am trying to solve an optimization problem with several constraints and it is not working. The decision variables are the matrix entries.

 

Below is the code:

restart;
interface(displayprecision = 4): with( plots ):
with(linalg):with( Optimization );
[ImportMPS, Interactive, LPSolve, LSSolve, Maximize, Minimize,

NLPSolve, QPSolve]
f:=proc(x1,x2,x3,x4,x5,x6)
global lambda,mu,rho,Ls;
local eq,Lsq,g,P,n,IM,ImP,ImPi,c0,cb,Sol,i,j,t1,t2,fact,t3,t4,t5,Wq,W,Lq,L,Ws;
n:=7;
g:=array(1..n,[5,0,0,0,0,0,0]);
mu:=array(1..n,[10,5,5,5,5,5,5]);
P:=matrix([[0,x1,x2,0,0,0,0],[0,0,0,x3,x4,0,0],[0,0,0,0,0,x5,x6],
[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]]);
IM := array(identity, 1..n,1..n):
ImP:=evalm(IM-P):
ImPi:=inverse(ImP):
lambda:=evalm(g&*ImPi):
for i from 1 to n do
rho[i] := lambda[i]/mu[i]
od:
c0:=array(1..n,[1/2,0,0,0,0,0,0]);
cb:=array(1..n,[1/5,1/5,1/5,1/5,1/5,1/5,1/5]);
for i from 1 to n do
eq[i]:=(g[i]/lambda[i])*c0[i] + sum((lambda[j]/lambda[i])*P[j,i]*((P[j,i]*(rho[j]^2*cb[j] +(1-rho[j]^2)*cx[j] ))+ (1 -P[j,i])),j=1..n)
od:
Sol:=fsolve({eq[1]-cx[1]=0,eq[2]-cx[2]=0,eq[3]-cx[3]=0,eq[4]-cx[4]=0,eq[5]-cx[5]=0,eq[6]-cx[6]=0,eq[7]-cx[7]=0},{cx[1],cx[2],cx[3],cx[4],cx[5],cx[6],cx[7]}):
assign(Sol):cx:
for i from 1 to n do
t1:= -2*(1-rho[i])/(3*rho[i]):
t2:= ((1-cx[i])^2)/(cx[i]+cb[i]):
fact := exp(t1*t2):
if cx[i] >= 1 then
fact:=1:
else
fact:
fi:
t3:=rho[i]/(1-rho[i]):
t4:= (cx[i]+ cb[i])/2:
t5:=1/mu[i]:
Wq[i] := (t3*t4*t5*fact):
W[i] := Wq[i] + t5:
Lq[i] := lambda[i]*Wq[i]:
L[i] := lambda[i]*W[i]:
od:
Ls:=add(L[i],i=1..n);Lsq:=add(Lq[i],i=1..n):Ws:=Ls/add(g[i],i=1..n):
RETURN(Ls):
end proc:

# here are the constraint procedures to ensure the probability pairs sum to one

p1 := proc (x1, x2) x1+x2-1 end proc;
proc(x1, x2) ... end;
p2 := proc (x3, x4) x3+x4-1 end proc;
proc(x3, x4) ... end;
p3 := proc (x5, x6) x5+x6-1 end proc;
proc(x5, x6) ... end;

sol := Optimization:-NLPSolve(f, {p1}, {p2}, {p3}, 0 .. 1, 0 .. 1, 0 .. 1, 0 .. 1, 0 .. 1, 0 .. 1, initialpoint = [.5, .5, .5, .5, .5, .5]);


Error, (in Optimization:-NLPSolve) unexpected parameters: {p3}

It seems to say that the problem are the constraints but this seems odd.

 

 

My PhD involves generating equations that are very long, in some cases, more than 10 pages long.

For the reader its much more useful to have some of these equations described than presented. One of the descriptions I'd like to use is number of characters and intuitively the command Length feels like it should tell you the number of characters in an expr

However what is written on the help page for this function I don't understand:
https://www.maplesoft.com/support/help/maple/view.aspx?path=length

 

For other objects, the length of each operand of expr is computed recursively and added to the number of words used to represent expr. In this way, the measure of the size of expr is returned.

then the example that is given is

>length(x+2y)

length(x+2y)

99

(5)

See Also

numelems

S


Could anyone explain to me what is meant when it is said length(x+2y)=9? if I try an apply things recursively the expression with the most chatracters i can generate is "x+y+y"which is only 5 characters.


Is there another command that would be better suited to my purposes?

Hi,

i would like to plot a graph in R^3 of a function f(n,t), where n is integer and t is real. For every t i would like to have a sequence of points. Is it possible?

thanks, anna rita 

1 2 3 4 5 6 7 Last Page 3 of 1336