Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Maple can't solve a system of equations but GeoGebra can?

68 views
Skip to first unread message

Nasser M. Abbasi

unread,
Nov 10, 2019, 11:42:01 PM11/10/19
to
On 11/10/2019 2:15 PM, Rainer wrote:
> Hi,
>
> I'm a student in high school and we're using MAPLE and GeoGebra in
> math classes.
>
> I've stumbled across something weird: I can't make MAPLE (2016) solve
> the following system of equations, but I can do so with GeoGebra
> (5.0.5). That can't be right.
>
> Is there a way to make MAPLE put out the numerical solution like
> GeoGebra does?
>
> Thank you for your help!
> Rainer
>
>
> MAPLE:
> =========
>> restart:S:=t->c*exp(-a*t)+18;
>
> S := t -> c*exp(-a*t)+18
>
>> sys:={S(2)=55,S(8)=36};
>
> sys := {c*exp(-8*a)+18 = 36, c*exp(-2*a)+18 = 55}
>
>> solve(sys);
>
> {a = -1/2*ln(18/37*RootOf(18*_Z^3-37)^2), c = 37*RootOf(18*_Z^3-37)}
>
>

Try

restart:
S:=t->c*exp(-a*t)+18:
sys:={S(2)=55,S(8)=36}:
sol:=solve(sys):
evalf(sol)

{a = 0.1200910262, c = 47.04478235}

--Nasser

Axel Vogt

unread,
Nov 11, 2019, 4:19:33 PM11/11/19
to
Try :solve(sys); [allvalues(%)];

The following shows what you actually ask for:
Sys:=(expand(sys));
subs(exp(a) = sqrt(t), Sys); solve(%);

Or even better:
subs(exp(a) = sqrt(t), Sys); eliminate(%, c);


Then just solve exp(a) = sqrt(t) for a.

Likewise evaluate to numerical values.

So there are 3 solutions

PS: You may use http://www.mapleprimes.com/recent/all for questions.
It is alive instead of this usenet group.



On 10.11.2019 21:15, Rainer wrote:
> Hi,
>
> I'm a student in high school and we're using MAPLE and GeoGebra in
> math classes.
>
> I've stumbled across something weird: I can't make MAPLE (2016) solve
> the following system of equations, but I can do so with GeoGebra
> (5.0.5). That can't be right.
>
> Is there a way to make MAPLE put out the numerical solution like
> GeoGebra does?
>
> Thank you for your help!
> Rainer
>
>
> MAPLE:
> =========
>> restart:S:=t->c*exp(-a*t)+18;
>
> S := t -> c*exp(-a*t)+18
>
>> sys:={S(2)=55,S(8)=36};
>
> sys := {c*exp(-8*a)+18 = 36, c*exp(-2*a)+18 = 55}
>
>> solve(sys);
>
> {a = -1/2*ln(18/37*RootOf(18*_Z^3-37)^2), c = 37*RootOf(18*_Z^3-37)}
>
>
> fsolve doesn't do the job, either:
>
>> fsolve(sys);
>
> fsolve({c*exp(-8*a)+18 = 36, c*exp(-2*a)+18 = 55},{a, c})
>
>
>
> GeoGebra:
> =========
> S(t):=c*exp(-a*t)+18
>
> S(t):=(c * e^(((-a) * t))) + 18
>
> system:={S(2)=55,S(8)=36}
>
> system:={(c * e^(((-2) * a))) + 18 = 55, (c * e^(((-8) * a))) + 18
> = 36}
>
> lsg:=NLöse(system)
>
> lsg:={a = 0.1200910257913, c = 47.04478235943}
>
> SS(t):=Numerisch(Ersetze(S(t),lsg))
>
> SS(t):=(47.04478235943 * ?^(((-0.1200910257913) * t))) + 18
>


Ali Guzel

unread,
Jan 17, 2021, 11:27:42 AM1/17/21
to
### Floating Point solves... Just a point after 36. and 55. Dr. Ali Güzel
restart:S:=t->c*exp(-a*t)+18;
S := t -> c*exp(-a*t)+18;
sys:={S(2)=55,S(8)=36};
sys := {c*exp(-8*a)+18 = 36., c*exp(-2*a)+18 = 55.};
solve(sys);

acer

unread,
Jan 17, 2021, 10:56:31 PM1/17/21
to
If the implicit RootOfs are not wanted then it's not difficult to get the exact solution in terms of explicit radicals (in Maple 2016.2,... or Maple 2020.1). That can be done for this example with a single call to the `solve` command, without needing `allvalues` here. The `evalf` command produces a floating-point approximation, from that.

restart;
S:=t->c*exp(-a*t)+18:
sys:={S(2)=55,S(8)=36}:
sol:=solve(sys,real,explicit);
1/3 2/3
24642 24642
sol := {a = -1/2 ln(--------), c = --------}
37 18

evalf(%);
{a = 0.1200910257, c = 47.04478236}

Getting the three roots (of which two are nonreal, ie. complex) is similar,

solve(sys, explicit);

0 new messages