Carl Love

Carl Love

28035 Reputation

25 Badges

12 years, 320 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@mschneider I just added my version of Christian's line of code to my Reply above. Maybe it's easier to understand. Breaking it down:

  • indets(A, 'ln'(dependent(x))) finds the set of all subexpressions of A that are ln functions with argument depending on x (that's your x).
  • op~ strips the ln off of all of them.
  • >~ 0 sets them all greater than 0.
  • The means "apply the operation to all the objects in the container rather than to the container itself". It's called the elementwise operator (see ?elementwise). It's similar to map.

@mschneider Your misunderstanding is because the x in Christian's procedure is that procedure's parameter; it's not the x that occurs in your equation. All his procedure does is ensure that the arguments to both logs are positive. In other words, a*x + b > 0 and c*x+d > 0.

I would write his line of code as follows, which is perhaps easier to understand:

B:= op~(indets(A, 'ln'(dependent(x)))) >~ 0;

@vv A great, efficient answer that wouldn't occur to most new users. Vote up. To make it a bit more robust, I think that you should enforce q > p because there's the potential that some procedures that call ifactors rely on the primes being in order, even if ModularSquareRoot does not.

Please expand your worksheet online, so that it appears in the Post.

How'd you call help: a question mark, F1, help command, hyperlink, or something else?

@lima_daniel My Answer needs to be clarified a bit: The imaginary numbers in your posted worksheet appear to me to be spurious imaginary parts from some calculation, but it's not the calculation directly shown in the worksheet. I concur with Tom and Acer that re-execution of your worksheet does not produce the same numbers. Perhaps Asch had inadvertently been assigned a numeric value?

These imaginary numbers do not appear to me to be the result of the licensing issue mentioned by Kitonum, but I'm not sure. That issue seems to produce numbers much smaller and with equal real and imaginary parts.

Is "question from maple" the best title that you could come up with? Didn't you expect that the vast majority of Questions here are questions from Maple? An appropriate specific title increases the relevance of your Question far into the future. How about "Finding the coefficients for a trig identity"?

@Christian Wolinski Using expand will show powers of cos(t) alone. That's not quite what was asked for.

@Carl Love As I requested before, please respond to my Answers. Does the above do what you want?

@Bob Sullentrup You wrote:

  • What do you mean, "only numerically"? Do you mean there is no algebraic solution...?

Yes: Except for a few simple cases, there is generally no algebraic solution for the inverse of a polynomial of degree 5 or higher. This is a very famous theorem: See Abel-Ruffini theorem.

  • ...but the only thing you can do is to  calculate values of the polynomial and then switch x and y?

It's not quite that crude. There are numerous numeric solution techniques (which given a numeric value of y find the approximate numeric value(s) of x) that are more sophisticated than that, such as Newton's method. These methods can usually find inverse values to an arbitrary number of decimal places nearly instantaneously. 

  • And what is the function 'fsolve'? Some computer language? Doesn't look like Excel. 

Lol. The name of this forum is MaplePrimes because it's primarily about the mathematical software named Maple, so most Answers will have some Maple code. The function fsolve is a command of the Maple language that applies the numeric techniques discussed in the last paragraph. There is similar functionality in Excel.

@Remalisa Do you expect Xa, Xb, Ya, Yb (and we may as well include Xc and Yc) to be scalar variables, i.e., to have specific numeric values, rather than to be functions (of t)?

Let's describe the set of information that you have: 5 second-order ODEs with the same functional variable varphi(t), 6 presumably scalar variables, and only 1 initial condition varphi(0) = 0. Is that right?

@pooyan1990 How long does it run, roughly, before you get the error message? Less than a second? Several seconds? Several minutes?

Your initial condition is the most complicated that I've ever seen on a differential equation, and it's amazing that dsolve can solve it even when you give numeric values to those three symbols, because C and especially theta are still symbolic.

An assuming clause applies the assumptions only to the command to which it's attached. If instead you use an assume command, the assumptions will always be in effect. This may allow you to get a fully symbolic solution if you have enough time and memory. First free up as much memory as possible on your system. Make your first command after restart

assume(B/L__1 >= 2, B > 0, H > 0, L__1 > 0);

and keep everything else the same. I let the dsolve run until it consumed 6 Gig memory. If I'd let it run longer, maybe I would've gotten a solution.
 

@vv You are computing the the integral from -1 to 1, wheras the problem says 1 to -1. And how do you know that you're going along the bottom half? The integral is not independent of path: The integral clockwise around the unit circle is 4*I, not 0.

@mmcdara What you describe is the default behavior of Heaviside at 0; that default can be changed. According to ?Heaviside

  • When converting Heaviside to piecewise you may want to have the conversion performed taking Heaviside(0) = 1. For that purpose set the Environment Variable _EnvUseHeavisideAsUnitStep to true....

That variable declarations (such as local) can be given initial values is NOT an undocumented feature: It's documented in section 6.5 of the Programming Guide, which is available in the built-in help system. Indeed, you can also give an initial value to an export or a global or give a default value to a proc parameter using nearly identical syntax. 

 

First 245 246 247 248 249 250 251 Last Page 247 of 708