Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#26 2014-02-27 02:30:01

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Integrating a piecewise function with Maxima

We had y = x before doing all that.

After doing all that we have

Why do you think the second one is easier to compute? o.O

I'll ask my question a little later


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#27 2014-02-27 02:32:00

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Integrating a piecewise function with Maxima

That is a simple example. It is a toy problem to teach students the technique. It would not be used for computation.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#28 2014-02-27 02:46:53

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Integrating a piecewise function with Maxima

You mean: If the function was complicated enough then the fourier series would have been simpler than it?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#29 2014-02-27 02:48:04

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Integrating a piecewise function with Maxima

It would be necessary, not just simpler. It is easier to see with polys.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#30 2014-02-27 03:22:40

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Integrating a piecewise function with Maxima

Hmm okay. Did you know that this is not the Fourier Series thread?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#31 2014-02-27 03:27:29

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Integrating a piecewise function with Maxima

Yes, we got off track when I asked you about summing a series using Fourier series.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#32 2014-02-27 15:07:00

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Integrating a piecewise function with Maxima

PowersRepresentation[n,p,k] gives the list of all sets of k p-powered integers that sum upto n. Right?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#33 2014-02-27 15:27:37

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Integrating a piecewise function with Maxima

You are missing an s.

PowersRepresentations[1729, 2, 3]

Shows how to represent 1729 into 2 powers of 3


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#34 2014-02-27 15:31:51

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Integrating a piecewise function with Maxima

Hi;

I want to compute PowersRepresentations[x,4,2] where x is a 10 digit number (in decimal base). It seems to take forever because there are a huge ways to do it. Can I make M just calculate atleast 20 ways to do that?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#35 2014-02-27 15:41:32

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Integrating a piecewise function with Maxima

You mean at most.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#36 2014-02-27 15:42:51

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Integrating a piecewise function with Maxima

yes.

Because there can be a huge number of possibilities, M is taking time. I want it to show only a few of them which can be done in a time that fits my patience


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#37 2014-02-27 15:51:10

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Integrating a piecewise function with Maxima

That will require a program.

I have to go offline. I will show you how I do that already in the other thread.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#38 2014-02-27 16:14:46

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Integrating a piecewise function with Maxima

That will require a program.

A program other than Mathematica?

I had done that already. (Post 100, 112 and 113)


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#39 2014-02-27 20:58:13

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Integrating a piecewise function with Maxima

Hi;

M is a programming language too. As a matter of fact it is several languages rolled into one. No CAS could possibly anticipate the users every need.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#40 2014-02-27 22:57:17

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Integrating a piecewise function with Maxima

Is there no simple way to tell M what I need to?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#41 2014-02-27 23:28:06

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Integrating a piecewise function with Maxima

Yes there is, probably only a few lines. M programs are quite short. Have you not seen the examples I gave to Shivam?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#42 2014-02-27 23:38:12

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Integrating a piecewise function with Maxima

That I have.

The next person might begin


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#43 2014-02-27 23:41:36

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Integrating a piecewise function with Maxima

Hath ye not gone to the mighty demonstrations site? There ye will behold M's magnificence.

The idea is uproariously simple.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#44 2014-02-27 23:44:08

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Integrating a piecewise function with Maxima

I have seen all that but I never found a demonstration that does what I want now


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#45 2014-02-27 23:48:30

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Integrating a piecewise function with Maxima

This is why M is the greatest. Do you know who Legendre was?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#46 2014-02-27 23:54:52

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Integrating a piecewise function with Maxima

A member in this forum.
right?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#47 2014-02-27 23:56:14

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Integrating a piecewise function with Maxima

Hmm, I do not think so. He may have been a guest.

Anyway, do you know one of the things he is famous for?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#48 2014-02-28 00:01:06

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Integrating a piecewise function with Maxima

No, I have never even heard of him.


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#49 2014-02-28 00:04:35

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Integrating a piecewise function with Maxima

He is one of the greatest mathematicians of all time.

Wikipedia wrote:

Lagrange's four-square theorem, also known as Bachet's conjecture, states that any natural number can be represented as the sum of four integer squares.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#50 2014-02-28 00:05:28

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Integrating a piecewise function with Maxima

Who is the Legendre guy then?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

Board footer

Powered by FluxBB