MaplePrimes Questions

Hi,

How can I get y=x in output (4) when  g is equal to f?

restart

f := x -> F(x)

proc (x) options operator, arrow; F(x) end proc

(1)

((f@@(-1))@f)(x);

x

(2)

# Let us assume that y is defined this way

y := ((f@@(-1))@g)(x);

(f@@(-1))(g(x))

(3)

# When g is identical to f I would like to get y=x

'y' = eval(y, g=f);
'y' = eval(y, g = (x -> f(x)))

y = (f@@(-1))(F(x))

 

y = (f@@(-1))(F(x))

(4)

 

Download inverse_f.mw

Thanks in advance

This is something I use a fair bit. I have procedures with alternative spelling options for the colours Red Green and Blue.
Have shown a single example copied from  an overloaded procedure. It there a nicer way of handling this than what I am doing?
There is a section in help under "Procedure Parameter Declarations" on "Indexed Keyword Parameters"  but I don't see how to use it here. These procedures are used inside a package.

restart

 

GeomClr:="Blue";  # can be "Blue", "blue", "B", "b"  or;
                  #        "Green", "green", "G", "g"  or;
                  #        "Red2, "red", "R", "r";

Prntmsg:="y" ; #  or anything that is not"y"

 

"Blue"

 

"y"

(1)

spread:=proc(p0::{satisfies(s -> type(s, [algebraic $ 2])),'Vector[row]'(2, algebraic)},
              p1::{satisfies(s -> type(s, [algebraic $ 2])),'Vector[row]'(2, algebraic)},
              clr::`string`:= GeomClr,
              prnt::`string`:=Prntmsg)
           option overload;
           uses LinearAlgebra;
           #print(clr,p0,p1);
           if clr="b" or clr="B" or clr="blue" or clr="Blue" then
              if prnt="y" then
                print("Spread 2 [x,y] Points/Vectors wrt origin Blue");
              end if;
               return 1 - BilinearForm(p0, p1, conjugate = false)^2/(BilinearForm(p0, p0, conjugate = false)*BilinearForm(p1, p1, conjugate = false));
           elif clr="g" or clr="G" or clr="green" or clr="Green" then
              if prnt="y" then
               print( "Spread 2 [x,y] Points/Vectors wrt origin Green");
              end if;
               return -1/4*(p0[1]*p1[2] - p0[2]*p1[1])^2/(p0[1]*p0[2]*p1[1]*p1[2]);
           elif clr="r" or clr="R" or clr="red" or clr="Red" then
              if prnt="y" then
               print( "Spread 2 [x,y] Points/Vectors wrt origin Red");
               end if;
               return -(p0[1]*p1[2] - p0[2]*p1[1])^2/((p0[1]^2 - p0[2]^2)*(p1[1]^2 - p1[2]^2));
          end if;
          end proc:

sb:=spread(<3|2>,<4|-5>);

"Spread 2 [x,y] Points/Vectors wrt origin Blue"

 

529/533

(2)

sg:=spread(<3|2>,<4|-5>,"g");

"Spread 2 [x,y] Points/Vectors wrt origin Green"

 

529/480

(3)

sr:=spread(<3|2>,<4|-5>,"r");

"Spread 2 [x,y] Points/Vectors wrt origin Red"

 

529/45

(4)

1/sb+1/sr+1/sg

2

(5)

sr:=spread(<3|2>,<4|-5>,"r","n");

529/45

(6)

 


 

Download Q_2024-02-09_Alternative_Spelling_in_Proc.mw

I just came across an issue when solving a simple thermodynamics problem. Steam enters a turbine at 140 psia and 1000 F and expands isentropically to 2psia. When I try to determine the exit temperature, the problem occurs. If I set the units for the problem to FPS, I get the answer in F. The problem is that the numerical value is wrong. The numerical value corresponds to degree R, not F. The numerical value given is 585 F, it should be 585 R.  If I set the problem to SI units, the answer is in K. The answer given is 325 K.  I can then convert it to degree F. This way I get the correct answer.

According to the Maple documentation, both commands can handle inequalities. I'm only interested in checking when a semialgebraic set is empty, so I thought SemiAlgebraicSetTools:-IsEmpty would be generally faster than computing the solutions with the SemiAlgebraic command. However, the following code shows otherwise:

Code 1:

```

restart;
with(SolveTools, SemiAlgebraic);

B_poly := -(x + 4)*(x + 3)*(x + 2)*(x + 1)*(x - 1)*(x - 2)*(x - 3)*(x - 4);
g := -1/100000*(x+4)*(x+3)*(x+2)*(x+1)*(x-1)*(x-2)*(x-3)*(x-4)*(-1/670*(x+4)
*(x+3)*(x+2)*(x+1)*(x-1)*(x-2)*(x-3)*(x-4)-669/670)^136+1/100000*(x+4)*(x+3)*(x
+2)*(x+1)*(x-1)*(x-2)*(x-3)*(x-4)*(1/670*(x+4)*(x+3)*(x+2)*(x+1)*(x-1)*(x-2)*(x
-3)*(x-4)-669/670)^136;
f := -4347225/87808*x^8 - 17375/392*x^7 + 629491375/395136*x^6 + 
   266375/252*x^5 - 200677775/12544*x^4 - 3174625/504*x^3 + 
   11067842125/197568*x^2 - 53625/98*x - 126496075/4116;

SemiAlgebraic(
  [B_poly >= 0, g - f >= 0], [x]);

```
 

Code 2:

```

restart;
with(RegularChains, SemiAlgebraicSetTools, PolynomialRing);

local R := PolynomialRing([x]);

B_poly := -(x + 4)*(x + 3)*(x + 2)*(x + 1)*(x - 1)*(x - 2)*(x - 3)*(x - 4);
g := -1/100000*(x+4)*(x+3)*(x+2)*(x+1)*(x-1)*(x-2)*(x-3)*(x-4)*(-1/670*(x+4)
*(x+3)*(x+2)*(x+1)*(x-1)*(x-2)*(x-3)*(x-4)-669/670)^136+1/100000*(x+4)*(x+3)*(x
+2)*(x+1)*(x-1)*(x-2)*(x-3)*(x-4)*(1/670*(x+4)*(x+3)*(x+2)*(x+1)*(x-1)*(x-2)*(x
-3)*(x-4)-669/670)^136;
f := -4347225/87808*x^8 - 17375/392*x^7 + 629491375/395136*x^6 + 
   266375/252*x^5 - 200677775/12544*x^4 - 3174625/504*x^3 + 
   11067842125/197568*x^2 - 53625/98*x - 126496075/4116;

SemiAlgebraicSetTools:-IsEmpty([B_poly >= 0, g-f >= 0], R);

```

My computer finishes 'Code 1' in about 20 seconds, while 'Code 2' doesn't terminate. Am I misunderstanding something about how to use these commands for my problem? I'd appreciate it if you could clarify why this is happening and when to use each command in each case. Thanks!

For example, given plot f(x)= x^5+x. plot the function given by g(x)= f(x-2)+3

Also, when plotting my graphs they look different than other graphing software.

How to rectify this error.

S-D_effect-RK.mw

What technique would you try to solve the following non-linear differential equation for real g(x) given h(x) is real (finite positive) polynomial?      h(x) = g(x) + g'(x)/g(x),      where g'(x) = dg(x)/dx

I want to convert the maple result 

arctan(y/x) to arctan(y,x), 

so if x is equal zero i obtain pi/2 and not diveided by zero 

 

 

i have two euations including integration which has two unkwnon x1 and x2.
how can i get these equations solved, thanks for the help.

restart:

with(DirectSearch)

[BoundedObjective, CompromiseProgramming, DataFit, ExponentialWeightedSum, GlobalOptima, GlobalSearch, Minimax, ModifiedTchebycheff, Search, SolveEquations, WeightedProduct, WeightedSum]

(1)

with(LinearAlgebra):

with(Student:-Calculus1):

with(Student:-NumericalAnalysis):

A:=convert(taylor(exp(Q),Q,6),polynom);

1+Q+(1/2)*Q^2+(1/6)*Q^3+(1/24)*Q^4+(1/120)*Q^5

(2)

Q:=a[11]*(E[r])^2+a[22]*(E[theta])^2+2*a[12]*E[r]*E[theta];

E[r]^2*a[11]+2*E[r]*E[theta]*a[12]+E[theta]^2*a[22]

(3)

psi:=0.5*c*(exp(Q)-1);

.5*c*(exp(E[r]^2*a[11]+2*E[r]*E[theta]*a[12]+E[theta]^2*a[22])-1)

(4)

F:=Matrix(3,3,[[lambda[r],0,0],[0,lambda[theta],0],[0,0,lambda[z]]]);

Matrix(3, 3, {(1, 1) = lambda[r], (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = lambda[theta], (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = lambda[z]})

(5)

sigma[r]:=-p+diff(psi,E[r])*F[1,1]^2;

-p+.5*c*(2*E[r]*a[11]+2*E[theta]*a[12])*exp(E[r]^2*a[11]+2*E[r]*E[theta]*a[12]+E[theta]^2*a[22])*lambda[r]^2

(6)

sigma[theta]:=-p+diff(psi,E[theta])*F[2,2]^2;

-p+.5*c*(2*E[r]*a[12]+2*E[theta]*a[22])*exp(E[r]^2*a[11]+2*E[r]*E[theta]*a[12]+E[theta]^2*a[22])*lambda[theta]^2

(7)

sigma[z]:=-p+diff(psi,E[z])*F[3,3]^2;

-p

(8)

p1:=diff(psi,E[r])*F[1,1]^2;#Pressure is constituted form 3 parts, one part is p1, other part is p2 and a constant p0

.5*c*(2*E[r]*a[11]+2*E[theta]*a[12])*exp(E[r]^2*a[11]+2*E[r]*E[theta]*a[12]+E[theta]^2*a[22])*lambda[r]^2

(9)

E[r]:=0.5*(lambda[r]^2-1);

.5*lambda[r]^2-.5

(10)

E[theta]:=0.5*(lambda[theta]^2-1);

.5*lambda[theta]^2-.5

(11)

E[z]:=0.5*(lambda[z]^2-1);

.5*lambda[z]^2-.5

(12)

lambda[r]:=x2*sqrt((r^2-x1)/x2)/r;

x2*((r^2-x1)/x2)^(1/2)/r

(13)

lambda[theta]:=r/sqrt((r^2-x1)/x2);

r/((r^2-x1)/x2)^(1/2)

(14)

lambda[z]:=1/x2;

1/x2

(15)

sigma[r];

-p+.5*c*(2*(.5*x2*(r^2-x1)/r^2-.5)*a[11]+2*(.5*r^2*x2/(r^2-x1)-.5)*a[12])*exp((.5*x2*(r^2-x1)/r^2-.5)^2*a[11]+2*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)*a[12]+(.5*r^2*x2/(r^2-x1)-.5)^2*a[22])*x2*(r^2-x1)/r^2

(16)

sigma[theta]:

sigma[z]:

#p2:=int((sigma[r]-sigma[theta])/r,r):%Pressure is constituted form 2 parts, one part is p1, other part is p2 and and a constant p0

Digits:=10:

c:=790000:

a[11]:=0.539:

a[22]:=0.368:

a[12]:=0.653:

p_in:=10000:

p_out:=0:

r_in:=5.4e-3:

r_out:=6.1e-3:

F_a:=0.381846:

p21:=(c/2)*(((r^2-x1)/r^3)-(x2*r/(r^2-x1)))*exp(Q);

395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)

(17)

p22:=(c/2)*Int(exp(Q)*(3*x2*r^6-r^6+5*x1*r^4-x1*x2*r^4-7*x1^2*r^2+3*x1^3)/(r^4*(r^2-x1)^2),r=r_in..r_out);#This is the part that should be maintained as an integral until the final solution

395000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))

(18)

p2:=p21-p22;#p2 is computed using the integration by part method

395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)-395000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))

(19)

 

p0:=(p_out+eval(p2,r=r_out));#p0 is the constant which is defined form the boundary conditions either p_out=subs(r=r_out,sigma[r]) or p_in=subs(r=r_in,sigma[r])

395000*(-4405655.099*x1+163.9344262-0.61e-2*x2/(-x1+0.3721e-4))*exp(.539*(13437.24805*x2*(-x1+0.3721e-4)-.5)^2+1.306*(13437.24805*x2*(-x1+0.3721e-4)-.5)*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)+.368*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)^2)-395000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))

(20)

 

p:=p1+p2+p0;#p is the total pressure

395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2+395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)-790000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))+395000*(-4405655.099*x1+163.9344262-0.61e-2*x2/(-x1+0.3721e-4))*exp(.539*(13437.24805*x2*(-x1+0.3721e-4)-.5)^2+1.306*(13437.24805*x2*(-x1+0.3721e-4)-.5)*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)+.368*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)^2)

(21)

#p:=H+H00;

eq1:=Int((sigma[r]-sigma[theta])/r,r=r_in..r_out);

Int((395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000.0*(.6530*x2*(r^2-x1)/r^2-1.0210+.3680*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*r^2*x2/(r^2-x1))/r, r = 0.54e-2 .. 0.61e-2)

(22)

eq2:=Int(2*Pi*sigma[z]*r,r=r_in..r_out);

Int(2*Pi*(-395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)+790000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))-395000*(-4405655.099*x1+163.9344262-0.61e-2*x2/(-x1+0.3721e-4))*exp(.539*(13437.24805*x2*(-x1+0.3721e-4)-.5)^2+1.306*(13437.24805*x2*(-x1+0.3721e-4)-.5)*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)+.368*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)^2))*r, r = 0.54e-2 .. 0.61e-2)

(23)

#eq1:=Quadrature((sigma[r]-sigma[theta])/r,r=r_in..r_out,method=gaussian[5],output=value):

#eq2:=Quadrature(2*Pi*sigma[z]*r,r=r_in..r_out,method=gaussian[5],output=value):

eq1=evalf(p_out-p_in)

Int((395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000.0*(.6530*x2*(r^2-x1)/r^2-1.0210+.3680*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*r^2*x2/(r^2-x1))/r, r = 0.54e-2 .. 0.61e-2) = -10000.

(24)

eq2=F_a

Int(2*Pi*(-395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)+790000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))-395000*(-4405655.099*x1+163.9344262-0.61e-2*x2/(-x1+0.3721e-4))*exp(.539*(13437.24805*x2*(-x1+0.3721e-4)-.5)^2+1.306*(13437.24805*x2*(-x1+0.3721e-4)-.5)*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)+.368*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)^2))*r, r = 0.54e-2 .. 0.61e-2) = .381846

(25)

fsolve({eq1=evalf(p_out-p_in),eq2=F_a},{x1,x2});

fsolve({Int((395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000.0*(.6530*x2*(r^2-x1)/r^2-1.0210+.3680*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*r^2*x2/(r^2-x1))/r, r = 0.54e-2 .. 0.61e-2) = -10000., Int(2*Pi*(-395000.0*(.5390*x2*(r^2-x1)/r^2-1.1920+.6530*r^2*x2/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*x2*(r^2-x1)/r^2-395000*((r^2-x1)/r^3-x2*r/(r^2-x1))*exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)+790000*(Int(exp(.539*(.5*x2*(r^2-x1)/r^2-.5)^2+1.306*(.5*x2*(r^2-x1)/r^2-.5)*(.5*r^2*x2/(r^2-x1)-.5)+.368*(.5*r^2*x2/(r^2-x1)-.5)^2)*(3*r^6*x2-r^6-r^4*x1*x2+5*r^4*x1-7*r^2*x1^2+3*x1^3)/(r^4*(r^2-x1)^2), r = 0.54e-2 .. 0.61e-2))-395000*(-4405655.099*x1+163.9344262-0.61e-2*x2/(-x1+0.3721e-4))*exp(.539*(13437.24805*x2*(-x1+0.3721e-4)-.5)^2+1.306*(13437.24805*x2*(-x1+0.3721e-4)-.5)*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)+.368*(0.18605e-4*x2/(-x1+0.3721e-4)-.5)^2))*r, r = 0.54e-2 .. 0.61e-2) = .381846}, {x1, x2})

(26)

SolveEquations([eq1=evalf(p_out-p_in),eq2=F_a]);

Warning, objective function returns unfeasible value HFloat(undefined) for initial point [x1 = .9, x2 = .9]; trying to find a feasible initial point

 

Error, (in DirectSearch:-Search) cannot find feasible initial point; specify a new one

 

 

 

 

fsolve_problem.mw

For this integro-differential equation,

Equation:= int[y'(x)* (x^2)/[(x^2)-1],x)  =  (int[sqrt(y(x)])^(-2/3)

Maple is able to obtain an exact intrinsic solution

from which an exact solution can be extracted, namely,

ExtrinsicSolution:= y(x) = sqrt(3)*(-8*_C1*x^(8/3) + 12*x^2 - 3)^(3/4)

My question concerns how was this solution obtained.

Even more, specifically, 'odeadvisor' suggests converting the

equation in question to the form

ode:= y = G(x,diff(y(x),x));

However, I cannot reconcile how this can be applied to an equation which

contains two integrals. (Regretably, I am not able to directly, attach my

Maple worksheet directly on to this sheet). The situation is that after

applying 'dsolve' to the above 'Equation', Maple comes back with an

intrinsic solution which can was used to obtain the 'ExtrinsicSolution' in 

the above.  So it is the missing steps between applyingthe dsolve command

to Equation and the intrinsic solution which MS provides which, in turn, leads

to the 'Extrinsic Solution' above. I would greatly, appreciate if anyone can 

fill in the missing steps.

I was trying this ode with Maple

Do you agree this solution is not correct by Maple?

restart;

ode:=diff(y(t),t)+y(t)=Dirac(t);
ic:=y(0)=1;
sol:=dsolve([ode,ic],y(t),method='laplace');

It gives  y(t) = 2*exp(-t)

But from the discussion in the above link we see this is wrong solution. Maple also does not verify it:

odetest(sol,[ode,y(0)=1])

[-Dirac(t), -1]

Would this be considered a bug I should report or not? Note this result is only when using Laplace method. The default method gives better solution.

ode:=diff(y(t),t)+y(t)=Dirac(t);
ic:=y(0)=1;
sol:=dsolve([ode,ic],y(t));
odetest(sol,[ode,y(0)=1])

 

Maple 2023.2.1

How to convert barycentric coordinates to cartesian ? Thank you

Hello!

I just want to try plot a conformal map for better understanding how it works.

For example, I want to plot a conformal map, so I do this:

It works fine. But if I want to map more complecated region, I have lot's of problem. Could you help me please.

For example:

restart;
assume(y, real);
assume(x, real);
f := z -> I + z*exp(1/4*I*Pi);
w := f(x + y*I);
u := Re(w);
v := Im(w);
A := array(1 .. 2);
A[1] := plots:-conformal(z, z = 0 .. 1 + I/2, grid = [16, 16], numxy = [16, 16], scaling = constrained);
A[2] := plots:-conformal(f(z), z = 0 .. 1 + I/2, grid = [16, 16], numxy = [16, 16], scaling = constrained);
plots:-display(A);

how to map a triangle [0,0], [1,0], [0,i] or half-plane Im z> 1, excluding the circle | z - 2i | <= 1.

Thank you!

I want to approximate a positive function that is decreasing in Gamma, say f(Gamma), that is very complicated yet very smooth. I need this in order to obtain a tractable and compact version of its derivative, which enters in the partial derivative of another (very simple) function.

Along the way, three related questions emerge: Derivatives_and_Approximations.mw

Thanks a lot!

Hi,

I am attempting to illustrate various solids in Maple. How can I do this with ? (Figure 3 on my worksheet). Thank you

S5SolidQ.mw

4 5 6 7 8 9 10 Last Page 6 of 2300