Axel Vogt

5906 Reputation

20 Badges

19 years, 352 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are answers submitted by Axel Vogt

How about using normal(e) ? Or simplify(e) ?

There is a page for downloading as well. For that I use a chromium based browser (instead of Firefox), https://en.wikipedia.org/wiki/Ungoogled-chromium, there exists a portable version for it.

Please write corrections into your original thread instead of opening a new one.

Otherwise it will become quite confusing.

Using the valid (!) transformation arcsinh(2*x) = y, i.e. x = sinh(y)/2, 0 <= y gives it after 'simplify'.

If you insert x[2] from g into f then you find x[1] = - 0.668... now feeding g you find x[1] = - 1.552 ...

For me the keyboard combination <ctrl> + <D> works.

I think it can be written as a* sqrt( cos(x+c__1)^2 ) which I consider to be more simple (even if LeafCount is the same as for e2)

MP_238462_some_simplification.mw

You may try the following approach:

fsolve usually delivers real solutions only. If you want positive ones you can change your variable, say x, to X^2, fsolve for X and square it.

Find an example bellow. However I will not do it for your problem.

# https://www.mapleprimes.com/questions/238400-Helping-Fsolve

eq:=(x-1)^2-16;   # plot(%);
{fsolve(eq)};     # set of solutions = {-3, +5}

eq := (x-1)^2-16

{-3.00000000000000, 5.00000000000000}

(1)

EQ:=eval(eq, x=X^2);
# {fsolve(EQ, complex)};     # set of complex solutions for EQ
{fsolve(EQ)};                # set of (real) solutions for EQ
map(q -> q^2, %);            # now back to eq

EQ := (X^2-1)^2-16

{-2.23606797749979, 2.23606797749979}

{5.00000000000000}

(2)

 


 

Download MP_238400_positive_solutions.mws

You can use

(*

  (some code to be de-activated)

*)

For example

 

restart; interface(version);

`Classic Worksheet Interface, Maple 2017.3, Windows, Sep 27 2017, Build ID 1265877`

(1)

 

f:= z -> 1/(z + 2);
f(x+I*y);
u:=unapply(evalc(Re(%)), x,y);
v:=unapply(evalc(Im(%%)), x,y);

f := proc (z) options operator, arrow; 1/(z+2) end proc

1/(x+y*I+2)

u := proc (x, y) options operator, arrow; (x+2)/((x+2)^2+y^2) end proc

v := proc (x, y) options operator, arrow; -y/((x+2)^2+y^2) end proc

(2)

 

['D[1](u)(x,y) = D[2](v)(x,y)', 'D[2](u)(x,y) = -D[1](v)(x,y)'];
simplify(%): evalc(%);
map(is, %);

[(D[1](u))(x, y) = (D[2](v))(x, y), (D[2](u))(x, y) = -(D[1](v))(x, y)]

[(-x^2+y^2-4*x-4)/(x^2+y^2+4*x+4)^2 = (-x^2+y^2-4*x-4)/(x^2+y^2+4*x+4)^2, (-2*x-4)*y/(x^2+y^2+4*x+4)^2 = (-2*x-4)*y/(x^2+y^2+4*x+4)^2]

[true, true]

(3)

'[diff(u(x,y),x) = diff(v(x,y),y), diff(u(x,y),y) = -diff(v(x,y),x)]';
evalc(%): simplify(%);
map(is, %);

[diff(u(x, y), x) = diff(v(x, y), y), diff(u(x, y), y) = -(diff(v(x, y), x))]

[(-x^2+y^2-4*x-4)/(x^2+y^2+4*x+4)^2 = (-x^2+y^2-4*x-4)/(x^2+y^2+4*x+4)^2, -2*(x+2)*y/(x^2+y^2+4*x+4)^2 = -2*(x+2)*y/(x^2+y^2+4*x+4)^2]

[true, true]

(4)
   
 

 


 

Download CR.mws

It should simplify to - 2/7
 

# https://www.mapleprimes.com/questions/236590-Error-in-Trignormalsincosargs-Too
restart; kernelopts(version);

`Maple 2024.0, X86 64 WINDOWS, Feb 05 2024, Build ID 1785419`

(1)

expr := -1/7 - (-1/7*7^(5/7)*exp(2/7*Pi*I)*sin(1/7*Pi)*I - 1/7*cos(1/7*Pi)*7^(5/7)*exp(2/7*Pi*I))^(7/2):

# evalf[20](expr): fnormal(%): identify(%); # = -2/7

# evalc(expr): simplify(%);                 # = -2/7

simplify(expr):
evalc(%): simplify(%);                      # = -2/7

-2/7

(2)

# convert(expr, trig): simplify(%);         # = -2/7


 

Download MP_236590.mw

It often helps to care for spurious numerical imaginary results:

[Re(res), Im(res)]:
plot(%,t=-5..1, color=[red,blue]);

For example like this (upload does not work ...):

NumericEventHandler(invalid_operation = `Heaviside/EventHandler`(value_at_zero = 0)):
assume(u::real, v::real);

[Int(Dirac(u-v), [u, v]) , min(u,v)]; value(%);
convert(%, piecewise, u);
%[1] - %[2]; # = 0

[Int(Dirac(u+v-1), [u, v]), max(u+v-1, 0)]; value(%);
convert(%, piecewise, u);
%[1] - %[2]; # = 0

 

 

I think that limit(expr, +oo) = 24 is false


 

# https://www.mapleprimes.com/questions/237741-Integral-Of-Dirac
restart; kernelopts(version);

`Maple 2023.2, X86 64 WINDOWS, Nov 24 2023, Build ID 1762575`

(1)

g:= x -> x^2+y^2-1;
#g:= x -> x^2-a^2; 'y^2-1 = eval(-a^2, a=sqrt(1-y^2))'; is(%);

proc (x) options operator, arrow; x^2+y^2-1 end proc

(2)

Int(Dirac('g'(x)), x=-infinity ... infinity): '%'= value(%);

Int(Dirac(g(x)), x = -infinity .. infinity) = 1/abs(y^2-1)^(1/2)

(3)

 

This is correct using a quite common definition for composing Dirac and appropriate functions, see Maple's help

or https://en.wikipedia.org/wiki/Dirac_delta_function#Composition_with_a_function referencing to I M Gelfand

 

0='g'(x);
Zeros:={solve(%,x)};
x1,x2:=op(Zeros);

0 = g(x)

 

{(-y^2+1)^(1/2), -(-y^2+1)^(1/2)}

 

(-y^2+1)^(1/2), -(-y^2+1)^(1/2)

(4)

 

The zeros of g are simple iff y <> -1 . Therefore the composition can be defined as

 

delta('g'(x)) = Sum('delta(x-xi)/abs(D(g)(xi))', xi in 'Zeros');
subs(Sum=add, %): %;
Dirac_of_g(x):=eval(rhs(%), delta=Dirac);

delta(g(x)) = Sum(delta(x-xi)/abs((D(g))(xi)), `in`(xi, Zeros))

 

delta(x^2+y^2-1) = (1/2)*delta(x-(-y^2+1)^(1/2))/abs(y^2-1)^(1/2)+(1/2)*delta(x+(-y^2+1)^(1/2))/abs(y^2-1)^(1/2)

 

(1/2)*Dirac(x-(-y^2+1)^(1/2))/abs(y^2-1)^(1/2)+(1/2)*Dirac(x+(-y^2+1)^(1/2))/abs(y^2-1)^(1/2)

(5)

 

Then the integral works out as asserted (since Int(Dirac(x+constant), x = -infinity .. infinity) = 1 ):

 

Int(Dirac('g'(x)), x=-infinity ... infinity);
``=Int(Dirac_of_g(x), x=-infinity .. infinity);
value(%);

Int(Dirac(g(x)), x = -infinity .. infinity)

 

`` = Int((1/2)*Dirac(x-(-y^2+1)^(1/2))/abs(y^2-1)^(1/2)+(1/2)*Dirac(x+(-y^2+1)^(1/2))/abs(y^2-1)^(1/2), x = -infinity .. infinity)

 

`` = 1/abs(y^2-1)^(1/2)

(6)
 

 


 

Download MP_237741-Integral-Of-Dirac.mw

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