## 185 Reputation

3 years, 255 days

## simple factorization format...

Maple

This is the sort of thing that drives me nuts with Maple.

in the example below, how do I factor (L-Lm) so that the answer is in the form L1 :=L(1-k) instead of -L(k-1)?

Lm := (simplify(k*sqrt(L*L)) assuming (0 < L));
Lm := k L

L1 := (factor(L - Lm) assuming (0 < L and 0 < Lm and 0 <= k));
L1 := -L (k - 1)

in this simple case, it is easy to understand the result.  However, these kind of  representations in more complex solutions may obfuscate the result making it difficult to interpret its meaning, where as the meaning may be more obvious if the simplification or factorization led to a result formatted more similarly to the way a human would do it.  How do I get Maple to simplify things the more "traditional" way?

## simplifying complex expressions...

Maple

How do I simplify :

```Zin := Rin + omega*L*I + (omega*L)^2/(RL + omega*L*I);

```

so that there are no imaginary terms in the denominator?

I've tried,

```assum := Rin::real, omega::real, L::real, RL::real, 0 < Rin, 0 < omega, 0 < RL, 0 < L
Zin := Rin + omega*L*I + (omega*L)^2/(RL + omega*L*I);

(simplify(Zin) assuming assum);
```

but this doesn't work.

## Help with assumptions and complex number...

Maple 2020

I'm trying to solve a coupled inductor problem.  All I'm trying to do is solve for the currents (which I could do), then solve for resonance by setting the imaginary part of I1 to 0 and solving for omega.  I then want to plug this resonant frequency back into I1 and evaluate it for some component values and coupling coefficient.

The problem is that even though I define the various variables as real,  Maple doesn't seem to recognize them as such.  I suspect I've failed to define one of them, and that is why it is responding like it is, but I can't find it.

I'm also getting some weird behavior.....for example if I type :  wres0, I get the value I assigned to it --that's fine.  But then, when I type : wres0/(2*pi), I get an error, "Error, unable to parse 'mverbatim"   --- what does this mean?

This should be a pretty straight forward calculation on Maple, but at this point, I think I may be better off doing it by hand!  I appreciate any help you can provide.  Thank you.

## how to use arctan on complex number?...

Maple

I can't seem to figure out how to use arctan on a complex number in Maple.  I expect arctan(a+jb) assuming a and b are real to return atan(b/a).  Instead, returns arctan(a+Ib).  How do I do this?

 (1)

 (2)

 (3)

 (4)

test out how to use arctan....

 (5)

## inverse Laplace of transfer function ha...

Maple 2020

Hello,

I use Syrup to solve for the transfer function of a circuit, and in particular, the voltage at a given node.   If I use the "trans" option, the solution generates the expected result, in the expected format.  Syrup solves the differential equations and the resulting time domain equation is as expected.

If I then use the 'AC'  option, I get the result in the s-domain.  I then solve for the step response, and take the inverse Laplace transform.  The solution is given in terms of sinh and cosh.

If I plot the voltage in either solution as a function of time, the plots are identical.  So, the sinh/cosh solution must be somehow simplifiable so that it "looks" like the time domain solution I get from the transient analysis.

 (1)

 (2)

 (3)

Solution doing Transient Analysis

 > sol1 := dsolve(deqs):

Reassign rest to include the solution.

 > rest := eval(rest,sol1):

Compute the voltage across the capacitor Cm.

 > tmp1:=simplify(eval(v[Cm](t), sol1));
 (4)
 >
 (5)
 > solve(tmp1=2.5*(1-exp(-1)),t)
 p10 := plot(tmp1, t = 0 .. 0.00050000, color = 'blue', linestyle = 'dash')

Solution from AC analysis:

 (7)
 (8)

Impulse Response

 (9)

 (10)

Step Response

 (11)

 (12)

What is going on?  Where are the sinh and cosh terms in the solution coming from and why wont it simplify so that it looks like the other solution if they are identical?  Is there something special I need to do when using the invlaplace function?

Thanks!