all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: help-gnu-emacs@gnu.org
Subject: Re: How to simplify "sin(x)^2 + cos(x)^2" to 1 in calc?
Date: Sat, 10 Jun 2023 02:02:22 +0200	[thread overview]
Message-ID: <87a5x818xd.fsf@web.de> (raw)
In-Reply-To: <87y1kt8cg2.fsf@laptop.lockywolf.net> (Vladimir Nikishkin's message of "Fri, 09 Jun 2023 12:48:06 +0800")

Vladimir Nikishkin <lockywolf@gmail.com> writes:

> Hello, everyone.
>
> Please, refer me to a correct mailing list if this one is not
> appropriate,

This one is good.

> I am trying to make calc apply the most basic trigonometric identity,
> and simplify the algebraic formula "sin(x)^2 + cos(x)^2" to 1.
>
> I tried  'a v', 'a "', '=', 'j D', 'j M', but seemingly, all in vain,
> even though "sin(x)^2 + cos(x)^2 = 1" seems to be one of the safest
> substitutions in algebra. (Not sure about 'x having a quaternion value,
> or working in some arithmetic mod p.)
>
> What am I doing wrong?

Nothing, I guess.  It's indeed surprising that Calc fails to perform
this simplification automatically.

This identity is discussed in several places in the Calc manual.  With
the extended algebraic simplification mode enabled, Calc even simplifies
sqrt(1 - sin(x)^2) to cos(x).  But not 1 - sin(x)^2 to cos(x)^2 or
sin(x)^2+cos(x)^2 to 1.

Seems to be a known limitation though: the chapters about rewrite rules
talk about how to apply the Pythagorean trigonometric identity manually.
It seems you have to force the application in most situations.

Calc's automatic rewrite and simplification capabilities are sometimes a
bit limited.


Michael.



  reply	other threads:[~2023-06-10  0:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09  4:48 How to simplify "sin(x)^2 + cos(x)^2" to 1 in calc? Vladimir Nikishkin
2023-06-10  0:02 ` Michael Heerdegen [this message]
2023-06-11  3:07 ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a5x818xd.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.