## 5906 Reputation

19 years, 305 days
Munich, Bavaria, Germany

## "normal"...

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

## suggestion...

Otherwise it will become quite confusing.

## manually...

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

## no solution (2)...

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 ...

## ctrl + D...

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

## = sqrt( cos^2 )...

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

## trick...

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}
 (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
 (2)
 >

## try this...

You can use

(*

(some code to be de-activated)

*)

## CR...

For example

 >
 > restart; interface(version);
 (1)
 >
 > f:= z -> 1/(z + 2); f(x+I*y); u:=unapply(evalc(Re(%)), x,y); v:=unapply(evalc(Im(%%)), x,y);
 (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, %);
 (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, %);
 (4)

## - 2/7...

It should simplify to - 2/7

 > # https://www.mapleprimes.com/questions/236590-Error-in-Trignormalsincosargs-Too restart; kernelopts(version);
 (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)
 > # convert(expr, trig): simplify(%);         # = -2/7

## Real and Imaginary...

It often helps to care for spurious numerical imaginary results:

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

## formally...

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

## hm...

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

## Proof...

 > # https://www.mapleprimes.com/questions/237741-Integral-Of-Dirac restart; kernelopts(version);
 (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(%);
 (2)
 > Int(Dirac('g'(x)), x=-infinity ... infinity): '%'= value(%);
 (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);
 (4)

The zeros of g are simple iff  . 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);
 (5)

Then the integral works out as asserted (since  ):

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