MaplePrimes Questions

and I try to fix my file use this method: https://www.mapleprimes.com/questions/129377-There-Were-Problems-During-The-Loading?reply=reply , but an error occurred as follows .

And my code is:

restart;

DeleteBadCharacters := proc(file :: string)
local base, badchar, char, cnt, msg, outfile, str, unicode;
    str := FileTools:-Text:-ReadFile(file);
    for cnt from 0 do
        try
            XMLTools:-ParseString(str);
            break;
        catch "An invalid XML character":
            msg := lastexception[2];
            if not StringTools:-RegMatch("Unicode: 0x([^)]+)", msg, 'all', 'unicode') then
                error;
            end if;
            unicode := sscanf(unicode,"%x");
            char := convert(unicode,'bytes');
            badchar[cnt+1] := char;
            str := StringTools:-SubstituteAll(str, char, "");
        end try;
    end do;

    if cnt=0 then
        printf("no errors in file\n");
    else
        if not StringTools:-RegMatch("^(.*)\\.mw$", file, 'all', 'base') then
            error "problem extracting basename";
        end if;
        printf("deleted bad characters: %A\n", {seq(badchar[cnt],cnt=1..cnt)});
        outfile := sprintf("%s-fixed.mw", base);
        FileTools:-Text:-WriteString(outfile, str);
        fclose(outfile);
        printf("wrote updated file to %s\n", outfile);
    end if;
    return NULL;
end proc:
NULL;
NULL;
DeleteBadCharacters( "E:/EchoModel_V3.mw" );

And the error is

"Error, (in XMLTools:-ParseString) XML document structures must start and end within the same entity."

I use maple 2021.  Thank you very much!

I can not find my Kamke book right now. But according to Maple help, Homogeneous ODE of Class C is the following

If I understand the above, it is saying that the RHS of the ode should be ratio of two polynomials, and both should be linear in y and x. Correct?

Given the above, then why Maple says the following ode is _homogeneous, `class C` ? Since the RHS is not linear in y and not linear in x:

restart;
ode:=diff(y(x),x)=(2*y(x)-1)*(4*y(x)+6*x-3)/(y(x)+3*x-1)^2;
ode:=lhs(ode)=expand(numer(rhs(ode)))/expand(denom(rhs(ode)))

DEtools:-odeadvisor(ode)

           [[_homogeneous, `class C`], _rational]

What Am I overlooking/misunderstanding  from reading this definition? 

The system does not correctly calculate the CDF of a Binomial using the Regularized Incomplete Beta for p=0.5.

 

Ícono de validado por la comunidad

restart;
n := 10;
f := x -> int(t^(n - x - 1)*(1 - t)^x, t = 0 .. 1 - p)/Beta(n - x, x + 1);
p := 0.5;
plot(f(x), x = 0 .. 10);

gaussian.m.mw

This is the maple worksheet

 

It's showing an error. It's showing an error with its conditions. What to do? How can I solve it? Got stuck here on this issue?Unable to solve this problem. Please help me. This the maple worksheet:

6coupled.m.mw

 

I have a function that refuses to allow "fsolve" to compute a root for.  I'm trying to use a brute force Newton (or secant) algorithm to find the root.  This is successful 

But I'm new enough in Maple Flow (and Maple) that I can't build an automatic recursion method.  All ideas welcome.

EqBIS := proc(P, U, V)
local a, eq1, M1, t, PU, PV, bissec1;
a := (P - U)/LinearAlgebra:-Norm(P - U, 2) + (P - V)/LinearAlgebra:-Norm(P - V, 2);
M1 := P + a*t;
eq1 := op(eliminate({x = M1[1], y = M1[2]}, t));
RETURN(op(eq1[2])); end proc;
EqBIS*([4, 5], [11, 7/3], [11, 5]);
why such a procedure gives no result Thabk you.

 

Trying to use the jets package from http://jets.math.slu.cz/ (file jets.s) for calculus of variations.

Test example -

coordinates([x,y],[f],3);
parameter(p);
g:=(f_x)^2+(f_y)^2-2*p*f;
vg:=variation(g,f);                  # first variation of g (from line 4354 of jets.s)

Now I want to find g from vg - inverse problem. The code for this starts on line 4367 of jets.s, command is lagrangian.

Tried -

Lg:=lagrangian(vg,f);
Lg:=lagrangian([vg,f]);
Lg:=lagrangian(vg,[f]);
Lg:=lagrangian(f=vg);

but all give syntax errors.

The authors of the package don't respond to query and the manual does't help.

Does anyone know what the correct syntax of lagrangian is. Or is there a better package to use for inverse problem.

Thank you.

I am doing some error I dont know where in the usage

T := [[1, 2], [3, 4]];
convert(T, set, nested);

{[1, 2], [3, 4]}

But I expected internal lists also to be converted to sets like {{1,2},{3,4}}  my list may be a big list just taken a example

This a simple question I know i tried somewhere i am going wrong please help

what i am trying to do is 

n:=8;

k:=2;

C:=choose(n,k);
convert(C,set,nested);
not making all nested all as set as mentioned in the simple example.

some simple program and fast kind help

I'm trying to figure out how to represent 100 people where each one has a 30% probablity of getting sick.

I think sample can be used but not I'm exactly sure how to achieve that. Basically how many people are sick?

The computer on which I have been executing Maple worksheets for the past six years (CPU: i7 - 5820K, 6 core, 3.3 GHz, 5th generation) is now significantly slower than new machines.

I don't know how to interpret public specifications of potential replacement machines into their actual future performance with Maple.

Please give me or direct me to any advice which would enable me to knowledgeably purchase a much faster processor of Maple code.

 

Hello there, 

Is there any chance to see that the 'eq_5_22_desired' expression shown below can be derived from a collection of the commands. similar to what's given in the 'eq_5_22a'? In other words, is it possible to make Maple aware of the point that 'L__ad/(L__ad + L__fd)' can be interpreted as 'L__ad*L__fd/(L__ad + L__fd) * 1/L__fd'?

restart;

with(LinearAlgebra):

interface(imaginaryunit=j):

eq_5_22 := Psi__ad = -L__ad*L__fd*i__d*1/(L__ad + L__fd) + L__ad*Psi__fd*1/(L__ad + L__fd);

Psi__ad = -L__ad*L__fd*i__d/(L__ad+L__fd)+L__ad*Psi__fd/(L__ad+L__fd)

(1)

eq_5_23x := L__ad__p = 1 / (1/L__ad + 1/L__fd);

L__ad__p = 1/(1/L__ad+1/L__fd)

(2)

eq_5_23 := L__ad__p = evala(rhs(eq_5_23x));

L__ad__p = L__ad*L__fd/(L__ad+L__fd)

(3)

eq_5_22a := Psi__ad = collect(expand(solve(eq_5_18x, Psi__ad)), rhs(eq_5_23)); # error

Error, invalid input: expand expects 1 argument, but received 0

 

eq_5_22_desired := Psi__ad = -L__ad__p*i__d + L__ad__p*Psi__fd/L__fd;

Psi__ad = -L__ad__p*i__d+L__ad__p*Psi__fd/L__fd

(4)

 

Download Q20220812.mw


 

restart;

assume(alpha>0)

assume(delta:: real)

assume(C>0)

 

f:= g->e^(-1/2*(C*g*(1-g^2))^2*(1+delta^2)-C*g*(1-g^2)*alpha)/(g*(1-g^2));

proc (g) options operator, arrow; e^(-(1/2)*C^2*g^2*(1-g^2)^2*(delta^2+1)-C*g*(1-g^2)*alpha)/(g*(1-g^2)) end proc

(1)

convert(1/(g*(1-g^2)),parfrac,g);

-(1/2)/(g+1)+1/g-(1/2)/(g-1)

(2)

f1:= g->-e^(-1/2*(C*g*(1-g^2))^2*(1+delta^2)-C*g*(1-g^2)*alpha)/(2*(g+1));

proc (g) options operator, arrow; -e^(-(1/2)*C^2*g^2*(1-g^2)^2*(delta^2+1)-C*g*(1-g^2)*alpha)/(2*g+2) end proc

(3)

f2 := g->e^(-1/2*(C*g*(1-g^2))^2*(1+delta^2)-C*g*(1-g^2)*alpha)/g;

proc (g) options operator, arrow; e^(-(1/2)*C^2*g^2*(1-g^2)^2*(delta^2+1)-C*g*(1-g^2)*alpha)/g end proc

(4)

f3:= g->-e^(-1/2*(C*g*(1-g^2))^2*(1+delta^2)-C*g*(1-g^2)*alpha)/(2*(g-1));

proc (g) options operator, arrow; -e^(-(1/2)*C^2*g^2*(1-g^2)^2*(delta^2+1)-C*g*(1-g^2)*alpha)/(2*g-2) end proc

(5)

int(f1(g),g=0..infinity);

int(-e^(-(1/2)*C^2*g^2*(-g^2+1)^2*(delta^2+1)-C*g*(-g^2+1)*alpha)/(2*g+2), g = 0 .. infinity)

(6)

 


 

Download 2022_integralIandJ.mw

I do not know why eq(6) does not evaluate. Could you help me?

When trying to construct objects like SU(3)xSU(2)xU(1), one needs parameters to satisfy SU(n,q)xSU(n,q)xU(n,q).  What are the values of 'q' for these group constructions using the group theory package?  

thanks

in Maple 2022.1 on windows 10

interface(version);

`Standard Worksheet Interface, Maple 2022.1, Windows 10, May 26 2022 Build ID 1619613`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1288 and is the same as the version installed in this computer, created 2022, August 6, 16:9 hours Pacific Time.`

restart;

int(x^5*(a+b*arctan(c*x^2))^2,x)

Error, (in gcdex) invalid arguments

 


Why it happens and is there a workaround?

Does it happen on earlier versions? I do not have an earlier Maple installed on my current PC as it is new to check. 

Download int_problem_8_10_2022.mw

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