Dr. Patrick T

## 2128 Reputation

15 years, 261 days

## more code...

more code would make it easier to understand your needs, perhaps the following is of relevance:

http://www.mapleprimes.com/blog/scumath/howplotgeneralspacecurvemaple

http://wamp.mapleprimes.com/forum/intersectioncurve

## calculate or plot?...

do you want to calculate the intersection numerically or do you want to display the sequence of plots together with the horizontal/vertical line? the latter can be done by first creating the plots, p1:=plot(...): p2:=plot(...): and then displaying the plots, plots:-display(p1,p2);

you'll get better feedback, I'm confident, if you show your code or a relevant snippet of it.

## yank, yank!...

#yank := (expr,z) -> z*expand(expr/z):
yankyank := (expr,z) -> z*simplify(expand(expr/z)):
convert(cosh(t),exp):
yankyank(%, exp(t)) assuming t::real:
simplify(log(%)) assuming real;

-ln(2) + t + ln(1 + exp(-2 t))

the method does rely on knowing what you want to get, however. Anyway, defining functions like yank is a neat trick that can certainly be applied to other situations like this one.

Note: This is the third edit of the post, sorry for the inconvenience.

## more code = more feedback...

your question, while clear, is abstract, you may get more useful feedback if you show some example code, it will also minimize potential misunderstandings.

## workaround...

I too thought that assuming should work, but for some reason it doesn't (I don't know why, I don't know whether it's supposed to in this case)

```infolevel[solve]:=5:
solve(x^2-4,x) assuming x::positive;
solve:   Warning: solve may be ignoring assumptions on the input variables.
solve:

{x~::RealRange(Open(0), infinity)}

2, -2

```

a workaround:

```solve({x^2-4,x>0},x);

{x = 2}

or:
```
``` op(solve({x^2-4,x>0},x));

x = 2

```

## no solutions found...

```infolevel[solve]:=5:

solve(fm, omega);
PolynomialSystem:   Polynomial system split into parts    1
PolynomialSystem:   Skipping Groebner and trying resultant methods.
PseudoResultant:   138400   [2, 5000012782, _S000005]   4   2   266   0   3   0
PseudoResultant:   166090   [1, 700002626, w]   1   1   93   0   3   1
PseudoResultant:   -10   []   0   0   3   0   3   1
PseudoResultant:   414134   [1, 7000025344, _S000004]   2   1   108   1   15   0
PseudoResultant:   applying degree reduction   _S000004   _S000004^(1/2)
PseudoResultant:   48804   [1, 1000012100, _S000004]   2   1   104   1   15   0
PseudoResultant:   -10   []   0   0   3   1   96   0
PseudoResultant:   2   solutions found, now doing backsubstitution
PseudoResultant:   backsubstitution of   w
PseudoResultant:   backsubstitution of   _S000004
PseudoResultant:   backsubstitution of   _S000004
PseudoResultant:   backsubstitution of   _S000004
PseudoResultant:   backsubstitution of   _S000005
solve:   Warning: no solutions found
Warning, solutions may have been lost

```

## polynomial equations of high order...

don't always have solutions expressible in terms of radicals (see Abel, Galois, http://en.wikipedia.org/wiki/Polynomial, etc.)

you can sometimes get closed-form solutions for specific values of c, e.g.

```z1 := 819*z^6+(-396+396*c)*z^4+306*z^3*c+(63*c^2-126*c+63)*z^2+(90*c^2-90*c)*z+6*c^3-9*c^2+18*c-6;

6                   4        3
z1 := 819 z  + (-396 + 396 c) z  + 306 z  c

2                2        2                3      2
+ (63 c  - 126 c + 63) z  + (90 c  - 90 c) z + 6 c  - 9 c

+ 18 c - 6

solve( eval(z1,c=1),z);

1/3    1/3                           1/3
%2     %2               1/2   (1/3)  %2               1/2   (1/3)
- -----, ----- - 1/182 I 3    %2     , ----- + 1/182 I 3    %2     ,
91     182                           182

1/3    1/3
%1     %1               1/2   (1/3)
- -----, ----- - 1/182 I 3    %1     ,
91     182

1/3
%1               1/2   (1/3)
----- + 1/182 I 3    %1
182

1/2
%1 := 140777 + 24843 22

1/2
%2 := 140777 - 24843 22

```

Note. solve(z1=0,z) may be written simply solve(z1,z)

## typo?...

AFAIK

Y- C(Y) - X(e) = C  should probably be

Y- C(Y) - G - NX(e)  = I,

where NX = imports minus exports (writing X for Net Exports is a potential source of confusion)

and I = investment

and G= government spending

## limits?...

you haven't said what limits you were integrating within

```expr := (exp(-c*x))/(a^2+x^2)^1/2;

exp(-c x)
expr := 1/2 ---------
2    2
a  + x

int( expr, x=0..1 );

1/4 I (exp(2 I c a) Ei(1, c a I) - Ei(1, -I c a)

- exp(2 I c a) Ei(1, c + c a I) + Ei(1, c - c a I))

exp(-I c a)/a

int( expr, x=0..infinity );

{
{ undefined , 0 < -I a
{

undefined , 0 < a I

lim       -1/4 I exp(-I c a) (
x -> infinity

2
exp(c a I)  Ei(1, c x + c a I)

- exp(c a I) exp(-I c a) Ei(1, c x - c a I)

- exp(2 I c a) Ei(1, c a I) + Ei(1, -I c a))/a , otherwise

```

## 14 big equations...

with 14 big equations like yours, it's very hard to see what's going on, and even if Maple did spill out an output, how much of it would you be able to interpret I wonder? (The equations were even too big to be copy-pasted under the default options) Have you tried to linearize the system and see whether the linearization can be solved? Get the Jacobian of the system at the critical points of interest and check what the eigenvalues tell you about the dynamics in a neighborhood of the said points. If not linear, then getting rid of the small terms. Hopefully someone else will have more useful suggestions.

## restart...

this is because you run the code without clearing the memory, if you first call "restart" the errors of recursion message does not appear.

## using algsubs with negative powers...

with negative powers, algsubs should be used like this:

```
algsubs(w=2*Pi*f,algsubs(1/w=1/2/Pi/f,Xw));```

?algsubs

Note that the requirement for monomials in a to divide monomials in f means that the negative powers of u in the following example are not substituted, and must be handled separately as shown.

```f := a/u^4+b/u^2+c+d*u^2+e*u^4;

a      b            2      4
f := ---- + ---- + c + d u  + e u
4      2
u      u

algsubs(u^2=v,f);

2    b      a
d v + c + e v  + ---- + ----
2      4
u      u

algsubs(1/u^2=1/v,f);

2
4      2   a + v b + c v
e u  + d u  + --------------
2
v

algsubs(u^2=v,algsubs(1/u^2=1/v,f));

4      3                2
e v  + d v  + a + v b + c v
----------------------------
2
v
```

## minimum...

I'm not sure I understand the question, but if you're looking for a function f(x) such that the expression is a minimum in the set of positive real numbers, that would be found by solving the differential equation associated with setting your expression equal to zero, that would give you a family of f functions.

Besides it is difficult to read the Maple tag you have printed, here's my reading:

```with(DEtools):
DE := diff(f(x), x\$4) * diff(f(x), x\$2) - 1/2 * (diff(f(x), x\$3))^3;

/ 4      \ / 2      \       / 3      \3
|d       | |d       |       |d       |
DE := |--- f(x)| |--- f(x)| - 1/2 |--- f(x)|
|  4     | |  2     |       |  3     |
\dx      / \dx      /       \dx      /

sol := dsolve(DE);

2    3
(4 + 15 LambertW(%1) + 18 LambertW(%1) ) %1
sol := f(x) = 1/432 --------------------------------------------
3             3
_C1  LambertW(%1)

+ _C3 x + _C4

%1 := -2 _C1 x - 2 _C1 _C2

```

## maybe an installation problem?...

No problem here, I have Maple 13.01, I copy-pasted your lines of code into both classic and standard and I get the plots and no error message. Could it be an installation problem? missing libraries or something?

## dde not implemented, but workarounds exi...

Your equation is a delay difference equation (dde), also known as difference-differential equation. As far as I know (correct me if I'm wrong someone) this is not implemented in Maple. But there are workarounds. The following is a pretty clear tutorial on what you need to do to solve your problem:

http://people.uleth.ca/~roussel/nld/delay.pdf

Give it a try and get back to us with your code! All the best and merry Christmas.

 First 10 11 12 13 14 15 16 Last Page 12 of 24
﻿