0
$\begingroup$

I an not too familiar with FindSequenceFunction.

Is there a trick to make Mathematica produce the obvious sequence function for this sequence?

Example 1

ClearAll[y,x]; op={-y''[x],DirichletCondition[y[x]==0, True]}; eigf=Last@DEigensystem[op,y[x],{x,0,1},8] 

Mathematica graphics

It is clear that the eigenfunctions are of the form $\sin\left( n \pi x\right)$ for $n=1,2,\dots$ and I thought that using FindSequenceFunction would be the way to show this, so I typed

 FindSequenceFunction[eigf,n] 

But it gives

Mathematica graphics

It works well for things like:

Example 2

ClearAll[y,x,L0]; op={-y''[x],DirichletCondition[y[x]==0,True]}; eig=DEigenvalues[op,y[x],{x,0,L0},8] 

Mathematica graphics

FindSequenceFunction[eig,n] 

Mathematica graphics

Question Is there a better function or way to change this to produce the desired result for example 1? I looked at options for FindSequenceFunction. Why did Matghematica do a good job for example 2 and not example 1?

$\endgroup$

1 Answer 1

3
$\begingroup$
ClearAll[y, x]; op = {-y''[x], DirichletCondition[y[x] == 0, True]}; eigf = Last@DEigensystem[op, y[x], {x, 0, 1}, 8] (* {Sin[π x], Sin[2 π x], Sin[3 π x], Sin[4 π x], Sin[5 π x], Sin[6 π x], Sin[7 π x], Sin[8 π x]} *) 

Use FullSimplify

sf = FindSequenceFunction[eigf, n] // FullSimplify (* 1/2 I ((E^(-I π x))^n - (E^(I π x))^n) *) 

For integer values of n

sf // FullSimplify[#, Element[n, Integers]] & (* Sin[n π x] *) 
$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.