mmcdara

6214 Reputation

17 Badges

7 years, 315 days

MaplePrimes Activity


These are questions asked by mmcdara


Assuming u and v are both real, I want to prove this equality.

int(Dirac(u-v), [u, v])  = min(u, v)

To be clear, I don't want to verify is this equality is true, but I want (I would like) to do is to get its rhs by using ad hoc transformations of its lhs.

Under the same assumptions, how can I do the same thing for this equality?

int(Dirac(u+v-1), [u, v]) = max(u+v-1, 0)


Thanks in advance

I am presently working on bivariate functions defined this way

C := (u, v) -> (phi@@(-1))(phi(u)+phi(v));

phi is a function of specific expression named the "generator". Both u and v are assumed to be in the closed interval [0,1].

Here is an example:

restart
phi := u -> (u^(-theta)-1)/theta:
C := (u, v) -> (phi@@(-1))(phi(u)+phi(v)):
C(u, v)
                       / (-theta)        (-theta)    \
                      | u         - 1   v         - 1|
           @@(phi, -1)| ------------- + -------------|
                       \    theta           theta    /

This definition of C is correct providing that  theta in [-1, +infinity) \ {0}.
As you can see, the display of C(u, v) contains the inverse function phi@@(-1) which Maple doesn't seem to know what to do with.

What I would like is to get rid of  phi@@(-1) and get 

C(u, v);
        (-1+u^(-theta)+v^(-theta))^(-1/theta)

The only way I found to get this is to do that:

restart
phi := u -> (u^(-theta)-1)/theta:
(phi@@(-1)) := u -> solve(phi(x)=u, x): # explicit definition of (phi@@(-1))
C := (u, v) -> simplify((phi@@(-1))(phi(u)+phi(v))) assuming theta >= -1, theta <> 0:
C(u, v);
                                         /    1  \
                                         |- -----|
                                         \  theta/
             /      (-theta)    (-theta)\         
             \-1 + u         + v        /         

As you see I have been forced to tell Maple what the inverse function of phi was.
Is there another way do get this result without writting the bold red line?

Maple knows several inverse functions (trigonometric functions for instance), but how does it know that?
As Maple does not seem to use a (f@@(-1)) := u -> solve(f(x)=u, x) like definition, does it uses a correspondence table between functions and their inverse?
If it is so can we augment it?

Thanks in advance.

PS: the ultimate goal is to do something like this Download CAC.mw  for different generators.

For the moment I have defined my own table generator <--> inverse function  as I did above with the bold red line: this works but it is not very elegant.


Why does the execution of procedure J2 in the attached file fire an error?
it looked to me as if I had built it the same way as J1.
 

restart:

# Basically I want do do something like that,

J1 := proc()
  local z:
  z := proc(u) fsolve(sqrt(x)=u, x) end proc:
  evalf(Int(''z''(u), u=0..1))
end proc:

J1();
  

.3333333333

(1)

# but when z is more complex finction of two arguments.
#
# Unfortunately a direct transposition of what worked above no longer works.

J2 := proc()
  local z:
   z := proc(q1, q2)
     exp(
       2*(
         fsolve(1/2+(1/2)*erf((1/2)*x*sqrt(2)) = q1, x)
         *
         fsolve(1/2+(1/2)*erf((1/2)*x*sqrt(2)) = q2, x)
       )
       -
       fsolve(1/2+(1/2)*erf((1/2)*x*sqrt(2)) = sqrt(q1), x)^2
       -
       fsolve(1/2+(1/2)*erf((1/2)*x*sqrt(2)) = sqrt(q2), x)^2
    )
  end proc:
  evalf(Int(''z''(q1, q2), q1=0..1, q2=0..1))
end proc:

J2();

Error, (in evalf/int) q1 is in the equation, and is not solved for

 

 

 

Download integration_issue.mw

Can you help me fix this issue?

Thanks in advance

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

Here is an example where evalf[n] doesn't operate on the argument of the undefined function f.

x := rand(0. .. 1.)()
                          0.2342493224
y := x+f(x):
evalf[4](y)
                    0.2342 + f(0.2342493224)

# but, as soon as f is a known function:
evalf[4](cos(x))
                             0.9727


Here is a way to force evalf[4](f(x)) to return f(0.2342)?

I found only two ways to do this:
First: declare interface(displayprecision=4) 

interface(displayprecision=4):
y;
                 0.2342 + f(0.2342)

Or: do this (which is relatively cumbersome)

Evalf := proc(expr, n)
  local i := [indets(evalf[n](expr), numeric)[]]:
  eval(expr, i =~ evalf[4](i))
end proc:

Evalf(y, 4)
                 0.2342 + f(0.2342)

Thanks in advance.

PS:  I do not like setting displayprecision to some value because its effect is remnant: if you execute again the same worksheet (begining with a restart), the value of displayprecision is not reset to 10 but keeps the value you gave it previously, somewhere in the worksheet.

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