Skip to main content
1-Visitor
July 20, 2023
Question

Function not recognized in solve block

  • July 20, 2023
  • 2 replies
  • 1305 views

Hi 

I am a new user and running into an issue.  I defined a variable outside the solve block and in the solve block set up odesolve with the function in the ODE.  However, I get an error in the solve block saying variable not recognized.  Please let me know what I am doing wrong.

2 replies

23-Emerald IV
July 20, 2023

You're doing two things wrong:

1. You should attach the Prime worksheet file.

2. You define your function aw(x) in terms of yw(x), at the top of the picture. yw(x) has an error, probably because it's undefined...

 

Success!
Luc

23-Emerald IV
July 20, 2023

You have to write the constraints in terms of the function you are seeking to (Ode)solve. Consider this:

LucMeekes_5-1689887550664.png

LucMeekes_6-1689887558824.png

Does not work.

But this:

LucMeekes_7-1689887593829.png

can result in:

LucMeekes_8-1689887627084.png

Then your integral in the definition of Nw(x) uses yw as the integration variable. Is that intentional? Or do you even mean it to be yw(x)?

 

Success!
Luc

 

 

 

25-Diamond I
July 20, 2023

Sometime with more complicated functions it may be convenient to split the expression into smaller parts using auxiliary functions like your cu(). It can be done with a differently defined function cu() which expects already the function value as its argument:

Werner_E_0-1689892194121.png