J'Neal
J'Neal

Reputation: 11

Can I create a nested function frow 2x2 wronskian on CAS?

I'm trying to make a document defining an input for 2 equations to get the wronskian, but I am having issues and am wondering if it is possible. Here's what I have: on my TI-nspire CX CAS I went to new Document>Program Editor and have after lots of fiddling am stuck here:

Define wron(f,g)=

Func

Define f(t)=Func

f=f(t)

Define g(t)=Func

g=g(t)

Return det(f(t) g(t) ; f'(t) g'(t))

EndFunc

EndFunc

EndFunc

Is there a way to make a code for this on my calculator?

Upvotes: 0

Views: 59

Answers (1)

Logan Tischler
Logan Tischler

Reputation: 115

Pseudocode:

def wronskian():
    f = x ** 2
    g = sin(x)
    return f * d/dx(g) - g * d/dx(f)

wronskian()

// Output:
// x ** 2 * cos(x) - sin(x) * 2 * x
// Factored -> x * (x * cos(x) - 2 * sin(x))

Upvotes: 0

Related Questions