bugGNU Octave - Bugs: bug #53863, [octave forge] (symbolic) Octave...

 
 

bug #53863: [octave forge] (symbolic) Octave not solving right

Submitter:  None
Submitted:  Tue 08 May 2018 07:16:12 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Juan Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 08 May 2018 07:55:26 PM UTC, comment #2: 

The answer is correct when you factor your assumptions into the solution.

With no assumptions, you get the result that you have seen. Because in general, sqrt(a*b) is not equal to sqrt(a)*sqrt(b).

If you assume your symbols 'a' and 'b' are positive real numbers, then you get the result that you want


syms a b positive real
syms c p
y = a - b / (c + p) ^ 2;
solve (y,p)


Mike Miller <mtmiller>
Group Member
Tue 08 May 2018 07:28:08 PM UTC, comment #1: 

The answer is correct,---but has a different form than you expected.

Doug Stewart <dastew>
Tue 08 May 2018 07:16:12 PM UTC, original submission:  



>> y = a - b/(c+p)^2



# if you solve for p:

>> solve(y,p)


  ⎡       ___
  ⎢     ╲╱ a⋅b ⎥
  ⎢-c - ───────⎥
  ⎢        a   ⎥
  ⎢            ⎥
  ⎢       ___
  ⎢     ╲╱ a⋅b ⎥
  ⎢-c + ───────⎥
  ⎣        a   ⎦

These answers are not correct. it is: -c +- sqrt(b/a)




Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by dastew (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-05-08 mtmiller CategoryOctave Function Octave Package
        StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
        SummaryOctave not solving right [octave forge] (symbolic) Octave not solving right

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code