Thomas Dean

197 Reputation

7 Badges

15 years, 312 days

MaplePrimes Activity

These are questions asked by Thomas Dean

eq:= x^2-y^2*z-y*z^2;


memory used=177.9MB, alloc=44.3MB, time=2.29
Initializing Java runtime environment.
munmap_chunk(): invalid pointer
Error, (in Maplets:-Display) computation interrupted


eq := 61*x^2 + 1 = y^2;
sols := (isolve(eq) assuming (x::posint, y::posint)):
for sol in sols do
  print(subs(_Z1 = 1, sol));
end do;

isolve returns the solution in terms of _Z1, indicating there may be infinite number of solutions?
I think {x = 226153980, y = 1766319049} is the only solution with x::posint, y::posint.

How do I restrict this to only positive integers in the solution?

I have a problem with evaluation. The eval(s, eqns) does not evaluate s before evaluation with eqns.

How do I do this?

vars := indets(eqns);


{exp(-2*t), exp(1/4*(-11+73^(1/2))*t), exp(-1/4*(11+73^(1/2))*t), i[C1](t), i[R1](t), i[R2](t), i[R3](t), i[V1](t), v[1](t), v[2](t), v[3](t),    v[4](t), v[L1](t), v[R1](t), v[R2](t), v[R3](t), v[V1](t)}

for s in indets(others) do
    if has(s, i) or has(s, v) then print(s);eval(s, eqns); end if;
end do:

How do I print the body of a procedure.  In older versions, verboseproc controlled this.


interface(verboseproc = 3)

interface(prettyprint = 1)


                  _m140116321288416, [_m140116321288416]

                 proc () option builtin = type; end proc,

                   [proc () option builtin = type; end proc]



ckt := "*\n\
V1 1 0 -10*exp(-2*t)\n\
R1 1 2 2\n\
R2 2 3 2\n\
C1 3 0 0.5F\n\
R3 2 4 4\n\
L1 4 3 1H\n\
volts,others:=Solve(ckt,'tran', 'returnall'):

How do I get an expression for diff(i1(t),t)?    I tried

eval(diff(i[R1](t),t), volts union others);
But, this looks very strange

diff(i2(t),t)?  I tried a similar expression, but, it is ver different than the one by OP.

How do I set the initial conditions?  I can use init=1, on L1 for i2(0)=1.  But, how about i1(0)=1?


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