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

    From Rainer@21:1/5 to All on Sun Nov 10 21:15:56 2019
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nasser M. Abbasi@21:1/5 to Rainer on Sun Nov 10 22:42:00 2019
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Axel Vogt@21:1/5 to Rainer on Mon Nov 11 22:19:29 2019
    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


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rainer@21:1/5 to All on Tue Nov 12 17:00:27 2019
    On Sun, 10 Nov 2019 22:42:00 -0600, "Nasser M. Abbasi" <nma@12000.org>
    wrote:



    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}


    Thanks, great!

    Rainer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rainer@21:1/5 to All on Tue Nov 12 17:04:49 2019
    On Mon, 11 Nov 2019 22:19:29 +0100, Axel Vogt <//noreply@axelvogt.de>
    wrote:

    Try :solve(sys); [allvalues(%)];

    Danke, Axel.
    Interessant, aber ich brauche nur die reellen Lösungen.,


    Rainer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ali Guzel@21:1/5 to Axel Vogt on Sun Jan 17 08:27:41 2021
    On Tuesday, November 12, 2019 at 12:19:33 AM UTC+3, Axel Vogt wrote:
    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


    ### 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);

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From acer@21:1/5 to Ali Guzel on Sun Jan 17 19:56:30 2021
    On Sunday, January 17, 2021 at 11:27:42 AM UTC-5, Ali Guzel wrote:
    On Tuesday, November 12, 2019 at 12:19:33 AM UTC+3, Axel Vogt wrote:
    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

    ### 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);

    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);

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)